1

In Ubuntu Jaunty the Enter key is apparently translated to Ctrl-m symbol. I'd like to free Ctrl-m symbol from newline functionality to make it available for other commands. In this case I guess I should translate Enter to newline directly. How do I do that?

I'm talking about key reassignment in gnome-terminal.

Alex
  • 43,191
  • 44
  • 96
  • 127
  • Are you talking about a particular editor or program? – JAL Feb 19 '10 at 20:06
  • Related to this question? http://stackoverflow.com/questions/2298811/how-to-turn-off-alternative-enter-with-ctrlm-in-linux ... You mean in Emacs? I don't know what you mean by 'change the binding in Linux'. – JAL Feb 19 '10 at 20:07
  • Need more info to answer this question – Joel Feb 19 '10 at 20:56
  • @Code Duck: I mean in gnome-terminal. – Alex Feb 19 '10 at 21:22

1 Answers1

0

(global-set-key (kbd "<return>") 'newline)

Eric Warmenhoven
  • 2,942
  • 20
  • 17
  • @Eric: This thing doesn't work since terminal is sending ^m code for both Enter and Ctrl-m. So these keys are indistinguishable for any program running under the terminal (e.g. Emacs). Can I make the terminal send a code different from ^m when I hit Ctrl-m? – Alex Feb 19 '10 at 21:26
  • What would you have it send? Everything else that runs in the terminal is going to expect that ^m means enter, and vice versa. Unless if you want to be hitting Ctrl-m as you're typing into your shell, I don't recommend it. – Eric Warmenhoven Feb 19 '10 at 22:28
  • A different way of interpreting your question is, instead of making it so Enter sends something other than ^m, is for Ctrl-m to send something other than ^m. Unless you can change keybindings in your terminal, you're going to have a really hard time doing that. – Eric Warmenhoven Feb 19 '10 at 22:31
  • Yep, that's want: change Ctrl+m's binding from ^m to something else. – Alex Feb 19 '10 at 23:06