59 Commits

Author SHA1 Message Date
Kovid Goyal
d7ce3eb66e Keyboard events: Fix turning on only the "Report all keys as escape codes" enhancement not reporting modifier+enter/tab/backspace using escape codes 2025-01-12 19:11:19 +05:30
Kovid Goyal
dd249df5eb Dont encode enter, tab and backspace when lock mods are set
Otherwise user cant type reset when num lock is set.
2025-01-01 06:10:47 +05:30
Kovid Goyal
b2391553f9 Keyboard protocol: Fix the Enter Tab and Backspace keys generating spurious release events even when report all keys as escape codes is not set
Fixes #7136
2024-02-18 11:12:24 +05:30
Kovid Goyal
d4c5b8c899 Keyboard input: Fix text not being reported as unicode codepoints for multi-byte characters in the kitty keyboard protocol
Fixes #6167
2023-04-09 22:57:40 +05:30
Yuxin Wu
832506d785 move is_modifier_key to glfw.c and expose in Python 2022-12-30 23:32:46 -08:00
Kovid Goyal
cd92d50a0d Keyboard protocol: Remove CSI R from the allowed encodings of the F3 key as it conflicts with the *Cursor Position Report* escape code 2022-12-24 10:32:28 +05:30
pagedown
74921c1373 Refactor: Sorting items when generating files
Make the files generated in different environments consistent.
2022-01-29 20:14:56 +08:00
Kovid Goyal
0f7f69c218 move menu case outside auto-generated section 2022-01-11 22:57:05 +05:30
Kovid Goyal
f9171a767c Also document menu key encoding 2022-01-11 22:48:53 +05:30
Kovid Goyal
34e939f9a1 Encode menu key the same as xterm in legacy mode
See #597
2022-01-11 22:44:56 +05:30
Kovid Goyal
828e16b45d ... 2021-10-07 13:59:19 +05:30
Kovid Goyal
be34af4555 Remove inline from .c files
It is ignored by compilers and hides unused static functions
2021-08-03 09:11:17 +05:30
Kovid Goyal
74c1e02274 Remove redundant F1-F4 defs in cursor key more 2021-05-07 15:20:26 +05:30
Kovid Goyal
efb0f6f24a Fix a regression in 0.20.0 that sent incorrect bytes for the F1-F4 keys in rmkx mode
Fixes #3586
2021-05-07 15:09:42 +05:30
Kovid Goyal
db719eafac Remove num/caps locks from modifier processing in mouse events 2021-04-14 10:08:33 +05:30
Kovid Goyal
a4db27a807 Ignore the lock modifiers in legacy mode 2021-04-13 21:35:18 +05:30
Kovid Goyal
15f4c476c3 Ignore locked mods for legacy encoding in a few more places 2021-04-13 10:01:16 +05:30
Kovid Goyal
a7c5b8c634 Fix #3471 2021-04-13 09:53:57 +05:30
Kovid Goyal
4c644b8556 Add NumLock and CapsLock reporting to the keyboard protocol 2021-04-13 07:10:00 +05:30
Kovid Goyal
c989a7198b Add support for the keypad Begin key
Fixes #3468
2021-04-11 07:58:27 +05:30
Kovid Goyal
777b9eb68e Merge branch 'hyper' of https://github.com/orki/kitty 2021-04-03 06:15:55 +05:30
Kovid Goyal
0372242d12 Use an enum for UTF8 decoder state 2021-03-31 15:19:27 +05:30
Ravi R Kiran
953253de99 Implementation of hyper and meta 2021-03-30 14:23:17 -05:00
Kovid Goyal
14b33a845e Avoid compiler warning about using main as a variable name 2021-02-21 11:20:10 +05:30
Kovid Goyal
56fcbb95ab Key encoding: in legacy mode use legacy encoding for a few more combinations
Some legacy terminal applications get confused seeing CSI u escape
codes. Since it is relatively common to press ctrl or shift and
space/enter/tab/backspace, emit the same bytes as traditional terminals
do for these common keys.
2021-02-21 11:14:25 +05:30
Kovid Goyal
de100ac67c DRYer 2021-02-20 11:39:31 +05:30
Kovid Goyal
5675944c0c Recognize remaining ASCII keys for legacy mode as well 2021-02-15 05:33:57 +05:30
Kovid Goyal
19b882a0bd Also handle : as a legacy ASCII key
Fixes #3315
2021-02-15 05:24:21 +05:30
Kovid Goyal
de0f225c45 Fix #3299 2021-02-09 22:10:40 +05:30
Kovid Goyal
fc175732e1 Fix CodeQL warning 2021-01-24 12:48:47 +05:30
Kovid Goyal
60e589f775 Recognize Hyper key
Also use only one implementation for detecting if a key is a modifier
key
2021-01-21 05:33:14 +05:30
Kovid Goyal
f6d4b8e0b0 typo 2021-01-20 18:30:22 +05:30
Kovid Goyal
5fafd70b0f Fix detection of ASCII control chars in key event text 2021-01-20 17:35:24 +05:30
Kovid Goyal
dcfeab8461 Remove un-needed code
Space is now handled as legacy ascii key
2021-01-20 16:08:15 +05:30
Kovid Goyal
2a8e8d4b38 Fix #3252 2021-01-20 16:02:28 +05:30
Kovid Goyal
654cd54363 Add the ISO level 3 and 5 shift keys to functional keys 2021-01-19 09:11:44 +05:30
Kovid Goyal
16005d43e8 Dont send unknown keys that dont generate text
Fixes #3249
2021-01-19 09:01:52 +05:30
Kovid Goyal
b08c93032b ... 2021-01-19 08:58:06 +05:30
Kovid Goyal
dd08896c70 Lock keys should not be sent to applications in legacy mode 2021-01-19 08:55:01 +05:30
Kovid Goyal
39da92d8ab Now that glfw reports shifted keys, use it when encoding key events 2021-01-17 11:14:44 +05:30
Kovid Goyal
d45d553eaf When using a non-US keyboard layout and pressing ctrl+key when the key matches an English key in the default layout, send that to the program running in the terminal automatically
See #2000
2021-01-17 08:25:19 +05:30
Kovid Goyal
1016586611 Fix compiler warning 2021-01-17 07:28:22 +05:30
Kovid Goyal
86ce72e725 Port the Cocoa backend to use unicode key numbers 2021-01-16 20:52:16 +05:30
Kovid Goyal
0163bf3edb Fix enter/tab/backspace not being reported in all keys mode 2021-01-16 20:52:15 +05:30
Kovid Goyal
0714fd376b Fix handling of ctrl key in legacy mode
Also change the glfw constants used for the modifiers to match those
used in the terminal encoding. Less likely to make mistakes translating
that way.
2021-01-16 20:52:14 +05:30
Kovid Goyal
39f41faf9f Dont send events for modifier keys unless in all key mode 2021-01-16 20:52:14 +05:30
Kovid Goyal
c421fd56be Ensure typing in shell works in disambiguate mode 2021-01-16 20:52:14 +05:30
Kovid Goyal
47a901385f Implement reporting of all keys as escape codes with text 2021-01-16 20:52:13 +05:30
Kovid Goyal
819bd5cd70 Tests for alternate key reporting 2021-01-16 20:52:13 +05:30
Kovid Goyal
753ad68ca9 Add tests for event type reporting 2021-01-16 20:52:13 +05:30