mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-24 18:07:01 +00:00
Add --allow-fallback option to the map command that controls shifted and ascii (alternate_key) fallback for individual key mappings. For non-Latin keyboard layouts, when the current layout key is non-ascii (codepoint > 127 and < 0xE000), the alternate_key from the base layout is used for matching if the mapping opts in via --allow-fallback=shifted,ascii. Default kitty bindings use --allow-fallback=shifted,ascii so they work out of the box with non-Latin layouts. User custom mappings default to --allow-fallback=shifted (preserving existing shifted_key behavior without ascii fallback). --allow-fallback=none disables all fallback for a mapping. Python side: parse_options_for_map() in options/utils.py handles flag parsing, ShortcutMapping uses it in __init__. get_shortcut() filters candidates by per-mapping allow_fallback. Go side: ParseMap() handles --allow-fallback, KeyAction stores AllowFallback, ShortcutTracker.Match passes it to matching. MatchesParsedShortcut defaults to shifted,ascii for hardcoded shortcuts. Migrated kittens (themes, command_palette, diff, choose_files) to use ShortcutTracker with configurable map entries. Tests added for Python (5 test methods) and Go (ParseMap + key matching). |
||
|---|---|---|
| .. | ||
| _static | ||
| _templates | ||
| kittens | ||
| screenshots | ||
| actions.rst | ||
| basic.rst | ||
| binary.rst | ||
| build.rst | ||
| changelog.rst | ||
| clipboard.rst | ||
| color-stack.rst | ||
| conf.py | ||
| conf.rst | ||
| deccara.rst | ||
| desktop-notifications.rst | ||
| dnd-protocol.rst | ||
| extract-rst-targets.py | ||
| faq.rst | ||
| file-transfer-protocol.rst | ||
| glossary.rst | ||
| graphics-protocol.rst | ||
| index.rst | ||
| installer.sh | ||
| integrations.rst | ||
| intro_vid.rst | ||
| invocation.rst | ||
| keyboard-protocol.rst | ||
| kittens_intro.rst | ||
| launch.rst | ||
| layouts.rst | ||
| Makefile | ||
| mapping.rst | ||
| marks.rst | ||
| misc-protocol.rst | ||
| multiple-cursors-protocol.rst | ||
| notifications.py | ||
| open_actions.rst | ||
| overview.rst | ||
| performance.rst | ||
| pipe.rst | ||
| pointer-shapes.rst | ||
| press-mentions.rst | ||
| protocol-extensions.rst | ||
| quake-screenshots.rst | ||
| quickstart.rst | ||
| rc_protocol.rst | ||
| remote-control.rst | ||
| requirements.txt | ||
| sessions.rst | ||
| shell-integration.rst | ||
| support.html | ||
| support.rst | ||
| text-sizing-protocol.rst | ||
| underlines.rst | ||
| unscroll.rst | ||
| wide-gamut-colors.rst | ||