|
From: | Andreas Politz |
Subject: | Re: Possible to rebind C-m to a function? (like any other control key combo?) |
Date: | Sat, 29 Nov 2008 00:08:22 +0100 |
User-agent: | Mozilla-Thunderbird 2.0.0.17 (X11/20081018) |
seberino@spawar.navy.mil wrote:
On Nov 28, 6:04 am, Xah Lee <xah...@gmail.com> wrote:On Nov 27, 11:30 pm, "seber...@spawar.navy.mil" <seber...@spawar.navy.mil> wrote:There seems to be some special use for C-m as I cannot rebind it to a function of my choosing like start-kbd-macro. Is there anyway to make C-m into a "normal" combo I can bind like all the others?there are ways but that gets into pretty hairy emacs customization. Ctrl+m is same as Enter in emacs. Best to avoid rebinding it. Similar is Ctrl+i and Tab key.Thanks. If someone had done the work already I'd still like to do it. Why? C-i is sooo natural for an insert function and C-m is sooo natural for a macro function. Chris
You can do it, at least in a windowed emacs: (global-set-key [return] #'(lambda nil (interactive) (message "This is RETURN."))) (global-set-key [13] #'(lambda nil (interactive) (message "This is C-m."))) ;; undo (progn (global-unset-key [return]) (global-set-key [13] 'newline)) The problem, I think, is that most libraries end up binding C-m and not [return] (likewise for C-i and [tab]). So you have to always rebind after some mode has stolen the C-m key (to [return]). -ap
[Prev in Thread] | Current Thread | [Next in Thread] |