2

I want to bind C-= in Emacs but Emacs sees it as "=". Emacs is 24.3 running in gnome-terminal on Ubuntu 14.10. xev sees that Control is pressed but C-v C-= in bash prints only "=". I assume that either Unity, GTK or gnome-terminal is swallowing the key but do not know how to look further.

My first thought was that Ctrl++ ("Zoom In") could be failing to pass the key through when the shift modifier is not pressed. However, the other size adjustment keys can be captured and disabling this shortcut does not help.

Terminology note: Emacs and Bash use the prefix C- to indicate holding Ctrl. Gnome uses Ctrl+. I've mixed them in my description as appropriate.

  • I notice the same problem in iTerm2 on Mac OS X, along with several other keys (e.g. C-< and C-> produce the unshifted "," and "." only). Perhaps a readline/bash/termcap issue? – Sam Brightman Jan 30 '15 at 16:03
0

This seems to be an issue from the bash terminal, not from emacs. I posed a similar question here: How to use CTRL+HOME in the terminal?

Basically, you can test with $ hexdump -C which keys you could use and which you could not. In your example, I indeed get only the = and + when running those commands in a bash terminal. Emacs doesn't get them at all. You can test it also if you run emacs in a graphic environment, in those cases, I could get the correct codes.

My personal solution so far is to accept it and look for other key combinations, because I will continue working on the terminal.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.