zed/assets/keymaps
Andrej730 32a0e813a5
keymaps: Sync debugger bindings across platforms to match VS Code (#58729)
I was trying out zed after VS Code and I've stumbled upon inconsistency
with debugging hotkeys.
In VS Code it's f10/f11, in zed it was much more awkward f7/ctrl-f11. 

Investigating, I've found that I can't just override f11, because it's
used by `zed::ToggleFullScreen` global hotkey and global hotkey always
beats `Workspace && debugger_stopped`.
Furthermore, I've found f11 hotkey is available, but only on Mac. And on
Windows there was no `StepInto` hotkey at all. So configs were unsynced
in that regard.

Code changes:

- To make f11 overridable, I've moved it to `Workspace` context - it's
still pretty global, but now it's overridable. Though `Workspace &&
debugger_stopped` have the same depth as `Workspace`, it will take
priority, because it's registered later in .json.

- StepInto - added f11 hotkey for all platforms (was missing on linux
and windows), kept older ctrl-f11 too as some users might be used to it.
A note that on Mac F11 was added previously as `Workspace &&
debugger_running` - which practically means the hotkey wasn't available.
`debugger_running` means debugger is running in background, user needs
step commands when `debugger_stopped`- when they're actually stepping
through the code.

- StepOver - added f10 hotkey for all platforms (was missing on linux
and mac). Kept old f7 hotkey on linux and mac, didn't added it on
windows as it wasn't present before.

- StepOut - it was consistently shift-f11 on all platforms already, just
moved it from global context for consistency.

- Removed StepOver, StepInto, StepOut from debugger_session context and
kept it only in `debugger_stopped`, as this is when they're actually
useful, similar to how we have `debugger::Continue"` there which also
makes sense only when debugger is stopped.

I've separated changes by commits, so it would be easier to review them.

PS Global hotkeys overriding specific ones seems a bit odd by itself -
it seems global more specific hotkeys should always have a priority, so
maybe it's something to look into too.
Another thing that `default-xxx.json` share a lot of hotkeys, so
maintaining them separately may have other things going out of sync too.

Closes #58899.

----

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior - keymaps are not tested
- [x] Performance impact has been considered and is acceptable


Release Notes:

- Improved debugger step keybindings across platforms to match VS Code
defaults while preserving fullscreen outside paused sessions

---------

Co-authored-by: Kunall Banerjee <hey@kimchiii.space>
2026-08-20 00:48:05 +00:00
..
linux JetBrains keymap: Add CamelHump subword navigation (#51540) 2026-08-14 12:31:48 +00:00
macos JetBrains keymap: Add CamelHump subword navigation (#51540) 2026-08-14 12:31:48 +00:00
default-linux.json keymaps: Sync debugger bindings across platforms to match VS Code (#58729) 2026-08-20 00:48:05 +00:00
default-macos.json keymaps: Sync debugger bindings across platforms to match VS Code (#58729) 2026-08-20 00:48:05 +00:00
default-windows.json keymaps: Sync debugger bindings across platforms to match VS Code (#58729) 2026-08-20 00:48:05 +00:00
initial.json Add trailing commas to all asset jsonc files following #43854 (#44891) 2025-12-15 15:09:52 +00:00
specific-overrides-macos.json picker: Improve multi-select discoverability and rendering (#60919) 2026-07-13 18:21:15 +00:00
specific-overrides.json picker: Improve multi-select discoverability and rendering (#60919) 2026-07-13 18:21:15 +00:00
vim.json git_ui: Refactor git panel entry collapse (#61846) 2026-08-19 10:06:46 +00:00