Ticket #3344 (new defect)

Opened 3 years ago

Last modified 3 years ago

screen+mc: keys up/down skipping

Reported by: shamilbi Owned by:
Priority: major Milestone: Future Releases
Component: mc-core Version: 4.8.13
Keywords: mc screen up down Cc: egmont@…
Blocked By: Blocking:
Branch state: no branch Votes for changeset:


since version 4.8.9 mc skips some keys up/down
1) start screen (or tmux)
2) start mc (version > 4.8.8)
3) press UP (or DOWN) several times (some of them will be skipped)

Change History

comment:1 Changed 3 years ago by egmont

  • Cc egmont@… added

I don't face this with screen/tmux, however, I've found something probably closely related.

mc under st (suckless's terminal) doesn't immediately react to keypresses, you need to press e.g. the Down arrow 3 times and then suddenly it goes down by 3 lines, making it totally unusable.

This behavior also started with mc-4.8.9. Looking at the NEWS file, #2988 seems to be the only relevant change. Probably screen/tmux/st send the characters with some weird timing (e.g. a minor pause between the bytes) which causes trouble.

comment:2 Changed 3 years ago by egmont


What's your $TERM? Does the bug occur to you if you set it to xterm? (Normally it should be screen or screen-256color.)

Do you have mouse working inside screen? Is your mc buggy if you start without mouse support ("mc -d")?

Launch "strace -o /tmp/mctrace mc" and from another terminal check the file size of /tmp/mctrace a few times. Does it settle at a certain file size, or does it grow endlessly even when you don't use mc?

In st I've noticed the following (note: st sets TERM=st-256color, and does not support mouse at all):

When stracing, the trace reveals continuous activity, including trying to open /dev/gpmctl, even when mc seems to be idle.

Either setting TERM=xterm, or starting as "mc -d" makes the bug go away: input works as expected, and its strace only grows when you do something inside mc.

comment:3 Changed 3 years ago by shamilbi

configure option --with-gpm-mouse=no solved the problem, checked it on TERM=linux and TERM=xterm

Note: See TracTickets for help on using tickets.