After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 608400 - enter is mapped to ^[OM in gnome-terminal
enter is mapped to ^[OM in gnome-terminal
Status: RESOLVED INVALID
Product: vte
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-01-29 00:32 UTC by Bernhard Koenig
Modified: 2015-01-20 22:10 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bernhard Koenig 2010-01-29 00:32:21 UTC
The problem is that my gnome-terminal maps ENTER to ^[OM in vim.

Reproduce:

1) open vim
2) press "i" insert mode
3) press CTRL-V
4) press ENTER

you get ^[OM which is wrong, it should be ^M. Another way to reproduce:

1) type into a terminal "info cat"
2) hit "/" to do a search
3) type anything and hit ENTER

you will get the error "[`ESC O m' is invalid]".

Compare with the Ubuntu bug https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/511742 , it seems that not all Ubuntu users experience this bug but I do. My keyboard is FujitsuSiemens Amilo laptop.
Comment 1 Christian Persch 2010-01-29 01:00:29 UTC
-> vte
Comment 2 Christian Persch 2012-10-08 20:05:59 UTC
Confirming that it does send ESC O M ; but I get the same result in xterm (r278) and urxvt.
Comment 3 Egmont Koblinger 2014-01-05 22:30:30 UTC
Bug 600659 comment 38 probably provides relevant technical info. The generated escape sequence might depend on:
- App Cursor Keys mode
- App Keypad mode
- whether it's the normal Enter or keypad Enter
- numlock status
- xkb config

I remember seeing similar issue a thousand times, but now I can't reproduce it with any terminals. I guess my (well, Saucy's) Xkb is the culprit, it is indeed broken in many ways.
Comment 4 Egmont Koblinger 2015-01-20 22:10:21 UTC
> I guess my (well, Saucy's) Xkb is the culprit

Correcting myself: I guess it's my brain-damaged laptop keyboard (see bug 600659 comment 67) that caused me not to see ESC O M -- that key incorrectly produces keycode 36 (the same as the "normal" Enter key), instead of 104.

After remapping, I see a behavior that's exactly the same as xterm's, namely it produces ESC O M if and only if Application Keypad Mode is enabled and Numlock is off.

(IMO anyone who thought that KP_Enter without numlock should do something different than Enter was totally nuts... but that's what xterm does, and so preferably that's what we should do too.)