Open Neko-Box-Coder opened 1 month ago
Yeah, on Unix it is Alt-E
, with capital E (note that it is different from Alt-e
), since Shift-e
is the capital E letter.
This is one of many unfortunate consequences of all the legacy crap that Unix terminals have and the lack of standardization between them, as well as the lack of standardization between Unix and Windows terminals.
Yeah, right now I have 2 versions of keybindings (1 with Shift 1 without) that binds to the same action as a workaround so that I can use the same json for both Linux and Windows.
I will create a PR to fix this.
@JoeKar This is actually kinda similar to #3304 and the fix I am working on at the moment is to try both "Alt-E" and "Alt-Shift-E" if it is a capital letter and stop trying if we matched.
This is less important than #3304 (but slightly inconvenient) so I am not too fussed about getting this sorted quickly. But my question would be should tcell be producing consistent output for this as well, considering tcell is just spitting out whatever it receives and this count as the quirks with linux vs windows.
I assume that this is related to tcell
's input mode and how it receives the the key codes. Currently the terminal generates a Shift
+e
instead of a E
, which results in Shift-Alt-E
, while under Linux it receives the E
directly (without the Shift
) and this is then Alt-E
.
Maybe the situation would be different, when tcell
activates modeVtInput
, but this is just an untested guess.
Description of the problem or steps to reproduce
When using the same keybindings on Windows and Linux, one works and the other does not.
Given there are two keybindings that are the same but displayed differently
Alt-Shift-E
Alt-E
The first one works on Windows but not on Linux, vice versa for the second one.
I tried both by pointing it to empty config directory using
micro -config-dir ./tmp
and modifying the keybindings thereWhen running
raw
, I can see indeed it is capturing different thingsOn Linux
On Windows
Specifications
Commit hash: 1f51d0b9 (Windows) 91765082 (Linux) OS: Windows 11 and Arch Linux Terminal: WezTerm