How to set up Touch Bar to show function keys in a specific VirtualBox virtual machine macOS allows you to change the Touch Bar to traditional function keys when you run specific applications. I have tried to do so with VirtualBox, and it works on the main VirtualBox window properly. The only issue is that when I launch a virtual machine, those settings lose their effect. The reason is that VirtualBox launches a differently-named executable file (from within its app bundle) in order to run the virtual machine in a separate process. 

So, the question is: Is there a way to set up macOS to show the function buttons when running a virtual machine in VirtualBox (e.g. Linux or Windows)?
http://www.mastropaolo.com/2016/12/16/how-to-have-function-keys-in-virtualbox-guess-with-macos-touchbar/


  
  Open a Finder window to the /Applications folder. Right click on VirtualBox.app and click “Show Package Contents”.
  Find the Resources folder, and drag it into Finder’s favorites sidebar.
  Using the Resources folder you put in favorites, add vmstarter.app and VirtualBoxVM.app to the list of exceptions.
  Now you can remove the Resources shortcut you added to favorites.