3

In particular, if I type "C-M-SPC" gnome-terminal sends "M-SPC" to emacs. xterm does not have this problem.

Note that this is a different problem than the one where emacs keybindings conflict with menu access keys. This isn't a case of triggering gnome-terminal keybindings, but rather of gnome-terminal just eating one of the modifiers for specific keybindings.

1
  • with TRAMP, eshell and ansi-term, I really see no reason to use emacs in a console rather than in a graphical environment. Anyway, you can always remove the menubar from gnome-terminal but I've no idea for C-M-SPC.
    – Daimrod
    Jan 5, 2012 at 9:45

1 Answer 1

0

When Emacs runs in a terminal, its input is a series of characters. When Emacs runs using its graphical UI, its input is a combination of keypresses, giving it a vastly wider range of possible inputs. For instance, the keypress C-` (control backtick) can be bound to a function when Emacs is running with its GUI, but not from a terminal (even a terminal emulator, which is itself a graphical application), because there is no such character as Control-Backtick (not in ASCII, not in ISO-Latin-1, not in the Universal Character Set).

You are trying to send the non-existent character C-M-SPC from a terminal. The fact that xterm makes it work is nice, but you shouldn't expect every terminal to fake out Emacs' input so that you can press key combinations that do not map to real characters in a terminal.

2
  • Real terminals send Nul for C-SPC. Sending ESC NUL for C-M-Spc is the right thing
    – fstx
    May 3, 2012 at 16:53
  • @fstx, yes, and apparently gnome-terminal is deficient in this area. @user35742, nothing you can do inside Emacs will make C-M-SPC do the right thing in a gnome-terminal if it fails to do what @fstx describes.
    – Fran
    May 4, 2012 at 16:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .