kitty/kittens/diff
Павел Мешалкин 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 Update codebase to Python 3.10 using pyupgrade 2025-02-03 10:56:50 +05:30
collect.go Use SIMD to replace C0 control codes in Go code 2025-07-21 08:54:22 +05:30
collect_test.go Rename go module from kitty -> github.com/kovidgoyal/kitty 2025-05-16 08:43:39 +05:30
diff.go run modernize 2025-11-11 17:09:37 +05:30
highlight.go Make various goroutines panic-safe 2025-10-09 07:17:53 +05:30
main.go Rename go module from kitty -> github.com/kovidgoyal/kitty 2025-05-16 08:43:39 +05:30
main.py feat: add per-mapping --allow-fallback for layout-independent shortcuts 2026-03-25 19:34:13 +03:00
mouse.go diff kitten: Fix wheel_scroll_multiplier not being respected 2025-10-01 17:07:47 +05:30
patch.go Modernize Go code 2026-03-21 08:41:47 +05:30
patch_test.go diff kitten: Use a words based algorithm for intra line changed region highlighting 2026-03-04 09:06:37 +05:30
render.go Add an option to control highlighting of moved lines 2026-03-12 12:59:46 +05:30
search.go Make various goroutines panic-safe 2025-10-09 07:17:53 +05:30
ui.go kitten diff: Fix incorrect rendering if diff completes before terminal responds to capabilities query 2025-09-02 11:29:55 +05:30