27 November 2018

Midnight Commander function keys not working in some terminal emulators

Some terminal emulators have issues to properly work with some applications like midnight commander even if TERM settings are configured properly (I'm not sure why).
I'll use konsole as an example so you'll understand what to do:

In konsole go Settings -> Edit Current Profile -> Keyboard and create a new set of keybindings and change to the defaults of rxvt like above:

kf1=\E[11~, kf2=\E[12~, kf3=\E[13~, kf4=\E[14~,
kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~,
kf9=\E[20~, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~,

Source: I've used the ncurses faq for the keybindings