VS Code Function Keys in the MacBook Touchbar
I love writing code in VS Code on my MacBook Pro. VS Code has a ton of shortcuts that let me keep my fingers on the keyboard and fly around, coding.
Recently I purchased the new MacBook Pro with the touchbar, which has raised a new hurdle ... how do I use the function keys? These are helpful for refactoring shortcuts in VS Code. I could map these features to other keys, but there is an easy way to show the FN keys to the touchbar when in VS Code on a Mac.
Open System Preferences and find the Keyboard. Then select the Shortcuts tab. On the left, select Function Keys and click the Plus sign ( +
). This will open the Applications folder. Select VS Code (or VS Code Insiders, if you use that, like me). And that's it!
Keep in mind that the standard volume and brightness controls will not appear for this app now.
It would be awesome if VS Code had custom MacBook touchbar buttons. Perhaps some of the common FN keys, context sensitive debug buttons, and more. This github issue refers to this https://github.com/Microsoft/vscode/issues/14653