53 Commits

Author SHA1 Message Date
Kovid Goyal
c95418a947
Remove unused code 2017-12-05 20:21:13 +05:30
Kovid Goyal
c17c6cae4c
Support S8C1T mode
That is, eight bit control codes. When in S8C1T mode, kitty will send
only eight bit control codes to the client.
2017-12-05 20:21:12 +05:30
Kovid Goyal
e86c2f2000
Fix shift+up/down not generating correct escape codes
Fixes #186
2017-11-26 17:34:34 +05:30
Kovid Goyal
4dc6918b13
Get rid of the send_text_map code
Just transform send_text directives in the config file to map
directives.
2017-11-19 08:56:34 +05:30
Kovid Goyal
1f9acf99b0
Match extended keyboard protocol modifier bitmask with the CSIu protocol from xterm 2017-11-08 08:24:15 +05:30
Kovid Goyal
204b6fa3e8
Use nested switch statements for key lookup
Replace giant key look up table with nested switch statements.
A little slower, but reduces memory consumption and makes it easier to
add new keyboard modes in the future, if needed. Key lookup was not a
performance bottleneck, in any case.
2017-11-07 20:58:34 +05:30
Kovid Goyal
f137ea7094
Fix handling of alt (option) key on macOS
It now works just as in linux. i.e. alt+a sends <esc>a to the client.
No longer needs turning off alt to generate unicode at the OS level.
2017-11-07 16:19:37 +05:30
Kovid Goyal
34084e7ab5
Neaten up keys.h 2017-09-16 09:16:30 +05:30
Kovid Goyal
c5e989bc94
Move the key handler to C 2017-09-15 21:46:00 +05:30
Kovid Goyal
a4d71bcf5c
Move the text input callback to C 2017-09-15 18:33:45 +05:30
Kovid Goyal
b2c7272af1
Store key combos that need special handling in a table for fast lookup 2017-09-15 18:06:26 +05:30
Kovid Goyal
44c897a61a
Translate key presses to bytes using a lookup table 2017-09-15 10:45:27 +05:30
Kovid Goyal
b5af266b87
A spot of refactoring 2017-09-15 10:45:27 +05:30
Kovid Goyal
2de0c82f18
Fix incorrect full keyboard mode escape codes 2017-09-15 10:44:56 +05:30
Kovid Goyal
dd3af45043
Implement a send_text action to allow using keyboard shortcuts to send arbitrary text
Fixes #94
2017-07-23 14:37:15 +05:30
Kovid Goyal
3d5c65eaea
Fix #89 2017-06-21 10:19:45 +05:30
Kovid Goyal
ad21c7ed0f
Mimic behavior of xterm when pressing Ctrl+<key>
Where <key> is one of ,.;'-=

These dont map to control codes, xterm and libvte just ignore the Ctrl
and echo the key as if control was not pressed. Mimic that behavior
2017-05-22 21:09:20 +05:30
Kovid Goyal
38d2839206
Fix Ctrl+6 and Ctrl+/ not working
Fixes #79
2017-05-22 21:01:14 +05:30
Kovid Goyal
24d0bb8bd5
Allow IME to generate unicode characters using Alt+key which is used on OSX, I think 2017-05-20 12:01:50 +05:30
Kovid Goyal
08f336769f
Add tests for key mapping
Also fix Alt+Special keys no generating correct codes
2017-05-20 11:41:21 +05:30
Kovid Goyal
5525d4db49
Fix alt+key resulting in the upper case version of key even when shift is not pressed
Fixes #78
2017-05-20 08:47:02 +05:30
Kovid Goyal
defda41861 Use rmkx codes as basis for control+special key codes 2017-03-15 16:27:17 +05:30
Kovid Goyal
66c51798b8 Fix a regression that broke Ctrl+Left and Ctrl+Down
Fixes #56
2017-03-15 16:16:27 +05:30
Kovid Goyal
7d8e172ce2 Keyboard maps should be respected in extended keyboard mode as well 2017-02-12 14:27:03 +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
Kovid Goyal
211b771316 pep8 2017-02-11 10:02:48 +05:30
Kovid Goyal
d9563e52c8 Reduce size of encoded key event by using base64 encoding 2017-02-10 15:34:06 +05:30
Kovid Goyal
0f8b83755a Implement the extended keyboard protocol 2017-02-10 15:11:07 +05:30
Kovid Goyal
48a2a395c4 Spec for extended keyboard protocol 2017-02-10 11:34:38 +05:30
Kovid Goyal
142c883b0c Implement DECCKM 2017-02-05 15:30:16 +05:30
Kovid Goyal
ac53776ee4 Forgot a few keys in the localizes keys map 2017-01-12 19:59:57 +05:30
Kovid Goyal
a8408a1ce4 Fix keyboard shortcuts not being mapped correctly
On systems that remap their keys, for example, to use a DVORAK keyboard layout. Fixes #29
2017-01-12 13:56:56 +05:30
Kovid Goyal
dedaf6caf7 Fix Ctrl/Alt+key not working on systems with alternate keyboard layouts
Fixes #17
2017-01-12 10:17:21 +05:30
firenox89
e53c00339a add the enter key on the numpad to the key map 2017-01-10 22:33:42 +01:00
Kovid Goyal
0426aadaa5 Map Ctrl+Home,End,Delete to CSI sequences
Mimics behavior of xterm
2017-01-08 13:40:53 +05:30
Kovid Goyal
195b2c09de Send special CSI sequences for Ctrl+arrow keys
Mimics behavior of xterm. Fixes #15
2017-01-08 09:51:14 +05:30
Kovid Goyal
4e9b10c2bb Fix Ctrl/alt+] not working 2016-12-11 10:36:45 +05:30
Kovid Goyal
ee7f25c9ba ... 2016-12-05 10:30:04 +05:30
Kovid Goyal
620bbbccb6 ... 2016-12-05 08:58:32 +05:30
Kovid Goyal
ff83aa2730 Get rid of glfw_constants 2016-11-29 14:20:21 +05:30
Kovid Goyal
7fd15be071 Send the correct escape code for backspace 2016-11-29 12:36:37 +05:30
Kovid Goyal
27170a481f Define shifted variants for a few common keys 2016-11-24 12:57:37 +05:30
Kovid Goyal
bfeddfa35e Use the terminfo definition to setup keymaps
DRYer
2016-11-24 11:45:26 +05:30
Kovid Goyal
030228571c Implement keyboard shortcuts for paste 2016-11-21 13:49:01 +05:30
Kovid Goyal
7342367679 Split out the glfw constants into their own module so they can be used on Travis without needing glfw 2016-11-21 13:00:15 +05:30
Kovid Goyal
ee51e4d7cf ... 2016-10-31 13:14:36 +05:30
Kovid Goyal
027a9751c1 Fix TAB not working and add entry for backtab to terminfo 2016-10-31 12:03:21 +05:30
Kovid Goyal
e5293fba16 Implement keyboard input 2016-10-30 14:56:53 +05:30
Kovid Goyal
369bb39d2a oops 2016-10-21 06:38:07 +05:30