Re: portable meta keybindings
Hello Aaron,
On Monday, April 10, 2006 at 13:04:55 -0500, Aaron Griffin wrote:
> bindings of the form "\e<up>" and "\e<down>", which work great _until_
> I swap down to the linux console, which doesn't seem to get these keys
> as meta combos.
You mean typing alt+arrows? Well, the Linux console seems to not
distinguish straight arrows from combinations with modifier keys... So
it might look impossible to bind alt+arrows. At first sight. ;-)
But I'm sure that the Linux console is flexible enough to fix such a
feature lack. Something around console tools, loadkeys, and keyboard
maps. Totally untested (and syntax might have changed since last time I
looked there):
| alt keycode 103 = F98
| alt keycode 108 = F99
| string F98 = "\033\033[A" # Meta_up
| string F99 = "\033\033[B" # Meta_down
> Should I also bind to the quoted-insert output of those keys?
No.
> What is the proper way to get this to work in all terminals?
Unfortunately I believe alt+arrows bindings have little chances to
be universally portable. You'll always have the risk to step on
terminals doing various things, like sending to the application:
· nothing
· straight arrow, as Linux console by default
· ESC arrow, as you would want
· some different specific sequence
· stealing the key for one of their own function, and sending nothing
bindable to the app running inside (like Linux console for alt+left and
alt+right sliding vconsoles)
Bye! Alain.
--
« if you believe kUP3/kDN3 is the solution, I've got a bridge to sell you. »