Stop VS Code from capturing function keys and other shortcuts
meant for your operating system.
VS Code registers keyboard shortcuts at the application layer — before macOS sees them. When you press F3, VS Code fires Find Next. Your OS shortcut never runs.
The fix is simple: add explicit unbind entries to VS Code's
keybindings.json
using the "-" prefix convention.
VS Code stops handling the key; the event falls through to the OS.
VS Code's keybindings file supports a minus-prefix command syntax.
Setting a key to a command prefixed with "-"
removes the default binding entirely.
CMD+SHIFT+P → "Open Keyboard Shortcuts (JSON)"
or edit directly at the path below
Each entry has a "key" and a "command" prefixed with "-"
No restart needed. VS Code reloads keybindings on file save.
File location on macOS:
~/Library/Application Support/Code/User/keybindings.json
The complete keybindings.json that releases F1–F19 back to macOS, including common Shift+Fx pairs.
// ~/Library/Application Support/Code/User/keybindings.json
[
// Unbind all F-keys so macOS OS-level shortcuts are not captured
{ "key": "f1", "command": "-workbench.action.showCommands" },
{ "key": "f2", "command": "-editor.action.rename" },
{ "key": "f3", "command": "-editor.action.nextMatchFindAction" },
{ "key": "shift+f3", "command": "-editor.action.previousMatchFindAction" },
{ "key": "f4", "command": "-editor.action.marker.nextInFiles" },
{ "key": "shift+f4", "command": "-editor.action.marker.prevInFiles" },
{ "key": "f5", "command": "-workbench.action.debug.continue" },
{ "key": "shift+f5", "command": "-workbench.action.debug.stop" },
{ "key": "f6", "command": "-workbench.action.debug.pause" },
{ "key": "f7", "command": "-editor.action.inlineSuggest.commitNextWord" },
{ "key": "f8", "command": "-editor.action.marker.next" },
{ "key": "shift+f8", "command": "-editor.action.marker.prev" },
{ "key": "f9", "command": "-editor.debug.action.toggleBreakpoint" },
{ "key": "f10", "command": "-workbench.action.debug.stepOver" },
{ "key": "shift+f10", "command": "-editor.action.showContextMenu" },
{ "key": "f11", "command": "-workbench.action.toggleFullScreen" },
{ "key": "shift+f11", "command": "-workbench.action.debug.stepOut" },
{ "key": "f12", "command": "-editor.action.revealDefinition" },
{ "key": "shift+f12", "command": "-editor.action.goToReferences" },
{ "key": "f13", "command": "-" },
{ "key": "f14", "command": "-" },
{ "key": "f15", "command": "-" },
{ "key": "f16", "command": "-" },
{ "key": "f17", "command": "-" },
{ "key": "f18", "command": "-" },
{ "key": "f19", "command": "-" }
]
What VS Code was doing with each key before the unbind.
| Key | VS Code Default Action | Now |
|---|---|---|
| F1 | Show Command Palette | passes to OS |
| F2 | Rename Symbol | passes to OS |
| F3 | Find Next Match | passes to OS |
| Shift+F3 | Find Previous Match | passes to OS |
| F4 | Next Error/Warning in Files | passes to OS |
| Shift+F4 | Previous Error/Warning in Files | passes to OS |
| F5 | Start / Continue Debugging | passes to OS |
| Shift+F5 | Stop Debugging | passes to OS |
| F6 | Pause Debugging | passes to OS |
| F7 | Inline Suggest Commit Next Word | passes to OS |
| F8 | Next Error/Warning in Editor | passes to OS |
| Shift+F8 | Previous Error/Warning in Editor | passes to OS |
| F9 | Toggle Breakpoint | passes to OS |
| F10 | Step Over (Debug) | passes to OS |
| Shift+F10 | Show Context Menu | passes to OS |
| F11 | Toggle Full Screen | passes to OS |
| Shift+F11 | Step Out (Debug) | passes to OS |
| F12 | Go to Definition | passes to OS |
| Shift+F12 | Go to References | passes to OS |
| F13–F19 | Unbound (safety unbind) | passes to OS |
vscode.w-b.dev
Daniel Brasileiro