0

I want to be able to bind a1,c1,a3,etc. keys in Midnight Commander. However, the keys are not being treated specially when numlock is off – they should map to the given symbols ("a1",etc.) in the keymap file, however instead, they resolve to "home", "end", "pgup", etc. In other words it is impossible to distinguish keypad keys (7,1,9 in the example with numlock off) from those normal keys (Home, End, Page Up). It seems like if the special meaning of 7,1,9,etc. keys (when numlock is off) has been hardcoded to be their default, labeled function (Home, End, Page Up).

What calls are needed (...to be suppressed) to S-Lang and/or ncurses to overcome this? I'm more interested in S-Lang, however ncurses answer will be good too.

psprint
  • 349
  • 1
  • 10
  • The behavior is terminal-dependent, and since there's no programming technique here, the question is off-topic. – Thomas Dickey Dec 05 '21 at 10:49
  • @ThomasDickey; Maybe not off-topic? Could I ask about tput here? I've tried tput smkx/rmkx, but all it does is that it changes the sequences of the numpad AND regular cursors, regular home/end/pgup/pgdown keys from `^[[A` to `^[[OA`, `^[[H` to `^[[OH`, etc. while the numpad still works either as numeric input OR as home/end/pg keys... – psprint Dec 09 '21 at 23:13
  • If the terminal/emulator doesn't implement application/normal keypad mode, tput doesn't have any effect. – Thomas Dickey Dec 09 '21 at 23:25

0 Answers0