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 730157 - add support for xterm's modifyOtherKeys bindings
add support for xterm's modifyOtherKeys bindings
Status: RESOLVED DUPLICATE of bug 477068
Product: vte
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-05-15 01:32 UTC by dann
Modified: 2014-10-31 08:54 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description dann 2014-05-15 01:32:32 UTC
xterm with the modifyOtherKeys=2 option has key bindings for many key combinations that are not otherwise available in a terminal.

Emacs is one applications that benefits from these key bindings, 
C-. C-S-left and other kinds of bindings work and can be used, there's very little difference between the key bindings available in X11 mode vs the ones available in terminal mode.
Comment 1 Egmont Koblinger 2014-05-15 13:22:23 UTC
I guess then we'd need to support modifyOtherKeys=1 too.

In xterm, the mode is enabled by echo -ne '\e[>4;2m'

Probably the toughest part would be to exactly copy xterm's behavior. E.g. with US layout, Shift+1 sends a literal '!' character, while Shift+2 sends the escape sequence encoding Shift + 2 (^[[27;2;64~). Weird. Similar issues happen with AltGr+Shift non-US layouts where AltGr has a real purpose.

We'd need to watch out for non-US layouts, accented characters (Latin-1 are encoded properly, non-Latin-1 are dropped when pressed with modifiers rather than sending the Unicode value(?!)), state of Caps Lock, etc...

C-S-left can already be used in emacs without this mode, it already generates distinct escape sequence. C-. doesn't seem to be supported out of the box, so one would need such a terminal, plus hack around in emacs' configs, is that correct?
Comment 2 dann 2014-05-15 14:59:11 UTC
(In reply to comment #1)
> C-S-left can already be used in emacs without this mode, it already generates
> distinct escape sequence. 

Sorry, I misremembered, C-S-up and C-S-down do not have distinct sequences.

> C-. doesn't seem to be supported out of the box, so
> one would need such a terminal, plus hack around in emacs' configs, is that
> correct?

C-. is used by AucTex by default, so one would need to use that package to see it in use...

These were just some examples of the top of my head, there are many more.
I added support in emacs for these keys about 7 years ago...
Comment 3 Marius Gedminas 2014-10-31 08:52:33 UTC
Duplicate of 477068?
Comment 4 Egmont Koblinger 2014-10-31 08:54:06 UTC
Indeed.

*** This bug has been marked as a duplicate of bug 477068 ***