1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-27 10:54:40 +00:00

Fix things so that bindings are added to the keymap already created by

terminal initialization.
This commit is contained in:
Eric S. Raymond 1993-03-18 03:35:08 +00:00
parent 11838c0e24
commit c2f5843638
2 changed files with 21 additions and 15 deletions

View File

@ -30,8 +30,10 @@
(if (boundp 'news-fkey-prefix)
nil
(setq news-fkey-prefix (make-keymap)) ; "<ESC>O" commands
(define-key function-key-map "\eO" news-fkey-prefix)
;; The terminal initialization should already have set up some keys
(setq news-fkey-prefix (lookup-key function-key-map "\eO"))
(if (not (keymapp news-fkey-prefix))
(error "What? Your news termcap/terminfo has no keycaps in it."))
;; Termcap or terminfo will set these
;; (define-key news-fkey-prefix "P" [f1])

View File

@ -51,29 +51,33 @@
;; SS3 sequences - those that start with "\eO".
(if (boundp 'vt100-SS3-prefix)
nil
(define-prefix-command 'vt100-SS3-prefix)
(define-key function-key-map "\eO" 'vt100-SS3-prefix)
;; The terminal initialization should already have set up some keys
(setq vt100-SS3-prefix (lookup-key function-key-map "\eO"))
(if (not (keymapp vt100-SS3-prefix))
(error "What? Your VT100 termcap/terminfo has no keycaps in it."))
;; These will typically be set up automatically by termcap or terminfo
;; (define-key vt100-SS3-prefix "A" [up]) ; up-arrow
;; (define-key vt100-SS3-prefix "B" [down]) ; down-arrow
;; (define-key vt100-SS3-prefix "C" [right]) ; right-arrow
;; (define-key vt100-SS3-prefix "D" [left]) ; left-arrow
;; (define-key vt100-SS3-prefix "M" [kp-enter]) ; Enter
;; (define-key vt100-SS3-prefix "P" [kp-f1]) ; PF1
;; (define-key vt100-SS3-prefix "Q" [kp-f2]) ; PF2
;; (define-key vt100-SS3-prefix "R" [kp-f3]) ; PF3
;; (define-key vt100-SS3-prefix "S" [kp-f4]) ; PF4
;; (define-key vt100-SS3-prefix "p" [kp-0]) ; 0
;; (define-key vt100-SS3-prefix "q" [kp-1]) ; 1
;; (define-key vt100-SS3-prefix "r" [kp-2]) ; 2
;; (define-key vt100-SS3-prefix "s" [kp-3]) ; 3
;; (define-key vt100-SS3-prefix "t" [kp-4]) ; 4
;; (define-key vt100-SS3-prefix "u" [kp-5]) ; 5
;; (define-key vt100-SS3-prefix "v" [kp-6]) ; 6
;; (define-key vt100-SS3-prefix "w" [kp-7]) ; 7
;; (define-key vt100-SS3-prefix "x" [kp-8]) ; 8
;; (define-key vt100-SS3-prefix "y" [kp-9]) ; 9
;; Terminfo might set these
(define-key vt100-SS3-prefix "M" [kp-enter]) ; Enter
(define-key vt100-SS3-prefix "p" [kp-0]) ; 0
(define-key vt100-SS3-prefix "q" [kp-1]) ; 1
(define-key vt100-SS3-prefix "r" [kp-2]) ; 2
(define-key vt100-SS3-prefix "s" [kp-3]) ; 3
(define-key vt100-SS3-prefix "t" [kp-4]) ; 4
(define-key vt100-SS3-prefix "u" [kp-5]) ; 5
(define-key vt100-SS3-prefix "v" [kp-6]) ; 6
(define-key vt100-SS3-prefix "w" [kp-7]) ; 7
(define-key vt100-SS3-prefix "x" [kp-8]) ; 8
(define-key vt100-SS3-prefix "y" [kp-9]) ; 9
;; Neither termcap nor terminfo will set these
(define-key vt100-SS3-prefix "l" [kp-separator]) ; ,