48 Commits

Author SHA1 Message Date
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
Kovid Goyal
71e09ba1fb
Fix show_key kitten showing incorrect CSI encoding for F3 2022-12-01 23:33:08 +05:30
pagedown
ee4e9aa678
Add missing modifier key aliases 2022-08-09 12:15:55 +08:00
pagedown
ba0f61d752
Refactor: More f-string for kitty 2022-01-29 20:17:46 +08:00
Kovid Goyal
346ea8c8a0
Forgot to ad dmethod in previous commit 2021-11-28 12:01:09 +05:30
Kovid Goyal
77d7a6180f
unicode input kitten: Also allow using ctrl+number to switch tabs and pressing any modifier with the function keys 2021-11-17 12:17:46 +05:30
Kovid Goyal
6546c1da9b
run pyupgrade to upgrade the codebase to python3.6 2021-10-21 12:43:55 +05:30
Kovid Goyal
da3f34603a
DRYer 2021-10-12 07:41:52 +05:30
Kovid Goyal
86ce11134a
Unicode input kitten: Fix a regression in 0.20.0 that broke keyboard handling when the num lock or caps lock modifiers were engaged.
Fixes #3587
2021-05-07 06:55:25 +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
Ravi R Kiran
953253de99 Implementation of hyper and meta 2021-03-30 14:23:17 -05:00
Kovid Goyal
015fe9054e
Fix shifted keys not matching shortcuts in kittens
Broke after keyboard refactoring for new keyboard protocol. Now a key
event will match a shortcut specification if either the mods and key
match or mods without shift and shifted key match. Fixes #3314
2021-02-14 07:52:08 +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
654cd54363
Add the ISO level 3 and 5 shift keys to functional keys 2021-01-19 09:11:44 +05:30
Kovid Goyal
5c2056a7cb
Fix parsing of + as a shortcut 2021-01-17 19:56:32 +05:30
Kovid Goyal
cf04a5a036
Add tests for encode/decode roundtripping 2021-01-16 20:52:15 +05:30
Kovid Goyal
e09ed038e2
Port key handling in more kittens
Also fix decoding of enter/f3 key events
2021-01-16 20:52:15 +05:30
Kovid Goyal
027c5a57f1
Work on porting kittens to use new key infrastructure
Also move type definitions into their own module
2021-01-16 20:52:14 +05:30
Kovid Goyal
34db18ea0a
Also transmit key events when broadcasting 2020-12-01 14:11:50 +05:30
Kovid Goyal
efca2658ea
Fix typing issues pointed out by updated mypy 2020-10-12 23:03:07 +05:30
Kovid Goyal
382c31ddf2
Use a stub rather than TYPE_CHECKING 2020-03-15 13:27:40 +05:30
Kovid Goyal
d3f37eeba4
more typing work 2020-03-14 11:42:05 +05:30
Kovid Goyal
ce94a9b2df
More typing work 2020-03-11 09:35:59 +05:30
Kovid Goyal
27524bfc3d
Restore global key definitions so as not to break third party kittens that might use them 2020-03-03 15:06:10 +05:30
Kovid Goyal
8843ded1c9
Refactor key encoding
Cannot have key names in global namespace as not all key names are valid
python identifiers. So move them into a dict.
2020-03-03 14:54:30 +05:30
Luflosi
b2d428618c
Add circumflex (^) key 2019-12-22 18:41:07 +01:00
Kovid Goyal
41b0f8852f
Only update config_key_map with those entries in key_name_aliases that exist in ENCODING 2019-09-15 04:24:32 +05:30
Kovid Goyal
67f2ec2421
Merge branch 'keyboard_improvement' of https://github.com/Luflosi/kitty 2019-09-14 10:17:35 +05:30
Kovid Goyal
17fd749e8d
Add some aliases when parsing config files for common key name variations 2019-09-08 19:28:41 +05:30
Luflosi
f3be5b5e57
Regenerate automatically generated key_encoding.py and keys.h 2019-09-08 12:32:20 +02:00
Luflosi
e619eb9cbb
Add more keyboard keys 2019-09-08 12:32:19 +02:00
Luflosi
7c52dd2bd8
Fix update_encoding() not filtering GLFW_KEY_LAST_PRINTABLE
b3b830bb5ffb8f42d5e2367e5aab03579be3a45f did not actually make `update_encoding()` filter `GLFW_KEY_LAST_PRINTABLE` because `name` contained the key name after applying `symbolic_name()`, which replaces underscores with spaces. Instead of replacing the underscore in `LAST_PRINTABLE` with a space, I moved the check above the call to `symbolic_name()`. This is more readable and future-proof in my opinion.
2019-09-08 12:32:18 +02:00
Luflosi
481047a446
Format kitty/key_encoding.py with yapf 2019-09-01 17:53:52 +02:00
Luflosi
b3b830bb5f
Make adding more printable keys slightly easier
When adding keys after `GLFW_KEY_UNDERSCORE`, one now needs to change a `#define` right below the last printable key instead of changing it elsewhere in the code.
This commit now also marks `GLFW_KEY_PLUS` and `GLFW_KEY_UNDERSCORE` as printable characters.
2019-09-01 11:24:14 +02:00
Luflosi
b68e3c85b9
Add missing MENU key to key_encoding.py 2019-08-30 12:37:23 +02:00
Luflosi
ef25d5bbd5
Fix update_encoding() not adding the last key 2019-08-30 12:36:37 +02:00
Kovid Goyal
a51239c6ae
Add support for the underscore key found in some keyboard layouts
Fixes #1639
2019-05-24 17:59:50 +05:30
Luflosi
a792c94ccf
Use python3 shebang for all python scripts
Fixes #1624.
Use python3 shebang for all python scripts as python still defaults to python2 on many systems.
2019-05-20 14:44:24 +02:00
Kovid Goyal
a8ad4461a1
Create a kitten to demonstrate the kitty extended keyboard protocol 2019-01-20 14:38:19 +05:30
Kovid Goyal
3f2489b306
Linux: Handle keyboards with a "+" key
Adds a plus key to glfw so that it can be mapped as a shortcut. Fixes #1224
2018-12-13 09:56:30 +05:30
Kovid Goyal
de4384a420
tui: Use correct key names for enter and backspace keys 2018-05-24 15:23:34 +05:30
Kovid Goyal
a33ebce3c9
diff kitten: Add keybindings to scroll by a page 2018-05-24 15:17:03 +05:30
Kovid Goyal
4b259dd719
diff kitten: Make the keyboard shortcuts configurable
Fixes #563
2018-05-23 13:10:32 +05:30
Kovid Goyal
168bc58635
The kittens learn about mice 2018-02-07 12:40:04 +05:30
Kovid Goyal
35f1658f4a
Key and text handler for the kittens 2018-02-06 20:58:46 +05:30
Kovid Goyal
72125701f5 No need ot build the key map on every startup 2017-02-11 10:48:36 +05:30
Kovid Goyal
a66d2b0890 Ensure the extended keyboard protocol key encoding is stable
Also use base85 instead of base64 for keyname encoding to reduce average
length
2017-02-11 10:41:04 +05:30