boohu icon indicating copy to clipboard operation
boohu copied to clipboard

waiting with [5] doesn't work w/o NumLock

Open kilobyte opened this issue 7 years ago • 2 comments

I'm afraid the fix for #18 is incomplete: if you press [5], you get:

Unknown key ' '. Type ? for help. Unknown key 'O'. Type ? for help. Unknown key 'E'. Type ? for help.

kilobyte avatar Sep 22 '18 03:09 kilobyte

Indeed, I could not implement waiting with 5 w/o numlock: with the tcell backend I wrongly get the code of 'O' for the key, and termbox doesn't even seem to have a predefined constant for that key, so I'm unsure what to do about it, as it seems this key is not handled by the backends. Waiting is still possible by typing dot. I could make the keypad dot key (supr) work too.

anaseto avatar Sep 22 '18 09:09 anaseto

I see what's going on: both current libvte and current xterm changed their code to middle arrow to "\e[E" — it used to be "\e[G" in cursor mode and "\eOu" (no '[') in application mode. I'm not sure where the O comes from, but it's possible that whatever mode your library sets the terminal to returns "\e[OE", per analogy with other arrows.

So the library would need to handle all four of these sequences.

kilobyte avatar Sep 22 '18 11:09 kilobyte