From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: Slightly OT: Where are keycodes defined for emacs -nw in X-Windows? Date: Fri, 24 Oct 2003 19:25:02 GMT Organization: Level(3) Communications, Woburn, MA Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1067023992 12238 80.91.224.253 (24 Oct 2003 19:33:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 24 Oct 2003 19:33:12 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 24 21:33:08 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AD7gJ-0004fy-01 for ; Fri, 24 Oct 2003 21:33:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AD7f5-0001bR-BF for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Oct 2003 15:31:51 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!news.maxwell.syr.edu!newshosting.com!news-xfer1.atl.newshosting.com!news-out.visi.com!hermes.visi.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!news.level3.com.POSTED!53ab2750!not-for-mail Original-Newsgroups: gnu.emacs.help Mail-Copies-To: never X-Newsreader: trn 4.0-test72 (19 April 1999) Originator: barmar@genuity.net (Barry Margolin) Original-Lines: 34 Original-NNTP-Posting-Host: 171.78.176.30 Original-X-Trace: news.level3.com 1067023502 171.78.176.30 (Fri, 24 Oct 2003 19:25:02 GMT) Original-NNTP-Posting-Date: Fri, 24 Oct 2003 19:25:02 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:117597 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:13529 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:13529 In article , Alan Mackenzie wrote: >Emacs 21.1. > >In X-windows (running on GNU/Linux) I start emacs with "emacs -nw". If I >type up and [C-up], followed by C-h l `view-lossage', I see this: > >up produces ESC O A >[C-up] produces ESC [ 2 4 ~ > >However, my Emacs isn't set up to handle the [C-up] event-sequence. It >would seem I need to enhance my function-key-map somehow. > >Searching the info pages brought me to the page "Terminal Specific" in >the Elisp manual. Checking the environment variable TERM brought me to >the initalisation file ...../lisp/term/xterm.el. In this file, only a >small number (21) of function keys are defined, none of them with >modifiers (i.e. C- M- S- ....). > >Two questions: > >Where on X is the file which defines the relevant keytable, and what's >the name of the function in X which loads such a table (analogues of >/etc/default.keytab and loadkeys for the Linux console)? The translation from keycodes to escape sequences is done by the xterm terminal emulator, not Emacs. You can customize this by defining translations in your XTerm app-defaults resource file. See the xterm documentation for details on this. -- Barry Margolin, barry.margolin@level3.com Level(3), Woburn, MA *** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups. Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.