From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Horomnea Newsgroups: gmane.emacs.help Subject: Re: bind the Ctrl-m key but not bind return Date: Thu, 20 Sep 2007 11:47:38 +0300 Message-ID: <46F233AA.8000104@softexperience.ro> References: <46F0E229.1070601@softexperience.ro> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1190277790 26666 80.91.229.12 (20 Sep 2007 08:43:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 20 Sep 2007 08:43:10 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 20 10:43:10 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IYHcn-0005GK-Rl for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Sep 2007 10:43:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IYHcl-0007UW-Pk for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Sep 2007 04:43:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IYHcT-0007ST-VL for help-gnu-emacs@gnu.org; Thu, 20 Sep 2007 04:42:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IYHcQ-0007OZ-Nx for help-gnu-emacs@gnu.org; Thu, 20 Sep 2007 04:42:45 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IYHcQ-0007OS-D6 for help-gnu-emacs@gnu.org; Thu, 20 Sep 2007 04:42:42 -0400 Original-Received: from host1.softexperience.ro ([193.25.112.246]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IYHcP-0001RX-TP for help-gnu-emacs@gnu.org; Thu, 20 Sep 2007 04:42:42 -0400 Original-Received: from [82.76.41.169] (helo=[192.168.0.100]) by host1.softexperience.ro with esmtpa (Exim 4.52) id 1IYHcL-00031J-Mb for help-gnu-emacs@gnu.org; Thu, 20 Sep 2007 11:42:37 +0300 User-Agent: Thunderbird 1.5.0.5 (X11/20060719) In-Reply-To: <46F0E229.1070601@softexperience.ro> X-PopBeforeSMTPSenders: automat@reclamatii-sesizari.ro, contact@reclamatii-sesizari.ro, cursuri@crystalmind.ro, cursuri@limbistraine.net, office@hostme.ro, office@limbistraine.net, office@print-facturi.ro, office@softexperience.biz, office@softexperience.ro, project@softexperience.ro, reports@hostme.ro, reports@print-facturi.ro, stefan@softexperience.biz, stefan@softexperience.ro X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host1.softexperience.ro X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - softexperience.ro X-Source: X-Source-Args: X-Source-Dir: X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:47695 Archived-At: 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 >