Ticket #1769 (new defect)

Opened 13 years ago

Last modified 11 years ago

ncurses screen library: no ctrl/shift-key recognized

Reported by: gotar Owned by:
Priority: minor Milestone: Future Releases
Component: mc-tty Version: 4.7.0-pre4
Keywords: Cc: anton.bugs@…
Blocked By: Blocking:
Branch state: no branch Votes for changeset:


When compiled with ncurses(w) ctrl/shift-keys (like arrows in editor) are not recognized at all.

Change History

comment:1 Changed 13 years ago by anton_kg

  • Cc anton.bugs@… added

I'm experiencing about the same issue with 4.7 release. The shift key is not recognized with ncurces then I want to rename a file, for example. Shift+F6 press is actually trying to delete a file.

comment:2 Changed 13 years ago by E.L.K.

It seems i found the solution for this problem. I'm not sure that this is "right" solution, but it works, and maybe will be useful in diagnosing source of it.

Described here: http://7ocb.blogspot.com/2010/03/screen-midnight-commander-shift-f6.html

comment:3 Changed 13 years ago by angel_il

please show result of
echo $TERM

comment:4 Changed 13 years ago by gotar

  • Priority changed from major to minor

anton_kg, E.L.K.: no, you are talking about something entirely different; your shifts ARE recognized (which is obvious as some behaviour changes), but misinterpreted (see #367). This is caused by using different shift-Fx 'wrap' policy: one is to max out the range (F1-12 shifted == F13-24), the other is to be natural for humans (i.e. in terms of decimal shift: F1-12 shifted == F11-F22, thus doubling F11==shift-F1 and F12==shift-F2). You can go to Options->Learn keys and teach mc to treat F18 (this is what you get as input) as 'Function key 16'.

angel_il: my TERM is plain xterm. When I hit shift-F1 to F10 under mc/ncurses (either in command line or mcedit) i got this: 2P2Q2R2S28~29~31~32~33~34~. I can teach mc to recognize these:


but there's no place to teach it that ^[[1;2A is shift-up. With slang as screen library the same sequences ARE recognized well. I suspect that ncurses uses only terminfo database, which doesn't contain such combos.

I've just checked 4.7.1 and nothing has changed. But the main question is: what's the point of using/having this screen library at all? Why/when slang is not superior?

comment:5 Changed 11 years ago by andrew_b

  • Branch state set to no branch
  • Milestone changed from 4.7 to Future Releases
Note: See TracTickets for help on using tickets.