[Pkg-lxde-maintainers] Bug#539952: lxterminal doesn't pass Alt-number keys
Michael Tokarev
mjt at tls.msk.ru
Sun Apr 18 14:22:04 UTC 2010
18.04.2010 17:48, Michael Tokarev wrote:
> The bug #539952 is only partially fixed in 0.1.7-1.
> Before, only Alt+0 worked. In 0.1.7-1, Alt+2..Alt+0
> works (9 keys), but not Alt+1. Running just "cat" in
> the lxterminal and hitting Alt+2 - this produces
> "^[2", Alt+3 - "^[3" and so on, but for Alt+1 there's
> nothing produced.
>
> So it is still annoying when using irssi, but not THAT
> annoying as before :)
Some more information about this (should be forwarded upstream
I guess).
In src/lxterminal.c:terminal_newtab(), at the very end of it,
we see a call to term_set_swicth_accel(), which initializes
Alt+<TabNumber> key sequence to activate the newly created
tab. This routine (terminal_newtab()) gets called for _Every_
new tab, even for the first one. So we're getting Alt+1
always bound to "Switch to Tab#1" function, even if we only
have single tab and there's nothing to switch from/to.
The right solution is to bind both Alt+1 and Alt+2 when
creating SECOND tab instead, and unbind both when the
second tab gets closed (so we're with only one tab again).
This is actually exactly how gnome-terminal (for example)
works.
But for that, my knowlege of the code is too limited to
produce a fix. Should be trivial to do for the upstream,
however (hopefully anyway).
Thanks!
/mjt
More information about the Pkg-lxde-maintainers
mailing list