A
A
Ajex2015-09-19 18:34:17
linux
Ajex, 2015-09-19 18:34:17

How to reassign the Num 5 button in linux mc so that when it is pressed, file browsing opens like in Far Manager?

For many years I had to work with Far Manager under Windows, I got used to using the numeric keypad for navigation. In far, using the central button Num5, you can open the file for viewing. It is very convenient to open a file for viewing with the middle finger, I'm very used to it.
Now I have to work a lot in mc (Linux). I really miss this feature. In mc, the Num5 button stupidly causes the console to freeze for a couple of seconds (there is even a description of this behavior in the bugtrack https://www.midnight-commander.net/ticket/3136). I can not reassign the button with regular means. Tried different versions of mc, incl. collected from the latest sources - the behavior is the same.
Debian Jassie XVFM4 system
Personally, I know 2 ways to solve this problem, but I did not manage to get one to work as it should:
1). Remap combination to mc.keymap . However, there is not even a sequence to describe the name Num5 . It is described differently in different sources.
Somewhere KP_5 (this is when numlock is pressed) KP_Begin (when not) or KEY_B2 . After analyzing the mc sorts, I came to the conclusion that this combination is not even described in any way there.
2). Remap globally via xmodmap:
xmodmap -e "keysym KP_Begin = F3"
option almost works, the button is remapped, but the problem is that for some reason Num Lock is not taken into account, i.e. with Numlock On, instead of 5, F3 is again emulated, which is inconvenient. Here's how to make xmodmap respect the NumLock state.
I would be grateful if you tell me how to make the Num5 button work to open files in mc (with NumLock disabled)?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Ajex, 2015-09-20
@Ajex

Seems to have decided. AVKor , Nadz Goldman thanks for the tips. the casket is just opened.
Options - Learn keys - [ Function key 3 ] press Enter , asks to enter a new combination - press Num5 (with namlock disabled), save - voila!
We have the opening of files by the middle button of the numpad and the digital 5-ku with the included namloka.
I will add a little that this combination is stored in the file (~/.config/mc/ini) in this form:
[terminal:xterm]
f3=\\e[E
respectively, you can reassign any combination to the ESC sequence, which can be found using the method above ( via Learn Keys)
for example, I could not resist and hung up Alt-F7 on the search (the force of habit is such), simply adding to the same section ( [terminal:xterm] ) the line:
alt-question=\\e[18\;3~

N
Nadz Goldman, 2015-09-20
@nadz

Enjoy the solution.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question