On Thu, Jan 10, 2013 at 04:29:08PM +0000, Mihail Zenkov wrote:
> I also find in https://www.midnight-commander.org/wiki/roadmap:
>
> > Use KDGKBENT ioctl on Linux console to find the mapping for shifted functional keys.
> > Two mappings are widely used (Shift-F1 = F11 and Shift-F1 = F13). mc should
> > adjust the keys to the mapping.
>
> In this case this problem in mc. But Roberto say:
> > From this point, we have a problem because in terminfo definition you can
> > not specify what values generate the terminal for shifted and "controled"
> > versions of these keys. So any program that test such combinations are not
> > portable by definition.
>
> Any know how this case can by detected for x-terminals?
It can't be detected. You posted how mc has dedicated definitions for each
terminal. In your case was:
/usr/share/mc/mc.lib:
[terminal:linux]
f15=\\e[28~
[terminal:xterm]
f15=\\e[28~;\\e[15\;2~
I suppouse mc look what terminal is running (using $TERM) and do dedicated
things for it. Since mc don't have support for st (yet ;)), the only
solution you have is doing local modifications to your config.h and get a st
similar to your xterm. Like I said, this kind of things are not portable,
and some sequences will work for you, but will not work for others. I
usually avoid this kind of binding due to this problem.
It is similar to the case of arrow keys in emacs, Shift-left doesn't work in
emacs under st with TERM=st, but it works in st with TERM=xterm (and I am
pretty sure is not a problem of the definition of terminfo).
Received on Fri Jan 11 2013 - 11:07:15 CET