From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Slightly OT: Where are keycodes defined for emacs -nw in X-Windows? Date: Fri, 24 Oct 2003 20:15:24 GMT Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1067027979 20139 80.91.224.253 (24 Oct 2003 20:39:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 24 Oct 2003 20:39:39 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 24 22:39:37 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 1AD8if-0000H4-00 for ; Fri, 24 Oct 2003 22:39:37 +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 1AD8bD-0004Vm-Dc for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Oct 2003 16:31:55 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!nntp.cs.ubc.ca!cyclone.bc.net!snoopy.risq.qc.ca!charlie.risq.qc.ca!53ab2750!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 32 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Original-NNTP-Posting-Host: 132.204.24.42 Original-X-Complaints-To: abuse@umontreal.ca Original-X-Trace: charlie.risq.qc.ca 1067026524 132.204.24.42 (Fri, 24 Oct 2003 16:15:24 EDT) Original-NNTP-Posting-Date: Fri, 24 Oct 2003 16:15:24 EDT Original-Xref: shelby.stanford.edu gnu.emacs.help:117601 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:13533 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:13533 > 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- ....). The sequences are poorly standardized, especially the ones with modifiers. That's why they're absent mostly. But since it generally doesn't hurt to add bindings to that table (as long as there's no collision between two different bindings for the same sequence), feel free to send patches to complete the table. In the Emacs-CVS code, I've added a binding for C-up but it uses a different sequence than yours (more specifically ESC [ 0 5 A). This is the binding I get on my GNU/Linux system. Obviously, different GNU/Linux systems will not necessarily all use the same sequence. > 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)? X is not directly at fault. The translation from C-up to a sequence of ASCII codes is done by your terminal emulator, so you need to look at the doc of your xterm, kterm, what-have-you-term, ... Then Emacs turns those sequences back into meaningful events based on the lisp/term/$TERM.el file but also based on the terminfo of your terminal. Stefan