kitty/kittens/choose_files
Павел Мешалкин 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 Implement previews for plain text files 2025-07-20 19:24:17 +05:30
archive.go Add support for RAR archive preview 2025-11-27 09:33:15 +05:30
calibre.go Fully fix flicker on first use of calibre preview backend 2025-11-23 12:39:30 +05:30
cmd_preview.go ... 2025-12-05 19:56:55 +05:30
collection.go Implement mouse interaction with result list 2025-07-11 10:36:20 +05:30
ffmpeg.go Explicitly remove audio/subtitle and data streams when generating previews via ffmpeg 2025-12-02 18:51:33 +05:30
filters.go Work on filter support 2025-07-04 13:37:56 +05:30
footer.go Handle multiple save files when entering save file names 2025-07-11 21:47:11 +05:30
graphics.go Make image preview code re-useable for other types of previews that have both metadata and an image 2025-11-22 13:21:21 +05:30
image_preview.go Unify metadata formatting between vide and animated image previews 2025-11-24 20:02:20 +05:30
main.go kitten choose-files: Add a new binding of Alt+Enter to modify the name of an existing file when choosing a save file name 2026-01-26 11:50:08 +05:30
main.py feat: add per-mapping --allow-fallback for layout-independent shortcuts 2026-03-25 19:34:13 +03:00
preview.go choose files: Add arbitrary command based previews 2025-12-05 19:54:21 +05:30
results.go Modernize Go code 2026-03-21 08:41:47 +05:30
results_test.go Cleanup highlighting of positions in text and add some tests 2025-12-05 09:40:36 +05:30
save-file.go More debug prints 2026-02-22 16:44:57 +05:30
scan.go Move error handling code into its own library 2025-10-12 13:51:16 +05:30
scan_test.go run modernize 2025-11-11 17:09:37 +05:30
search-bar.go Implement metadata based previews in choose-files 2025-07-20 09:31:17 +05:30