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

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

Re: bind the Ctrl-m key but not bind return


From: Stefan Horomnea
Subject: Re: bind the Ctrl-m key but not bind return
Date: Thu, 20 Sep 2007 11:47:38 +0300
User-agent: Thunderbird 1.5.0.5 (X11/20060719)

Ok, I got it.

You put something like this in the map file you load with loadkeys:
control keycode 50 = F2

that means ctrl + m will send the F2 key.
and in your .emacs file you put:

(define-key globalmap [(f2)] 'my-command)

So, I use an additional function key (F2) for linking the ctlr+m stuff to it.

Maybe it could be done more ellegant, that's the solution I've found. But pay attention: in X (fedora and red had) probably won't work, because X settings override the keymap file somehow.
But in X you can use xmodmap.




Stefan Horomnea wrote:
Hello,

I really needed to bind Ctrl-M key to some command, but if I bind it, i've seen that return is also bind to that command.
So, I did some research and ctrl-m IS return.

I solved this problem in KDE like this:
- that command is bound to Ctrl-`
- I used kcontrolcenter to translate my input of ctlr-m in ctrl-`

And I used this solution for 2 years or so. But now I want to use emacs over ssh, meaning i won't have X or KDE. And I am very used and pleased with my Ctrl-m shortcut.

Is there any solution ? Maybe using loadkeys command and .keymap file in linux ? But how ?

Thank you,
Stefan


_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs





reply via email to

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