Newsgroups: comp.windows.x
Path: cantaloupe.srv.cs.cmu.edu!crabapple.srv.cs.cmu.edu!bb3.andrew.cmu.edu!news.sei.cmu.edu!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!uwm.edu!msuinfo!uchinews!oddjob.uchicago.edu!ajaffe
From: ajaffe@oddjob.uchicago.edu (Andrew Jaffe)
Subject: Key definitions in Emacs + X
Message-ID: <1993Apr16.183525.25197@midway.uchicago.edu>
Sender: news@uchinews.uchicago.edu (News System)
Organization: University of Chicago, Astronomy and Astrophysics
Date: Fri, 16 Apr 1993 18:35:25 GMT
Lines: 42

Hi.

I use Emacs and I want to customize my keyboard better.
When I set up stuff in my .emacs with a keymap and define-keys,
I can only access certain of the keys on my X-Terminal's
keyboard. I can't get e.g. F10, Home, End, PgUp, PgDn; they all
seem to have either the same or no keycode. I have a feeling
this can't be fixed in emacs itself, but that I need to do some
xmodmap stuff. Can someone help me?

By the way, I've checked the X-FAQ and posted a similar message
to gnu.emacs.help to no response.

Currently I have the following in my .emacs file (inside a 'cond'):

 ((string-match "^xterm" (getenv "TERM"))
;; done by aj 8/92. I don't know what most of this does...
   (defvar xterm-map (make-sparse-keymap) "Keymap for xterm special keys")
   (define-key esc-map "[" 'xterm-prefix)
   (fset 'xterm-prefix xterm-map)
  ;;Keys F1 to F12
   (define-key xterm-map "224z" 'goto-line)        ;F1
   (define-key xterm-map "225z" 'what-line)        ;F2
   (define-key xterm-map "226z" 'rmail)            ;F3
   (define-key xterm-map "227z" 'replace-string)   ;F4
   (define-key xterm-map "228z" 'end-of-line)      ;F5
   (define-key xterm-map "229z" 'kill-line)        ;F6
   (define-key xterm-map "230z" 'yank)             ;F7
   (define-key xterm-map "231z" 'beginning-of-line);F8
   (define-key xterm-map "232z" 'end-of-line)      ;F9
   (define-key xterm-map "192z" 'scroll-down)      ;F11
   (define-key xterm-map "193z" 'scroll-up)        ;F12
 ;;Keys F10, up, down, etc. ??????? can't get the keys 
   (define-key xterm-map "-1z" 'set-mark-command))
)


-- 
Andrew Jaffe                                     ajaffe@oddjob.uchicago.edu
Dep't of Astronomy and Astrophysics, U. Chicago
5640 S. Ellis Ave                                (312) 702-6041
Chicago, IL 60637-1433                           (312) 702-8212 FAX
