Thread View: gnu.epoch.misc
2 messages
2 total messages
Started by Admin
Sun, 07 Apr 1991 15:20
Help with keymaps
Author: 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
=======================================================================
Re: Help with keymaps
Author: Alan M. Carroll
Date: Mon, 08 Apr 1991 19:13
Date: Mon, 08 Apr 1991 19:13
28 lines
2071 bytes
2071 bytes
In article <m0jPbXT-0000VzC@p1so.uucp>, daemon@tut.cis.ohio-state.edu (Admin) writes: > 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). > [ ... ] > (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 We have an ISC 2.0.2 system here, and I played around with this a bit. It appears that the keys you are having problems with don't generate strings in an xterm or under Epoch. What you probably want to do is use (rebind-key) to set those keys to generate the appropriate sequences, e.g. (rebind-key "Insert" 0 "\C-[[2~") P.S. It seems strange to me that some of the problem keys have a trailing ~ and others do not. Is this deliberate? -- Alan M. Carroll <-- Another victim of applied metaphysics Epoch Development Team Urbana Il. "I hate shopping with the reality-impaired" - Susan
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads