Article View: gnu.epoch.misc
Article #2122Help with keymaps
From: Admin
Date: Sun, 07 Apr 1991 15:20
Date: Sun, 07 Apr 1991 15:20
96 lines
4510 bytes
4510 bytes
My friends,
Below I have a lisp routine to set the xterm function keys (running
on a ISC 2.2 system with the MetroLink X11R4 release) which ignores
the definitions in the second group of define-keys (Insert, Home, etc).
Here are the observations I have made:
0. Running epoch 3.2 with no patches applied (if there is any).
1. Worked ok with emacs (non-X11 gen'd) in an xterm without the boundp
for epoch.
2. This code was lifted and modified from something called at386.el
which works ok on non xterm, virtual sreens under emacs-18.55.
3. Noticed that when running a non-X11 emacs, these definitions echoed
the key-sequence in the minibuffer when run from an xterm. The
working keys do not do that under epoch (not complaining ;->, just
an observed difference). In fact, my mailer still is using this
emacs and I just noticed it again.
4. boundp returns ``t'' on xterm-esc-b-map but keymapp does not.
5. I am loading a byte-compiled file from my .emacs which contains
this code. Nothing else, at present, is in the .emacs.
6. Window manager is TWM and epoch is launched from a menu, i.e.,
"epoch" f.exec "epoch&". However, launching from the shell in
the xterm makes no difference.
The resources I have for epoch in .Xdefaults:
#
# epoch Defaults
#
epoch.screen.geometry: 80x43
epoch*background: LightSlateBlue
epoch*foreground: white
epoch.screen.cursor.color: yellow
epoch*font: 6x10
If it isn't obvious, I'm awfully new at this, but I did buy the
emacs lisp manual, so I'm trying to catch up! I am simultaneously
requesting to be added to the mailing list in a separate msg soon
as I get through here, so if this is only echoed to the mailing
list for replies, I may miss it ;-/
Any help, explanations, fixes or improvements gratefully accepted.
All the best, pappy
(if ( or (string-match "xterm" (getenv "TERM"))
(boundp ' epoch::version)
)
(progn
;; Function key bindings for XTerm
(defvar xterm-esc-b-map (make-sparse-keymap)
"Keymap for XTERM ESC-[ encoded function keys")
(define-key esc-map "[" xterm-esc-b-map)
(define-key xterm-esc-b-map "11~" 'find-file) ; F1
(define-key xterm-esc-b-map "12~" 'save-buffer) ; F2
(define-key xterm-esc-b-map "13~" 'find-file-other-window); F3
(define-key xterm-esc-b-map "14~" 'other-window) ; F4
(define-key xterm-esc-b-map "15~" 'delete-other-windows) ; F5
(define-key xterm-esc-b-map "17~" 'isearch-forward-regexp); F6
(define-key xterm-esc-b-map "18~" 'isearch-backward-regexp); F7
(define-key xterm-esc-b-map "19~" 'replace-regexp) ; F8
(define-key xterm-esc-b-map "20~" 'shell) ; F9
(define-key xterm-esc-b-map "21~" 'dired) ; F10
(define-key xterm-esc-b-map "23~" 'compile) ; F11
(define-key xterm-esc-b-map "24~" 'rmail) ; F12
(define-key xterm-esc-b-map "2~" 'yank) ; Insert
(define-key xterm-esc-b-map "8" 'beginning-of-buffer) ; Home
(define-key xterm-esc-b-map "5~" 'scroll-down) ; Page Up
(define-key xterm-esc-b-map "9" 'end-of-buffer) ; End
(define-key xterm-esc-b-map "6~" 'scroll-up) ; Page Down
;; XTERM cursor arrows
(define-key xterm-esc-b-map "A" 'previous-line) ; up
(define-key xterm-esc-b-map "B" 'next-line) ; down
(define-key xterm-esc-b-map "C" 'forward-char) ; right
(define-key xterm-esc-b-map "D" 'backward-char) ; left
)
)
--
=======================================================================
John "pappy" Dashner :Tandem Computers Incorporated: Southern Region
Unix System V/386 3.2.2: Home of Southern Fried Unix : +1 404 951-0199
jmd@p1so.UUCP : dashner_john@tandem.com : jmd@wa4cyb.UUCP
=======================================================================
Technical Details
Message-ID:
<m0jPbXT-0000VzC@p1so.uucp>Path:
arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!samsung!uunet!tut.cis.ohio-state.edu!daemonShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc7ee,bf0a7c1bbd34ebdb,start X-Google-Attributes: gidfc7ee,public X-Google-ArrivalTime: 1991-04-07 22:09:43 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!samsung!uunet!tut.cis.ohio-state.edu!daemon From: daemon@tut.cis.ohio-state.edu (Admin) Newsgroups: gnu.epoch.misc Subject: Help with keymaps Message-ID: <m0jPbXT-0000VzC@p1so.uucp> Date: 7 Apr 91 15:20:22 GMT Distribution: gnu Organization: GNUs Not Usenet Lines: 96