You are not logged in.

#1 2012-05-30 16:43:55

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

[Solved] midnight commander shift - fn keys not working

Hey guys since a few weeks the shift - fn keys aren't working with mc. I extensively use shift-f6 for renaming, and this issue is preventing me from using it.

There was a similar issue the previous year, caused by xkeyboard-config. But downgrading, or using the git version didn't fix it for me this time.

Can anyone else confirm this?

PS: I opened a bug report on mc bug tracker, but the dev said there is no such problem on his end.

Last edited by x33a (2012-06-25 17:22:06)

Offline

#2 2012-05-30 16:53:13

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,557
Website

Re: [Solved] midnight commander shift - fn keys not working

I ran into this when I used MC, and I found some solution ... I can't remember of the top of my head what it was.  I believe it had to do with the terminal and/or shell settings.

As a first test, do you get this same (lack of) behavior in a tty console and in a terminal emulator in X?  What term do you use?

Xterm has some settings to allow/disallow Fn keys going through to apps, I think by default it "eats" the function keys.  This could be part of the problem.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2012-05-30 17:17:48

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [Solved] midnight commander shift - fn keys not working

Hmm.. you are right. But instead of terminal, it's tmux. I tried it in plain urxvt, and the keys worked. But from within tmux, it's not working.

Investigating a bit, i found that i had changed $TERM to screen-256color in ~/.tmux.conf a few weeks back, since $TERM = screen was giving problems with vim colours.

Now, i'll either have to choose between this problem, or the vim problem ..

Meanwhile where should i report this bug?

Offline

#4 2012-05-30 17:30:30

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,557
Website

Re: [Solved] midnight commander shift - fn keys not working

I'm not sure it's really a bug.  If you tell tmux to act like an xterm, that's what it will do!

How did you set TERM in tmux.conf?  You shouldn't set the environment variable. 

You can set the tmux variable with

set -g default-terminal xterm-256color

Edit: you can also set this to rxvt-unicode-256color.  But either one works to get colors in vim while allowing Fn keys to pass.

On the other hand

export TERM=xterm-256color
mc

replicates your problem here, in or out of a tmux session.

Report this in the PEBKAC bug repository wink

Last edited by Trilby (2012-05-30 17:34:23)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2012-05-31 04:58:22

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [Solved] midnight commander shift - fn keys not working

Earlier when i used screen, i didn't have problem with $TERM = screen-256color.

Also, i do set the TERM in ~/.tmux.conf using set -g default-terminal <>

Anyway setting it to rxvt-unicode-256color does the trick. Thanks a lot for the help smile

Offline

#6 2012-06-25 17:21:41

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [Solved] midnight commander shift - fn keys not working

Just updating to inform that setting TERM=rxvt-unicode-256color brought other problems. I tried xterm-256color, it too gave problems. I had problems with transparency, some other keys not working etc.

tmux faq explicitly states:

most display problems are due to incorrect TERM! Before reporting problems make SURE that TERM settings are correct inside and  outside tmux.

Inside tmux TERM must be "screen" or similar (such as "screen-256color").

Outside, it must match your terminal: particularly, use "rxvt" for rxvt and derivatives.

So i switched back to screen-256color. As for the keys not working, i had to edit and compile a new terminfo for screen256-color.

I have added the instructions on the wiki.

https://wiki.archlinux.org/index.php/Tm … _Commander

Last edited by x33a (2014-02-07 11:05:51)

Offline

Board footer

Powered by FluxBB