feat(hotkeys): selectable Vim keymap preset

The preset swaps the BASE shortcut table underneath the user's overrides
instead of rewriting them, so Default <-> Vim is lossless. Vim binds single
modifier-free keys: n/p, h/l, Shift+J/K, /, and Ctrl+o / Ctrl+i for the jump
list; rows with no vim idiom keep their defaults.

j and k are deliberately left UNBOUND. They belong to a per-list cursor,
which QBZ has no notion of yet, and a global action bound there now would
have to be taken back the day one lands. A test holds them free.

Where an override has already claimed a shortcut the new base wants, that
action goes unbound rather than double-binding a combo that
action_for_shortcut would otherwise resolve by BTreeMap id order.

Seven new tests, including a gate that fails if any preset ever binds one
shortcut to two actions.
This commit is contained in:
Niklas Herder committed 2026-08-28 07:27:43 +02:00
1 parent 04f9afe83f
commit b781ed283f
12 files changed
+429 -67

No files matched your search

@@ -6035,7 +6035,7 @@ msgstr "Este álbum não tem faixas."
msgid "Reactive Rings"
msgstr "Anéis reativos"
# Hotkeys: the Spotify-parity playback actions
# Hotkeys: the Spotify-parity playback actions + the keymap preset picker
msgid "Volume Up"
msgstr "Aumentar Volume"
@@ -6060,3 +6060,9 @@ msgstr "Avançar"
msgid "Seek Back"
msgstr "Recuar"
msgid "Keymap"
msgstr "Mapa de Teclas"
msgid "Vim"
msgstr "Vim"