kitty/kitty_tests
Павел Мешалкин 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
..
__init__.py Fix typo that caused OSC 3008 to set title rather than just be ignored 2025-11-17 12:23:10 +05:30
atexit.py Add integration test for go atexit implementation 2025-09-30 12:37:25 +05:30
CascadiaCode-Regular.otf
check_build.py Cleanup previous PR 2026-03-15 08:38:59 +05:30
clipboard.py Fix a regression that broke writing to the clipboard using the OSC 5522 protocol 2024-09-15 08:42:50 +05:30
command_palette.py Make showing of unmapped actions a runtime cached setting 2026-03-03 15:24:26 +05:30
completion.py remove leftover debug prints 2025-07-20 21:45:36 +05:30
crypto.py
datatypes.py Cleanup previous PR 2026-03-16 17:38:14 +05:30
file_transmission.py tests: apply os.utime to created symlinks too 2024-10-03 23:09:28 -04:00
FiraCode-Medium.otf
fonts.py Fix failing test 2026-02-24 09:53:06 +05:30
glfw.py
gr.py
GraphemeBreakTest.json Add support for Unicode 17 2025-10-18 09:59:53 +05:30
graphics.py Add tests for graphics protocol crash fixes (commits e9661f0 and 48ab623) 2026-03-23 03:39:38 +00:00
iosevka-regular.ttf
keys.py feat: add per-mapping --allow-fallback for layout-independent shortcuts 2026-03-25 19:34:13 +03:00
layout.py Implement maximize layout action for splits layout 2026-03-09 15:27:54 +05:30
LiberationMono-Regular.ttf
main.py Use clean HOME and CONF and CACHE dirs when running Go tests 2025-07-09 13:29:33 +05:30
mouse.py Fix line-at-once selection not extending wrapped lines into scrollback 2026-01-30 20:29:33 +05:30
multicell.py Fix selections test failing due to pixel scroll 2026-01-08 12:40:40 +05:30
notifications.py Ensure temp files and other resources are cleaned up even if kitty crashes or is SIGKILLed 2025-01-05 12:51:59 +05:30
open_actions.py
options.py fix: when parsing python_strings options, don't fail if ' is last 2025-09-06 20:33:15 +02:00
panels.py ... 2025-05-03 10:47:03 +05:30
parser.py Add parse test for CSI 14;2 t 2025-11-24 11:23:21 +05:30
screen.py Fix marker highlighting for CJK/wide chars not at position 0 2026-03-19 15:35:14 +05:30
search_query_parser.py
shell_integration.py Fix test failure with fish >= 4.1 2025-09-29 14:01:57 +05:30
shm.py
ssh.py Dont use subTest as it doesnt work with retry_on_failure 2025-04-07 05:22:15 +05:30
tui.py
twemoji_smiley-cff2_colr_1.otf Add basic colrv1 rendering test 2025-02-03 11:06:41 +05:30
utmp.py