-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keys on the numpad not working properly in gnome-terminal #2406
Comments
What terminal are you using and what is $TERM set to? That commit will cause issues if your TERM is actually incorrect (like saying konsole is "xterm"), but that's to be expected. |
It's a gnome-terminal 3.14.2 and
It's a stock Ubuntu 15.04 setup, basically. |
try setting $TERM to either "gnome-256color", "gnome-2012", "vte-2014" or "vte-256color". |
@faho Either I am doing it wrong, or is does not work with any of these. I was using It does not work in xterm with |
Try setting it in the terminal configuration, not config.fish. |
Doing it according to this post: http://askubuntu.com/a/578798/27683 leads to:
for all the four values you suggested. |
With Gnome-Terminal 3.16.2 and current git fish I can reproduce this with TERM=xterm-256color, but enabling numpad (i.e. pressing the actual key) makes it work. I don't get the error with different TERM, but it doesn't seem to help much. I'll need to test some more. |
@faho It might be, because my computer does not have a physical num lock key. I had to jump through some hoops to get it working generally. See this AskUbuntu question by me: http://askubuntu.com/a/637680/27683 |
Okay, I've tested again. TERM doesn't change the numpad stuff (though backspace only works with TERM=gnome-*, which seems like it describes the actual terminal, or by setting the compatibility option). That only happens when numpad is deactivated (which it was when I first launched gnome-terminal). It seems like gnome-terminal sends weird character sequences for these keys when numpad is disabled, which e.g. konsole doesn't (it always sends the characters "/", "*" and such). Now, we should probably add these things to our default bindings. In the meantime, try adding a |
Hi, |
Yeah, but the issue is that, as far as I can tell, these particular escape sequences aren't documented anywhere, in particular not in terminfo, which is supposed to be the database for this stuff. We've had some changes a week or so ago related to the "st" terminal where @zanchey committed a patch to let fish set "application keypad mode" (or the other mode, I forgot - it sends the "smkx" escape) for itself (which affects more than just the numpad, in particular the arrow keys) and remove it for applications (which should then set it again if they want). This is the commit that @TimWolla bisected to. Now it appears gnome-terminal in this mode starts caring about the X11 (?) keyboard setting (or at least that's what my testing appears to show - I press the numpad toggle and it toggles between sending the right and the wrong thing). It (or VTE) also by default sets TERM=xterm (or xterm-256color in later VTE versions) but then doesn't behave like xterm - by default the sequence for backspace is wrong. We can of course hardcode these escapes (like we've done for a bunch of others), but this has two downsides:
|
For the moment I went with:
Thanks. |
Is the "\e" necessary? IIRC I tested it with bare "Ok" and it worked. |
It is. Without the \e it would not let me type “Ok”, but instead replace On 19.09.2015 21:47, Fabian Homborg wrote:
|
That is super annoying. The I'm going to back the |
Should be fixed with 9788566. |
Whenever I press
+
,-
,*
,/
or return on my numpad instead of inserting the proper character two letters appear:Ok
,Om
,Oj
,Oo
,OM
in the order of the keys above.Using git bisect revealed that this commit introduced the issue: a66d440
The full bisection log is as follows:
The text was updated successfully, but these errors were encountered: