2430 Commits

Author SHA1 Message Date
Mitchell Hashimoto
fb9dc74b29 input: lot more Kitty encoding logic 2023-08-17 08:55:37 -07:00
Mitchell Hashimoto
91ba53b081 input: KittySequence for encoding sequences 2023-08-17 08:43:40 -07:00
Mitchell Hashimoto
c5177f6609 input: begin kitty key encoding logic (not working yet) 2023-08-16 22:08:16 -07:00
Mitchell Hashimoto
b42178bf34 input: add kitty keymap data 2023-08-16 22:08:05 -07:00
Mitchell Hashimoto
9717f6c832 Merge pull request #293 from mitchellh/mrn/macos-dead-code
macOS: remove dead code from PrimaryWindowController
2023-08-16 22:06:05 -07:00
Thorsten Ball
0597b03fa2 macOS: remove dead code from PrimaryWindowController
I think this is a left-over from the refactor that moved this field to
the `PrimaryWindowManager`.
2023-08-17 07:04:46 +02:00
Mitchell Hashimoto
f60066a64d terminfo: add fullkbd for kitty keyboard protocol 2023-08-16 17:31:05 -07:00
Mitchell Hashimoto
af4ede40f1 terminal: implement CSI = u for setting kitty keyboard flags 2023-08-16 17:31:05 -07:00
Mitchell Hashimoto
a9d7e0eb7f terminal: parse kitty query, push, pop keyboard flags 2023-08-16 17:31:05 -07:00
Mitchell Hashimoto
c80b1bed75 terminal: add Kitty key flags, stack 2023-08-16 17:31:04 -07:00
Mitchell Hashimoto
07d722b77e bindings should not use consumed modifiers
Over time, they probably should, but GTK is a bit too aggressive right
now with consumed modifiers and I need to take a closer look at that.
2023-08-16 17:09:17 -07:00
Mitchell Hashimoto
20ddf51d2c Merge pull request #292 from mitchellh/fixterms
Implement the "fixterms" keyboard input spec
2023-08-16 14:36:10 -07:00
Mitchell Hashimoto
9cef09c58d input: do not send ctrl-sequences for ctrl-i,m,[ 2023-08-16 14:17:31 -07:00
Mitchell Hashimoto
2ff2e018ba input: clarify why we use all mods for unicode CSI u 2023-08-16 14:04:38 -07:00
Mitchell Hashimoto
dcf9cdd8bf input: CSI u encoding for modified unicode chars 2023-08-16 13:57:17 -07:00
Mitchell Hashimoto
33bef28850 rename key2callback to keycallback 2023-08-16 13:40:57 -07:00
Mitchell Hashimoto
4e8f5d3997 remove charCallback/keyCallback 2023-08-16 13:39:44 -07:00
Mitchell Hashimoto
dd385cc633 apprt/glfw: convert to new key2callback 2023-08-16 13:34:31 -07:00
Mitchell Hashimoto
cd90b2a716 apprt/embedded: only call new key2callback 2023-08-16 13:26:22 -07:00
Mitchell Hashimoto
896d0e8fcf apprt/gtk: only use key2callback 2023-08-16 13:02:31 -07:00
Mitchell Hashimoto
83ba2b9825 apprt/gtk: clean up keyval_unicode usage 2023-08-16 12:51:00 -07:00
Mitchell Hashimoto
1a918bc64b apprt/gtk: call new key2callback using the all-in-one key event 2023-08-16 12:48:48 -07:00
Mitchell Hashimoto
c254a8b09e input: encoding should always write to the buf 2023-08-16 12:48:48 -07:00
Mitchell Hashimoto
aadb78394b input: legacy encoding never emits sequence during dead key state 2023-08-16 12:48:48 -07:00
Mitchell Hashimoto
9b90692fc7 core: start on key2Callback for the new callback that uses KeyEncoder 2023-08-16 12:48:48 -07:00
Mitchell Hashimoto
a2d4e7ce29 input: legacy key encoding handles alt-as-esc for general utf8 2023-08-16 12:48:48 -07:00
Mitchell Hashimoto
871f797758 input: KeyEncoder handles the charCallback stuff now too 2023-08-16 12:48:48 -07:00
Mitchell Hashimoto
6555bb1410 input: KeyEncoder legacy encoding handles old keyCallback logic 2023-08-16 12:48:48 -07:00
Mitchell Hashimoto
f57fd99d3e input: starting to work on KeyEncoder, got ctrl sequences 2023-08-16 12:48:48 -07:00
Mitchell Hashimoto
62081a51b0 core: add KeyEvent 2023-08-16 12:48:48 -07:00
Mitchell Hashimoto
01282d3d15 core: process fixterms sequences for modified unicode characters 2023-08-16 12:48:48 -07:00
Mitchell Hashimoto
759ae94f15 macos: do not send ctrl or super into UCKeyTranslate
see comment
2023-08-16 12:48:48 -07:00
Mitchell Hashimoto
e74a173704 apprt/gtk: translate keyval if there is no utf8
This is the same fix as #287 but for GTK.
2023-08-16 12:47:51 -07:00
Mitchell Hashimoto
8ca8da38d8 Merge pull request #291 from mitchellh/grapheme-sel
Fix multiple bugs related to selecting, copying grapheme clusters
2023-08-15 15:57:26 -07:00
Mitchell Hashimoto
40c8fa4907 Merge pull request #288 from mitchellh/push-pop-mode
Save/restore CSI sequences (CSI ? s, CSI ? r)
2023-08-15 15:34:44 -07:00
Mitchell Hashimoto
9e27dcdec9 font: shaper doesn't split run on selection if selection splits grapheme 2023-08-15 15:32:10 -07:00
Mitchell Hashimoto
c8d1745791 terminal: selection string must include grapheme data 2023-08-15 14:55:43 -07:00
Mitchell Hashimoto
67fb8d9bd4 terminal: do not crash if selecting a wide spacer on a soft-wrapped line 2023-08-15 14:38:13 -07:00
Mitchell Hashimoto
6a4b25714a terminal: add a test to verify our grapheme state is what we expect 2023-08-15 13:55:35 -07:00
Mitchell Hashimoto
ab68569281 renderer/opengl: fix compilation for new modes style 2023-08-15 13:33:06 -07:00
Mitchell Hashimoto
d0bf6a914f termio: on restore mode we need to call setMode no matter what 2023-08-15 11:47:31 -07:00
Mitchell Hashimoto
06f82ad713 terminal: parse and handle save/restore mode (CSI ? s, CSI ? r) 2023-08-15 11:43:07 -07:00
Mitchell Hashimoto
951aa00c63 terminal: move to new modes struct 2023-08-15 11:30:33 -07:00
Mitchell Hashimoto
c5439ca516 Merge pull request #287 from mitchellh/macos-key
apprt/embedded: keycallback should use nomod text to determine key
2023-08-15 11:15:36 -07:00
Mitchell Hashimoto
2b2b23dcf6 apprt/embedded: keycallback should use nomod text to determine key
To determine the logical key that was pressed, we previously just
trusted that the translated text would have the right value. But if
modifiers are pressed, the text may not translate.

For example on macOS, Ctrl+C does not produce any text. As a result, we
would fall back to the physical key. On layouts like Dvorak, the
physical key for "C" is "I". This means "Ctrl+C" sequences weren't
working.

Instead, if there is no text or the text doesn't map to a key, we
translate again using no modifiers to try to get the raw text of the
input and then base the key on that.
2023-08-15 11:13:01 -07:00
Mitchell Hashimoto
716c343f07 terminal: ModeState can save/restore one set of modes 2023-08-15 08:43:25 -07:00
Mitchell Hashimoto
e467a48df0 terminal: working on new modes storage abstraction 2023-08-15 08:43:24 -07:00
Mitchell Hashimoto
d27bc1f0fe termio: send VT220 device attributes on request, add secondary 2023-08-15 08:21:48 -07:00
Mitchell Hashimoto
2e54a825bf modify keys state 2 depends on some scenarios
Trying to port xterms logic...
2023-08-14 21:17:12 -07:00
Mitchell Hashimoto
28ff9118b0 Merge pull request #286 from mitchellh/modify-keys-ctrl
modifyOtherKeys state 2 should send sequences for all chars
2023-08-14 18:18:59 -07:00