kitty/kittens
Павел Мешалкин 8ffdf7d7ee feat: add per-mapping --allow-fallback for layout-independent shortcuts
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).
2026-03-25 19:34:13 +03:00
..
ask Modernize Go code 2026-03-21 08:41:47 +05:30
broadcast
choose_files feat: add per-mapping --allow-fallback for layout-independent shortcuts 2026-03-25 19:34:13 +03:00
choose_fonts run modernize 2025-11-11 17:09:37 +05:30
clipboard Modernize Go code 2026-03-21 08:41:47 +05:30
command_palette feat: add per-mapping --allow-fallback for layout-independent shortcuts 2026-03-25 19:34:13 +03:00
desktop_ui desktop-ui kitten: Re-read config on every file chooser invocation via portal 2026-02-03 21:08:55 +05:30
diff feat: add per-mapping --allow-fallback for layout-independent shortcuts 2026-03-25 19:34:13 +03:00
hints Highlight full extent of hint matches, not just the prefix label 2026-03-24 11:23:30 -04:00
hyperlinked_grep run modernize 2025-11-11 17:09:37 +05:30
icat DRYer 2026-01-24 14:57:48 +05:30
notify run modernize 2025-11-11 17:09:37 +05:30
pager
panel Have toggling the quick access terminal via the kitten also move it to the active monitor 2025-09-23 07:31:42 +05:30
query_terminal
quick_access_terminal Cache parsing of command line specifications 2025-09-29 12:31:10 +05:30
remote_file
resize_window
show_key Modernize Go code 2026-03-21 08:41:47 +05:30
ssh ssh kitten: Push and pop keyboard encoding flags 2026-02-07 20:26:28 -05:00
themes feat: add per-mapping --allow-fallback for layout-independent shortcuts 2026-03-25 19:34:13 +03:00
transfer run modernize 2025-11-11 17:09:37 +05:30
tui Fix creating default event loop on Python 3.14+ 2025-10-13 20:09:54 +08:00
unicode_input
__init__.py
runner.py