How to use VSCode keyboard shortcuts with a Mac?

Viewed 6921

I'm running VSCode for Golang development on my Macbook. If I right click on a method I can "Go To Definition", but it also says that I can use the keyboard shortcut of F12 to accomplish the same thing. The problem is that there is no F12 key on my macbook. I have an external keyboard that appears to be trying to double use the "Increase volume" button as a F12 key, but even when I try using that it doesn't work.

What is the proper keyboard shortcut for "Go To Definition" (or any shortcut that uses the function keys) when you are using a Mac?

2 Answers

A few options:

  • Hold the fn key and then press f12 (if your keyboard has an fn key)

  • Change the VS Code keybinding

  • Change your mac to use normal function keys: System Preferences -> Keyboard -> Use F1, F2, etc. as standard function keys

Related