~yujiri/sufec#18: 
Investigate escape code differences

Chloe and I discovered that many of the keybinds don't work in xterm, including backspace, which is likely because of a 0x08/0x7f mismatch. Figure out what the right thing to do is about these differences.

Status
REPORTED
Submitter
~yujiri
Assigned to
No-one
Submitted
3 years ago
Updated
2 years ago
Labels
terminal

~yujiri 3 years ago

The other thing we found not working in term is alt-numbers, which print various characters instead (alt-1 is the plus/minus sign, alt-2 is superscript 2).

xfce4-terminal seems to work the same as alacritty.

i noticed that in alacritty and xfce4-terminal $TERM is set to xterm-256color while in xterm it's just set to xterm, but i tried changing alacritty's config to set $TERM to xterm and all the keys still worked

~yujiri 3 years ago

In terminator: same behavior as xfce4-terminal.

In tilda: $TERM is xterm-256color, ctrl-arrow works, backspace works, alt-num doesn't work but also doesn't type anything.

In urxvt: $TERM is rxvt-unicode-256color, ctrl-arrow doesn't work, backspace and alt-num work.

In kitty: $TERM is xterm-kitty, all keys work.

In lxterminal and konsole: $TERM is xterm-256color, all keys work.

~yujiri 3 years ago

So what i'm finding is that hwhile most terminals support the keys the same way as alacritty, difference is common enough that we should design around it. maybe have alternate keybinds for everything.

but backspace/delete is harder. people need backspace and delete to function properly, and that's not something we can solve by providing an alternative key that does the same thing - terrible UX.

~yujiri 3 years ago

It's come to my attention that in xterm, ^H works in cat. In alacritty ^H does not work in cat. This suggests it's not just reading keysyms, it is reacting to knowledge of the terminal quirks somehow, and we should figure out how to do that.

~yujiri 3 years ago

More findings: ctrl-8, in alacritty, works as backspace. I would've thought ctrl-8 sent 0x08. In xterm, it types "^?", which I believe means 0x7f. But get this: in fish, in either terminal, ctrl-8 and ctrl-H both work as backspace and ctrl-? seems to be "clear line".

In cat, in either terminal, ctrl-? types "^_".

Register here or Log in to comment, or comment via email.