Commit graph

21 commits

Author SHA1 Message Date
Kovid Goyal
9ea5441a2f
... 2026-03-26 09:39:33 +05:30
Павел Мешалкин
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
Anurag
37dc6e82e4 Add timeout option to key mappings 2026-02-24 16:02:07 +05:30
Arvin Verain
2199927cf1
docs: Small nits and fixes
- Fix unsetting var
- Use actual b64 value for 1
- Other small fixes for clarity
2026-01-22 08:19:41 +08:00
shfc
51a08d23cd
fix: typos in documentation 2025-12-14 22:42:24 +10:30
phanium
16104cf077 Fix nvim SetUsrVar autocmd for --remote-ui 2025-10-27 09:41:00 +08:00
Kovid Goyal
77074d627d
... 2025-10-06 21:36:36 +05:30
Kovid Goyal
e9fc486473
Fix #9075 2025-10-06 21:04:30 +05:30
Stefan A. Haubenthal
33f278b477 Fixed typos 2025-05-18 15:16:56 +02:00
Kovid Goyal
3b89c686e6
Remove spurious slash escaping in vimrc example 2024-12-20 20:51:43 +05:30
Kovid Goyal
e5a7554c30
Forgot to handle suspend/resume in example code for setting uservar in nvim 2024-03-26 22:04:08 +05:30
KaranveerB
19a9594143 Fix typo in mapping.rst 2024-03-14 23:01:27 -07:00
Kovid Goyal
9b8ee54034
better example of conditional key mapping 2024-01-29 21:58:10 +05:30
Kovid Goyal
cc0d6621a4
Also document how to set user vars from nvim 2024-01-25 14:27:55 +05:30
Kovid Goyal
04eafbea9b
Implement better syntax highlighting for the new map 2023-12-04 11:54:49 +05:30
Kovid Goyal
59e3b202b9
Update changelog 2023-12-03 21:11:52 +05:30
Kovid Goyal
a7bdbb11f2
Document the new modal keymaps 2023-12-03 21:09:26 +05:30
Kovid Goyal
77551cdfc1
Weird macOS docs build failure 2023-12-03 15:06:12 +05:30
Kovid Goyal
99995fd9dc
Remote control API for send-key 2023-12-03 13:23:01 +05:30
Kovid Goyal
74388b4183
A simple action to remap key presses sent to programs running in kitty 2023-12-03 13:08:53 +05:30
Kovid Goyal
f1fc2126bc
Refactor the mapping docs 2023-12-03 12:25:15 +05:30