Some keys are not properly recognized in Konsole/xterm



I love the ability to customize keybindings in 4.7. However, I've noticed some keys cannot be bound because they aren't recognized properly by Midnight Commander. When you hit an unrecognized sequence, mc will simply skip the escape sequence up to a point and print the rest of it.

I'm using Konsole, set to the xterm (XFree 4.x.x) keyboard, and $TERM is xterm. These are the key combinations that produce escape sequences but aren't recognized by mc. Everything else either works, or doesn't produce a distinguishable escape sequence so I won't expect it to work except if you use X. I've listed the escape sequences produced by Konsole (as seen with cat >/dev/null for example) and the gibberish text written by mc after failing to recognize the escape sequence:

Shift+Tab:
     Konsole: ^[[Z
     mc ignores the key and prints: Z

Alt+function keys:
     Konsole: ^[O3P ^[O3Q ^[O3R ^[O3S ^[[13;3~ ^[[17;3~ ^[[18;3~ ^[[19;3~ ^[[20;3~ ^[[21;3~ ^[[23;3~ ^[[24;3~
     mc ignores the key and prints: 3P 3Q 3R 3S 13;3~ 17;3~ 18;3~ 19;3~ 20;3~ 21;3~ 23;3~ 24;3~
Alt+Shift+function keys: Same but 4 instead of 3
Control+function keys: Same but 5 instead of 3
Control+Shift+function keys: Same but 6 instead of 3
Control+Alt+function keys: Same but 7 instead of 3
Control+Alt+Shift+function keys: Same but 8 instead of 3
(Function keys and Shift+function keys work properly)

Alt+Insert, Delete, Home, End:
     Konsole: ^[[2;3~ ^[[3;3~ ^[[1;3H ^[[1;3F
     mc ignores the key and prints: 2;3~ 3;3~ 1;3H 1;3F
Alt+Shift+Insert, Delete, Home, End: Same but the last number is 4 instead of 3
(Ctrl+Insert, Delete, Home, End surprisingly work)
Ctrl+Shift+Insert, Delete, Home, End: Same but the last number is 6 instead of 3
Ctrl+Alt+Insert, Delete, Home, End: Same but the last number is 7 instead of 3
Ctrl+Alt+Shift+Insert, Delete, Home, End: Same but the last number is 8 instead of 3

I'm using the mc package from Debian sid, version 3:4.7.0-1 on AMD64 with the following --version information:

    GNU Midnight Commander 4.7.0
    Virtual File System: tarfs, extfs, cpiofs, ftpfs, fish
    With builtin Editor
    Using system-installed S-Lang library with terminfo database
    With subshell support as default
    With support for background operations
    With mouse support on xterm and Linux console
    With internationalization support
    With multiple codepages support
    Data types: char 8 int 32 long 64 void * 64 off_t 64 ecs_char 8

Any tips on how to make these keys work? Which terminal emulator, keyboard setting and $TERM value work best for you? Should I create a ticket in the mc website about this?

Thank you very much in advance,
~Miguel
--
Antes de imprimir este correo electrónico, considera tu responsabilidad medioambiental.

Please consider your environmental responsibility before printing this email.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]