From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: the matt Newsgroups: gmane.emacs.help Subject: Re: Setting Keyboard bindings for C-Right Date: Sun, 05 Aug 2007 14:53:34 -0700 Organization: http://groups.google.com Message-ID: <1186350814.126331.299400@i13g2000prf.googlegroups.com> References: <1186252220.919077.220730@x40g2000prg.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: sea.gmane.org 1186353670 28250 80.91.229.12 (5 Aug 2007 22:41:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 5 Aug 2007 22:41: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 Mon Aug 06 00:41:08 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 1IHomY-0001CV-Q9 for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Aug 2007 00:41:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IHomM-0004wC-Hc for geh-help-gnu-emacs@m.gmane.org; Sun, 05 Aug 2007 18:40:54 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!i13g2000prf.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 60 Original-NNTP-Posting-Host: 72.174.72.227 Original-X-Trace: posting.google.com 1186350814 760 127.0.0.1 (5 Aug 2007 21:53:34 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sun, 5 Aug 2007 21:53:34 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060313 Fedora/1.5.0.1-9 Firefox/1.5.0.1 pango-text,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: i13g2000prf.googlegroups.com; posting-host=72.174.72.227; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Original-Xref: shelby.stanford.edu gnu.emacs.help:150768 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:46342 Archived-At: On Aug 5, 2:11 pm, Peter Dyballa wrote: > Am 04.08.2007 um 20:30 schrieb the matt: > > > Any help in translating "ESC [ 1 ; 5 C" into an emacs keybinding would > > be much appreciated. > > You could look into xterm.el - it has lines like: > > (define-key map "\e[1;5C" [C-right]) > > The whole block, starting with > > (let ((map (make-sparse-keymap))) > > has a comment > > ;; xterm from X.org 6.8.2 uses these key definitions. > > and ends with > > ;; Use inheritance to let the main keymap override those > defaults. > ;; This way we don't override terminfo-derived settings or > settings > ;; made in the .emacs file. > (set-keymap-parent map (keymap-parent function-key-map)) > (set-keymap-parent function-key-map map)) > > Could be it's worth to patch .el with the 300 lines > from xterm.el. > > -- > Greetings > > Pete > > There is no national science just as there is no national > multiplication table; what is national is no longer science. > -- Anton Checov Thanks Pete, That's the pointer that I was needing In the end I added the following to my .emacs file (right, wrong or indiferent, it's what I did, and where I put it): (define-key function-key-map "\e[1;5C" [C- right]) (define-key function-key-map "\e[1;5D" [C- left]) (global-set-key [(C-right)] 'forward- word) (global-set-key [(C-left)] 'backward-word) Thanks again, Matt