8

After updating Mac OS X to 10.6.3 the arrow keys do not work in MC anymore - instead of moving the cursor it types, for instance, B for down key, C for right key. Although, if I quit MC and try it in terminal, it works.

Has anyone experienced this problem? Is there any solution for this?

alex
  • 18,247

7 Answers7

1

I had the same problem and just solved it. For me, it was not libncurses -- I tried libncurses from Mac OS X 10.6.2 and I also tried GNU ncurses (compiled GNU ncurses and subsequently and re-compiled and linked Midnight Commander (4.7.1) against the GNU ncurses). Both attempt were futile.

I even changed the Terminal.app, which did not solve my problem either.

Finally, I simply removed the preferences file for Terminal.app. Quit Terminal.app, delete ~/Library/Preferences/com.apple.Terminal.plist, launch Terminal.app and start Midnight Commander. For me, this worked like a charm :-)

I tracked the problem down a bit further. In Terminal's preferences I usually make a copy of the "Pro" settings and make two modifications to "Pro Copy": I set the background to solid black (instead of black transparent) and I want the window to close when the shell exits. Whenever I make these two changes, the cursor keys become incredibly slow in Midnight Commander. As long as I use the standard "Pro" settings, MC works fine.

1

Or just use this: http://rudix.org/packages-mn.html#mc - MC version 4.7

Leszek
  • 11
1

I had a similar problem when running mc via SSH on a Qnap QTS from MacOS terminal, with arrow keys turning into ABCD letters. No other methods helped but what I've found on another site:

export TERM=xterm before starting mc in the terminal

Destroy666
  • 12,350
3ftomi
  • 26
0

It seems Apple broke the built-in ncurses (a library used by terminal-based tools that repaint the full terminal screen). If you built MC via Fink or MacPorts, there are probably adjustments you can make to the build environment to make sure it links against the Fink or MacPorts version of ncurses, instead of the system version of ncurses.

More information here: http://www.opensource-archive.org/showthread.php?p=199981

...or Google 10.6.3 ncurses.

Spiff
  • 110,156
0

I solved the problem by adding the bellow line to .profile

alias mc='/usr/local/Cellar/midnight-commander/4.8.24/bin/mc'

0

Sorry for not answer the question.

But I came here searching on Google how to get the arrows working in mc for navigation in and out of directories (as they did in the old days).

Edit ~/.config/mc/mc.keymap

[panel]
CdChild = ctrl-pgdn; Right
CdParent = ctrl-pgup; Left

Now you can move into a directory with the Right arrow key and move out (to the parent) with the Left arrow key.

0

Copying /usr/lib/libncurses.5.4.dylib from a 10.6.5 machine to the 10.6.3 machine solved the problem for me.

(This was done as a quick fix to get a specific ncurses program -- namely CGSecurity's TestDisk -- to work. Of course upgrading to 10.6.5 might be a good idea regardless.)

Ilya
  • 1,814