Expand description
Keyboard → action mapping for the OneDrop GUI.
The GUI’s handle_keyboard dispatches every key event through
Keymap::lookup. Defaults match the MD2 keybind table (see
objectives_to_reach.md §7); the user can override any binding by
editing [keymap.bindings] in ~/.config/onedrop/settings.toml —
the override is applied at startup via Keymap::from_settings.
Structs§
- Binding
- A single key chord — a physical key plus the modifier flags that must be held while it’s pressed.
- Keymap
- Mutable, runtime keybind table. Built from the GUI’s MD2-style
defaults plus optional user overrides from
crate::settings::KeymapSettings. - Modifiers
- Modifier-state bits we care about for dispatch. Stored as a small
bitset so
Bindingstays triviallyCopy/Hash.
Enums§
- Action
- Every action the GUI can dispatch from a keybind. Adding an action
here requires (a) a default binding in
Keymap::defaultand (b) a match arm inApp::dispatch_action. The string form returned byAction::as_stris the stable key used insettings.toml.
Functions§
- digit_
to_ 🔒keycode - letter_
to_ 🔒keycode - parse_
chord 🔒 - Parse a human-readable chord like
"Ctrl+Shift+K"or"F5"into aBinding. Modifier names are case-insensitive (ctrl,Ctrl,CTRL); the key name uses winit’sKeyCodeDebug spelling minus theKeyprefix for letters (K→KeyK). - parse_
keycode 🔒