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.