help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Binding C-m and RETURN seperately


From: Drew Adams
Subject: RE: Binding C-m and RETURN seperately
Date: Mon, 12 Apr 2010 14:03:00 -0700

If your RETURN (aka Enter) key sends a Control-M character, then you're out of luck: they are the same thing.
 
If your RETURN key sends something different, that is, if Emacs can distinguish what it sends from C-m, then you can distinguish in Emacs Lisp. You can bind [return] instead of C-m.
 
Same thing with TAB and C-i, etc. You can bind [tab] or C-i or both (to different things). But if your TAB key always sends C-i, then you cannot distinguish the two in Emacs Lisp. AFAIK.

I don't quite understand what this means - I have
(global-define-key (kbd "C-m") 'execute-extended-command)
but it also binds RETURN.  How do I make the input events distinguishable?  I'm not running emacs in a terminal.

Is there a way to bind C-m and return to different keybindings?
Yes, of course. The input events just need to be distinguishable for GNU Emacs.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]