diff options
| author | Karoly Lorentey | 2005-05-14 01:56:59 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-05-14 01:56:59 +0000 |
| commit | 133fe4c8a2d944324dc2c9a42b01ab1d258ad49d (patch) | |
| tree | b63ccb3d3a4bcec635a6eaa0df93eb87b19945bf | |
| parent | 892f9671ada52150f280915fb34970b7acb0312a (diff) | |
| download | emacs-133fe4c8a2d944324dc2c9a42b01ab1d258ad49d.tar.gz emacs-133fe4c8a2d944324dc2c9a42b01ab1d258ad49d.zip | |
Speed up `emacsclient -t' on xterms. (by suggestion of Dan Nicolaescu)
* lisp/term/xterm.el: Speed up load time by protecting
`substitute-key-definition' and `define-key' calls against multiple
execution.
* lisp/term/rxvt.el: Ditto.
* lisp/term/lk201.el: Ditto.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-345
| -rw-r--r-- | lisp/term/lk201.el | 139 | ||||
| -rw-r--r-- | lisp/term/rxvt.el | 146 | ||||
| -rw-r--r-- | lisp/term/xterm.el | 442 |
3 files changed, 368 insertions, 359 deletions
diff --git a/lisp/term/lk201.el b/lisp/term/lk201.el index b207e13b0a5..e09b176ba8f 100644 --- a/lisp/term/lk201.el +++ b/lisp/term/lk201.el | |||
| @@ -1,74 +1,87 @@ | |||
| 1 | ;; -*- no-byte-compile: t -*- | 1 | ;; -*- no-byte-compile: t -*- |
| 2 | ;; Define function key sequences for DEC terminals. | 2 | ;; Define function key sequences for DEC terminals. |
| 3 | 3 | ||
| 4 | ;; XXX We need to find a way to have these define-keys be display-local. -- Lorentey | 4 | (defvar lk201-function-map nil |
| 5 | "Function key definitions for lk201.") | ||
| 5 | 6 | ||
| 6 | ;; Termcap or terminfo should set these. | 7 | ;; Protect against reloads. |
| 7 | ;; (define-key function-key-map "\e[A" [up]) | 8 | (unless lk201-function-map |
| 8 | ;; (define-key function-key-map "\e[B" [down]) | 9 | (setq lk201-function-map (make-sparse-keymap)) |
| 9 | ;; (define-key function-key-map "\e[C" [right]) | ||
| 10 | ;; (define-key function-key-map "\e[D" [left]) | ||
| 11 | 10 | ||
| 12 | (define-key function-key-map "\e[1~" [find]) | 11 | ;; XXX We need to find a way to have these define-keys be display-local. -- Lorentey |
| 13 | (define-key function-key-map "\e[2~" [insert]) | ||
| 14 | (define-key function-key-map "\e[3~" [delete]) | ||
| 15 | (define-key function-key-map "\e[4~" [select]) | ||
| 16 | (define-key function-key-map "\e[5~" [prior]) | ||
| 17 | (define-key function-key-map "\e[6~" [next]) | ||
| 18 | (define-key function-key-map "\e[11~" [f1]) | ||
| 19 | (define-key function-key-map "\e[12~" [f2]) | ||
| 20 | (define-key function-key-map "\e[13~" [f3]) | ||
| 21 | (define-key function-key-map "\e[14~" [f4]) | ||
| 22 | (define-key function-key-map "\e[15~" [f5]) | ||
| 23 | (define-key function-key-map "\e[17~" [f6]) | ||
| 24 | (define-key function-key-map "\e[18~" [f7]) | ||
| 25 | (define-key function-key-map "\e[19~" [f8]) | ||
| 26 | (define-key function-key-map "\e[20~" [f9]) | ||
| 27 | (define-key function-key-map "\e[21~" [f10]) | ||
| 28 | ;; Customarily F11 is used as the ESC key. | ||
| 29 | ;; The file that includes this one, takes care of that. | ||
| 30 | (define-key function-key-map "\e[23~" [f11]) | ||
| 31 | (define-key function-key-map "\e[24~" [f12]) | ||
| 32 | (define-key function-key-map "\e[25~" [f13]) | ||
| 33 | (define-key function-key-map "\e[26~" [f14]) | ||
| 34 | (define-key function-key-map "\e[28~" [help]) | ||
| 35 | (define-key function-key-map "\e[29~" [menu]) | ||
| 36 | (define-key function-key-map "\e[31~" [f17]) | ||
| 37 | (define-key function-key-map "\e[32~" [f18]) | ||
| 38 | (define-key function-key-map "\e[33~" [f19]) | ||
| 39 | (define-key function-key-map "\e[34~" [f20]) | ||
| 40 | 12 | ||
| 41 | ;; Termcap or terminfo should set these. | 13 | ;; Termcap or terminfo should set these. |
| 42 | ;; (define-key function-key-map "\eOA" [up]) | 14 | ;; (define-key function-key-map "\e[A" [up]) |
| 43 | ;; (define-key function-key-map "\eOB" [down]) | 15 | ;; (define-key function-key-map "\e[B" [down]) |
| 44 | ;; (define-key function-key-map "\eOC" [right]) | 16 | ;; (define-key function-key-map "\e[C" [right]) |
| 45 | ;; (define-key function-key-map "\eOD" [left]) | 17 | ;; (define-key function-key-map "\e[D" [left]) |
| 46 | 18 | ||
| 47 | ;; Termcap or terminfo should set these, but doesn't properly. | 19 | (define-key function-key-map "\e[1~" [find]) |
| 48 | ;; Termcap sets these to k1-k4, which get mapped to f1-f4 in term.c | 20 | (define-key function-key-map "\e[2~" [insert]) |
| 49 | (define-key function-key-map "\eOP" [kp-f1]) | 21 | (define-key function-key-map "\e[3~" [delete]) |
| 50 | (define-key function-key-map "\eOQ" [kp-f2]) | 22 | (define-key function-key-map "\e[4~" [select]) |
| 51 | (define-key function-key-map "\eOR" [kp-f3]) | 23 | (define-key function-key-map "\e[5~" [prior]) |
| 52 | (define-key function-key-map "\eOS" [kp-f4]) | 24 | (define-key function-key-map "\e[6~" [next]) |
| 25 | (define-key function-key-map "\e[11~" [f1]) | ||
| 26 | (define-key function-key-map "\e[12~" [f2]) | ||
| 27 | (define-key function-key-map "\e[13~" [f3]) | ||
| 28 | (define-key function-key-map "\e[14~" [f4]) | ||
| 29 | (define-key function-key-map "\e[15~" [f5]) | ||
| 30 | (define-key function-key-map "\e[17~" [f6]) | ||
| 31 | (define-key function-key-map "\e[18~" [f7]) | ||
| 32 | (define-key function-key-map "\e[19~" [f8]) | ||
| 33 | (define-key function-key-map "\e[20~" [f9]) | ||
| 34 | (define-key function-key-map "\e[21~" [f10]) | ||
| 35 | ;; Customarily F11 is used as the ESC key. | ||
| 36 | ;; The file that includes this one, takes care of that. | ||
| 37 | (define-key function-key-map "\e[23~" [f11]) | ||
| 38 | (define-key function-key-map "\e[24~" [f12]) | ||
| 39 | (define-key function-key-map "\e[25~" [f13]) | ||
| 40 | (define-key function-key-map "\e[26~" [f14]) | ||
| 41 | (define-key function-key-map "\e[28~" [help]) | ||
| 42 | (define-key function-key-map "\e[29~" [menu]) | ||
| 43 | (define-key function-key-map "\e[31~" [f17]) | ||
| 44 | (define-key function-key-map "\e[32~" [f18]) | ||
| 45 | (define-key function-key-map "\e[33~" [f19]) | ||
| 46 | (define-key function-key-map "\e[34~" [f20]) | ||
| 53 | 47 | ||
| 54 | (define-key function-key-map "\eOI" [kp-tab]) | 48 | ;; Termcap or terminfo should set these. |
| 55 | (define-key function-key-map "\eOj" [kp-multiply]) | 49 | ;; (define-key function-key-map "\eOA" [up]) |
| 56 | (define-key function-key-map "\eOk" [kp-add]) | 50 | ;; (define-key function-key-map "\eOB" [down]) |
| 57 | (define-key function-key-map "\eOl" [kp-separator]) | 51 | ;; (define-key function-key-map "\eOC" [right]) |
| 58 | (define-key function-key-map "\eOM" [kp-enter]) | 52 | ;; (define-key function-key-map "\eOD" [left]) |
| 59 | (define-key function-key-map "\eOm" [kp-subtract]) | 53 | |
| 60 | (define-key function-key-map "\eOn" [kp-decimal]) | 54 | ;; Termcap or terminfo should set these, but doesn't properly. |
| 61 | (define-key function-key-map "\eOo" [kp-divide]) | 55 | ;; Termcap sets these to k1-k4, which get mapped to f1-f4 in term.c |
| 62 | (define-key function-key-map "\eOp" [kp-0]) | 56 | (define-key function-key-map "\eOP" [kp-f1]) |
| 63 | (define-key function-key-map "\eOq" [kp-1]) | 57 | (define-key function-key-map "\eOQ" [kp-f2]) |
| 64 | (define-key function-key-map "\eOr" [kp-2]) | 58 | (define-key function-key-map "\eOR" [kp-f3]) |
| 65 | (define-key function-key-map "\eOs" [kp-3]) | 59 | (define-key function-key-map "\eOS" [kp-f4]) |
| 66 | (define-key function-key-map "\eOt" [kp-4]) | 60 | |
| 67 | (define-key function-key-map "\eOu" [kp-5]) | 61 | (define-key function-key-map "\eOI" [kp-tab]) |
| 68 | (define-key function-key-map "\eOv" [kp-6]) | 62 | (define-key function-key-map "\eOj" [kp-multiply]) |
| 69 | (define-key function-key-map "\eOw" [kp-7]) | 63 | (define-key function-key-map "\eOk" [kp-add]) |
| 70 | (define-key function-key-map "\eOx" [kp-8]) | 64 | (define-key function-key-map "\eOl" [kp-separator]) |
| 71 | (define-key function-key-map "\eOy" [kp-9]) | 65 | (define-key function-key-map "\eOM" [kp-enter]) |
| 66 | (define-key function-key-map "\eOm" [kp-subtract]) | ||
| 67 | (define-key function-key-map "\eOn" [kp-decimal]) | ||
| 68 | (define-key function-key-map "\eOo" [kp-divide]) | ||
| 69 | (define-key function-key-map "\eOp" [kp-0]) | ||
| 70 | (define-key function-key-map "\eOq" [kp-1]) | ||
| 71 | (define-key function-key-map "\eOr" [kp-2]) | ||
| 72 | (define-key function-key-map "\eOs" [kp-3]) | ||
| 73 | (define-key function-key-map "\eOt" [kp-4]) | ||
| 74 | (define-key function-key-map "\eOu" [kp-5]) | ||
| 75 | (define-key function-key-map "\eOv" [kp-6]) | ||
| 76 | (define-key function-key-map "\eOw" [kp-7]) | ||
| 77 | (define-key function-key-map "\eOx" [kp-8]) | ||
| 78 | (define-key function-key-map "\eOy" [kp-9]) | ||
| 79 | |||
| 80 | ;; Use inheritance to let the main keymap override these defaults. | ||
| 81 | ;; This way we don't override terminfo-derived settings or settings | ||
| 82 | ;; made in the .emacs file. | ||
| 83 | (set-keymap-parent lk201-function-map (keymap-parent function-key-map)) | ||
| 84 | (set-keymap-parent function-key-map lk201-function-map)) | ||
| 72 | 85 | ||
| 73 | ;;; arch-tag: 7ffb4444-6a23-43e1-b457-43cf4f673c0d | 86 | ;;; arch-tag: 7ffb4444-6a23-43e1-b457-43cf4f673c0d |
| 74 | ;;; lk201.el ends here | 87 | ;;; lk201.el ends here |
diff --git a/lisp/term/rxvt.el b/lisp/term/rxvt.el index 7b53f098e82..180e0b40946 100644 --- a/lisp/term/rxvt.el +++ b/lisp/term/rxvt.el | |||
| @@ -28,80 +28,78 @@ | |||
| 28 | 28 | ||
| 29 | (require 'server) | 29 | (require 'server) |
| 30 | 30 | ||
| 31 | (defvar rxvt-function-map (make-sparse-keymap) | 31 | (defvar rxvt-function-map nil |
| 32 | "Function key rxvt-function-mapoverrides for rxvt.") | 32 | "Function key overrides for rxvt.") |
| 33 | 33 | ||
| 34 | ;; Set up function-key-map entries that termcap and terminfo don't know. | 34 | ;; Protect against reloads. |
| 35 | ;; XXX We need to find a way to have these define-keys be display-local. -- Lorentey | 35 | (unless rxvt-function-map |
| 36 | (define-key rxvt-function-map "\e[A" [up]) | 36 | (setq rxvt-function-map (make-sparse-keymap)) |
| 37 | (define-key rxvt-function-map "\e[B" [down]) | 37 | |
| 38 | (define-key rxvt-function-map "\e[C" [right]) | 38 | ;; Set up function-key-map entries that termcap and terminfo don't know. |
| 39 | (define-key rxvt-function-map "\e[D" [left]) | 39 | ;; XXX We need to find a way to have these define-keys be display-local. -- Lorentey |
| 40 | (define-key rxvt-function-map "\e[7~" [home]) | 40 | (define-key rxvt-function-map "\e[A" [up]) |
| 41 | (define-key rxvt-function-map "\e[2~" [insert]) | 41 | (define-key rxvt-function-map "\e[B" [down]) |
| 42 | (define-key rxvt-function-map "\e[3~" [delete]) | 42 | (define-key rxvt-function-map "\e[C" [right]) |
| 43 | (define-key rxvt-function-map "\e[4~" [select]) | 43 | (define-key rxvt-function-map "\e[D" [left]) |
| 44 | (define-key rxvt-function-map "\e[5~" [prior]) | 44 | (define-key rxvt-function-map "\e[7~" [home]) |
| 45 | (define-key rxvt-function-map "\e[6~" [next]) | 45 | (define-key rxvt-function-map "\e[2~" [insert]) |
| 46 | (define-key rxvt-function-map "\e[11~" [f1]) | 46 | (define-key rxvt-function-map "\e[3~" [delete]) |
| 47 | (define-key rxvt-function-map "\e[12~" [f2]) | 47 | (define-key rxvt-function-map "\e[4~" [select]) |
| 48 | (define-key rxvt-function-map "\e[13~" [f3]) | 48 | (define-key rxvt-function-map "\e[5~" [prior]) |
| 49 | (define-key rxvt-function-map "\e[14~" [f4]) | 49 | (define-key rxvt-function-map "\e[6~" [next]) |
| 50 | (define-key rxvt-function-map "\e[15~" [f5]) | 50 | (define-key rxvt-function-map "\e[11~" [f1]) |
| 51 | (define-key rxvt-function-map "\e[17~" [f6]) | 51 | (define-key rxvt-function-map "\e[12~" [f2]) |
| 52 | (define-key rxvt-function-map "\e[18~" [f7]) | 52 | (define-key rxvt-function-map "\e[13~" [f3]) |
| 53 | (define-key rxvt-function-map "\e[19~" [f8]) | 53 | (define-key rxvt-function-map "\e[14~" [f4]) |
| 54 | (define-key rxvt-function-map "\e[20~" [f9]) | 54 | (define-key rxvt-function-map "\e[15~" [f5]) |
| 55 | (define-key rxvt-function-map "\e[21~" [f10]) | 55 | (define-key rxvt-function-map "\e[17~" [f6]) |
| 56 | (define-key rxvt-function-map "\e[23~" [f11]) | 56 | (define-key rxvt-function-map "\e[18~" [f7]) |
| 57 | (define-key rxvt-function-map "\e[24~" [f12]) | 57 | (define-key rxvt-function-map "\e[19~" [f8]) |
| 58 | (define-key rxvt-function-map "\e[29~" [print]) | 58 | (define-key rxvt-function-map "\e[20~" [f9]) |
| 59 | 59 | (define-key rxvt-function-map "\e[21~" [f10]) | |
| 60 | (define-key rxvt-function-map "\e[11^" [C-f1]) | 60 | (define-key rxvt-function-map "\e[23~" [f11]) |
| 61 | (define-key rxvt-function-map "\e[12^" [C-f2]) | 61 | (define-key rxvt-function-map "\e[24~" [f12]) |
| 62 | (define-key rxvt-function-map "\e[13^" [C-f3]) | 62 | (define-key rxvt-function-map "\e[29~" [print]) |
| 63 | (define-key rxvt-function-map "\e[14^" [C-f4]) | 63 | |
| 64 | (define-key rxvt-function-map "\e[15^" [C-f5]) | 64 | (define-key rxvt-function-map "\e[11^" [C-f1]) |
| 65 | (define-key rxvt-function-map "\e[17^" [C-f6]) | 65 | (define-key rxvt-function-map "\e[12^" [C-f2]) |
| 66 | (define-key rxvt-function-map "\e[18^" [C-f7]) | 66 | (define-key rxvt-function-map "\e[13^" [C-f3]) |
| 67 | (define-key rxvt-function-map "\e[19^" [C-f8]) | 67 | (define-key rxvt-function-map "\e[14^" [C-f4]) |
| 68 | (define-key rxvt-function-map "\e[20^" [C-f9]) | 68 | (define-key rxvt-function-map "\e[15^" [C-f5]) |
| 69 | (define-key rxvt-function-map "\e[21^" [C-f10]) | 69 | (define-key rxvt-function-map "\e[17^" [C-f6]) |
| 70 | (define-key rxvt-function-map "\e[23^" [C-f11]) | 70 | (define-key rxvt-function-map "\e[18^" [C-f7]) |
| 71 | (define-key rxvt-function-map "\e[24^" [C-f12]) | 71 | (define-key rxvt-function-map "\e[19^" [C-f8]) |
| 72 | 72 | (define-key rxvt-function-map "\e[20^" [C-f9]) | |
| 73 | (define-key rxvt-function-map "\e[29~" [print]) | 73 | (define-key rxvt-function-map "\e[21^" [C-f10]) |
| 74 | 74 | (define-key rxvt-function-map "\e[23^" [C-f11]) | |
| 75 | (define-key rxvt-function-map "\e[2;2~" [S-insert]) | 75 | (define-key rxvt-function-map "\e[24^" [C-f12]) |
| 76 | (define-key rxvt-function-map "\e[3$" [S-delete]) | 76 | |
| 77 | 77 | (define-key rxvt-function-map "\e[29~" [print]) | |
| 78 | (define-key rxvt-function-map "\e[2^" [C-insert]) | 78 | |
| 79 | (define-key rxvt-function-map "\e[3^" [C-delete]) | 79 | (define-key rxvt-function-map "\e[2;2~" [S-insert]) |
| 80 | (define-key rxvt-function-map "\e[5^" [C-prior]) | 80 | (define-key rxvt-function-map "\e[3$" [S-delete]) |
| 81 | (define-key rxvt-function-map "\e[6^" [C-next]) | 81 | |
| 82 | (define-key rxvt-function-map "\eOd" [C-left]) | 82 | (define-key rxvt-function-map "\e[2^" [C-insert]) |
| 83 | (define-key rxvt-function-map "\eOc" [C-right]) | 83 | (define-key rxvt-function-map "\e[3^" [C-delete]) |
| 84 | (define-key rxvt-function-map "\eOa" [C-up]) | 84 | (define-key rxvt-function-map "\e[5^" [C-prior]) |
| 85 | (define-key rxvt-function-map "\eOb" [C-down]) | 85 | (define-key rxvt-function-map "\e[6^" [C-next]) |
| 86 | 86 | (define-key rxvt-function-map "\eOd" [C-left]) | |
| 87 | (define-key rxvt-function-map "\e[5$" [S-prior]) | 87 | (define-key rxvt-function-map "\eOc" [C-right]) |
| 88 | (define-key rxvt-function-map "\e[6$" [S-next]) | 88 | (define-key rxvt-function-map "\eOa" [C-up]) |
| 89 | (define-key rxvt-function-map "\e[8$" [S-end]) | 89 | (define-key rxvt-function-map "\eOb" [C-down]) |
| 90 | (define-key rxvt-function-map "\e[7$" [S-home]) | 90 | |
| 91 | (define-key rxvt-function-map "\e[d" [S-left]) | 91 | (define-key rxvt-function-map "\e[5$" [S-prior]) |
| 92 | (define-key rxvt-function-map "\e[c" [S-right]) | 92 | (define-key rxvt-function-map "\e[6$" [S-next]) |
| 93 | (define-key rxvt-function-map "\e[a" [S-up]) | 93 | (define-key rxvt-function-map "\e[8$" [S-end]) |
| 94 | (define-key rxvt-function-map "\e[b" [S-down]) | 94 | (define-key rxvt-function-map "\e[7$" [S-home]) |
| 95 | 95 | (define-key rxvt-function-map "\e[d" [S-left]) | |
| 96 | ;; Use inheritance to let the main keymap override those defaults. | 96 | (define-key rxvt-function-map "\e[c" [S-right]) |
| 97 | ;; This way we don't override terminfo-derived settings or settings | 97 | (define-key rxvt-function-map "\e[a" [S-up]) |
| 98 | ;; made in the .emacs file. | 98 | (define-key rxvt-function-map "\e[b" [S-down]) |
| 99 | (unless (let ((map (keymap-parent function-key-map)) | 99 | |
| 100 | found) | 100 | ;; Use inheritance to let the main keymap override those defaults. |
| 101 | (while (and (not found) map) | 101 | ;; This way we don't override terminfo-derived settings or settings |
| 102 | (setq found (eq rxvt-function-map map) | 102 | ;; made in the .emacs file. |
| 103 | map (keymap-parent map))) | ||
| 104 | found) | ||
| 105 | (set-keymap-parent rxvt-function-map (keymap-parent function-key-map)) | 103 | (set-keymap-parent rxvt-function-map (keymap-parent function-key-map)) |
| 106 | (set-keymap-parent function-key-map rxvt-function-map)) | 104 | (set-keymap-parent function-key-map rxvt-function-map)) |
| 107 | 105 | ||
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index d711754e646..f4cdd26a438 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el | |||
| @@ -28,230 +28,228 @@ | |||
| 28 | 28 | ||
| 29 | (require 'server) | 29 | (require 'server) |
| 30 | 30 | ||
| 31 | (defvar xterm-function-map (make-sparse-keymap) | 31 | (defvar xterm-function-map nil |
| 32 | "Function key map overrides for xterm.") | 32 | "Function key map overrides for xterm.") |
| 33 | 33 | ||
| 34 | ;; XXX We need to find a way to have these definitions be display-local. -- Lorentey | 34 | ;; Protect against reloads. |
| 35 | 35 | (unless xterm-function-map | |
| 36 | ;;; The terminal intialization C code file might have initialized | 36 | (setq xterm-function-map (make-sparse-keymap)) |
| 37 | ;;; function keys F13->F60 from the termcap/terminfo information. On | 37 | |
| 38 | ;;; a PC-style keyboard these keys correspond to | 38 | ;; XXX We need to find a way to make these definitions display-local. -- Lorentey |
| 39 | ;;; MODIFIER-FUNCTION_KEY, where modifier is S-, C, A-, C-S-. The | 39 | |
| 40 | ;;; code here subsitutes the corresponding defintions in | 40 | ;; The terminal intialization C code file might have initialized |
| 41 | ;;; function-key-map. This substitution is needed because if a key | 41 | ;; function keys F13->F60 from the termcap/terminfo information. On |
| 42 | ;;; definition if found in function-key-map, there are no further | 42 | ;; a PC-style keyboard these keys correspond to |
| 43 | ;;; lookups in other keymaps. | 43 | ;; MODIFIER-FUNCTION_KEY, where modifier is S-, C, A-, C-S-. The |
| 44 | (substitute-key-definition [f13] [S-f1] function-key-map) | 44 | ;; code here subsitutes the corresponding defintions in |
| 45 | (substitute-key-definition [f14] [S-f2] function-key-map) | 45 | ;; function-key-map. This substitution is needed because if a key |
| 46 | (substitute-key-definition [f15] [S-f3] function-key-map) | 46 | ;; definition if found in function-key-map, there are no further |
| 47 | (substitute-key-definition [f16] [S-f4] function-key-map) | 47 | ;; lookups in other keymaps. |
| 48 | (substitute-key-definition [f17] [S-f5] function-key-map) | 48 | (substitute-key-definition [f13] [S-f1] function-key-map) |
| 49 | (substitute-key-definition [f18] [S-f6] function-key-map) | 49 | (substitute-key-definition [f14] [S-f2] function-key-map) |
| 50 | (substitute-key-definition [f19] [S-f7] function-key-map) | 50 | (substitute-key-definition [f15] [S-f3] function-key-map) |
| 51 | (substitute-key-definition [f20] [S-f8] function-key-map) | 51 | (substitute-key-definition [f16] [S-f4] function-key-map) |
| 52 | (substitute-key-definition [f21] [S-f9] function-key-map) | 52 | (substitute-key-definition [f17] [S-f5] function-key-map) |
| 53 | (substitute-key-definition [f22] [S-f10] function-key-map) | 53 | (substitute-key-definition [f18] [S-f6] function-key-map) |
| 54 | (substitute-key-definition [f23] [S-f11] function-key-map) | 54 | (substitute-key-definition [f19] [S-f7] function-key-map) |
| 55 | (substitute-key-definition [f24] [S-f12] function-key-map) | 55 | (substitute-key-definition [f20] [S-f8] function-key-map) |
| 56 | 56 | (substitute-key-definition [f21] [S-f9] function-key-map) | |
| 57 | (substitute-key-definition [f25] [C-f1] function-key-map) | 57 | (substitute-key-definition [f22] [S-f10] function-key-map) |
| 58 | (substitute-key-definition [f26] [C-f2] function-key-map) | 58 | (substitute-key-definition [f23] [S-f11] function-key-map) |
| 59 | (substitute-key-definition [f27] [C-f3] function-key-map) | 59 | (substitute-key-definition [f24] [S-f12] function-key-map) |
| 60 | (substitute-key-definition [f28] [C-f4] function-key-map) | 60 | |
| 61 | (substitute-key-definition [f29] [C-f5] function-key-map) | 61 | (substitute-key-definition [f25] [C-f1] function-key-map) |
| 62 | (substitute-key-definition [f30] [C-f6] function-key-map) | 62 | (substitute-key-definition [f26] [C-f2] function-key-map) |
| 63 | (substitute-key-definition [f31] [C-f7] function-key-map) | 63 | (substitute-key-definition [f27] [C-f3] function-key-map) |
| 64 | (substitute-key-definition [f32] [C-f8] function-key-map) | 64 | (substitute-key-definition [f28] [C-f4] function-key-map) |
| 65 | (substitute-key-definition [f33] [C-f9] function-key-map) | 65 | (substitute-key-definition [f29] [C-f5] function-key-map) |
| 66 | (substitute-key-definition [f34] [C-f10] function-key-map) | 66 | (substitute-key-definition [f30] [C-f6] function-key-map) |
| 67 | (substitute-key-definition [f35] [C-f11] function-key-map) | 67 | (substitute-key-definition [f31] [C-f7] function-key-map) |
| 68 | (substitute-key-definition [f36] [C-f12] function-key-map) | 68 | (substitute-key-definition [f32] [C-f8] function-key-map) |
| 69 | 69 | (substitute-key-definition [f33] [C-f9] function-key-map) | |
| 70 | (substitute-key-definition [f37] [C-S-f1] function-key-map) | 70 | (substitute-key-definition [f34] [C-f10] function-key-map) |
| 71 | (substitute-key-definition [f38] [C-S-f2] function-key-map) | 71 | (substitute-key-definition [f35] [C-f11] function-key-map) |
| 72 | (substitute-key-definition [f39] [C-S-f3] function-key-map) | 72 | (substitute-key-definition [f36] [C-f12] function-key-map) |
| 73 | (substitute-key-definition [f40] [C-S-f4] function-key-map) | 73 | |
| 74 | (substitute-key-definition [f41] [C-S-f5] function-key-map) | 74 | (substitute-key-definition [f37] [C-S-f1] function-key-map) |
| 75 | (substitute-key-definition [f42] [C-S-f6] function-key-map) | 75 | (substitute-key-definition [f38] [C-S-f2] function-key-map) |
| 76 | (substitute-key-definition [f43] [C-S-f7] function-key-map) | 76 | (substitute-key-definition [f39] [C-S-f3] function-key-map) |
| 77 | (substitute-key-definition [f44] [C-S-f8] function-key-map) | 77 | (substitute-key-definition [f40] [C-S-f4] function-key-map) |
| 78 | (substitute-key-definition [f45] [C-S-f9] function-key-map) | 78 | (substitute-key-definition [f41] [C-S-f5] function-key-map) |
| 79 | (substitute-key-definition [f46] [C-S-f10] function-key-map) | 79 | (substitute-key-definition [f42] [C-S-f6] function-key-map) |
| 80 | (substitute-key-definition [f47] [C-S-f11] function-key-map) | 80 | (substitute-key-definition [f43] [C-S-f7] function-key-map) |
| 81 | (substitute-key-definition [f48] [C-S-f12] function-key-map) | 81 | (substitute-key-definition [f44] [C-S-f8] function-key-map) |
| 82 | 82 | (substitute-key-definition [f45] [C-S-f9] function-key-map) | |
| 83 | (substitute-key-definition [f49] [A-f1] function-key-map) | 83 | (substitute-key-definition [f46] [C-S-f10] function-key-map) |
| 84 | (substitute-key-definition [f50] [A-f2] function-key-map) | 84 | (substitute-key-definition [f47] [C-S-f11] function-key-map) |
| 85 | (substitute-key-definition [f51] [A-f3] function-key-map) | 85 | (substitute-key-definition [f48] [C-S-f12] function-key-map) |
| 86 | (substitute-key-definition [f52] [A-f4] function-key-map) | 86 | |
| 87 | (substitute-key-definition [f53] [A-f5] function-key-map) | 87 | (substitute-key-definition [f49] [A-f1] function-key-map) |
| 88 | (substitute-key-definition [f54] [A-f6] function-key-map) | 88 | (substitute-key-definition [f50] [A-f2] function-key-map) |
| 89 | (substitute-key-definition [f55] [A-f7] function-key-map) | 89 | (substitute-key-definition [f51] [A-f3] function-key-map) |
| 90 | (substitute-key-definition [f56] [A-f8] function-key-map) | 90 | (substitute-key-definition [f52] [A-f4] function-key-map) |
| 91 | (substitute-key-definition [f57] [A-f9] function-key-map) | 91 | (substitute-key-definition [f53] [A-f5] function-key-map) |
| 92 | (substitute-key-definition [f58] [A-f10] function-key-map) | 92 | (substitute-key-definition [f54] [A-f6] function-key-map) |
| 93 | (substitute-key-definition [f59] [A-f11] function-key-map) | 93 | (substitute-key-definition [f55] [A-f7] function-key-map) |
| 94 | (substitute-key-definition [f60] [A-f12] function-key-map) | 94 | (substitute-key-definition [f56] [A-f8] function-key-map) |
| 95 | 95 | (substitute-key-definition [f57] [A-f9] function-key-map) | |
| 96 | (define-key xterm-function-map "\e[A" [up]) | 96 | (substitute-key-definition [f58] [A-f10] function-key-map) |
| 97 | (define-key xterm-function-map "\e[B" [down]) | 97 | (substitute-key-definition [f59] [A-f11] function-key-map) |
| 98 | (define-key xterm-function-map "\e[C" [right]) | 98 | (substitute-key-definition [f60] [A-f12] function-key-map) |
| 99 | (define-key xterm-function-map "\e[D" [left]) | 99 | |
| 100 | (define-key xterm-function-map "\e[1~" [home]) | 100 | (define-key xterm-function-map "\e[A" [up]) |
| 101 | (define-key xterm-function-map "\e[2~" [insert]) | 101 | (define-key xterm-function-map "\e[B" [down]) |
| 102 | (define-key xterm-function-map "\e[3~" [delete]) | 102 | (define-key xterm-function-map "\e[C" [right]) |
| 103 | (define-key xterm-function-map "\e[4~" [select]) | 103 | (define-key xterm-function-map "\e[D" [left]) |
| 104 | (define-key xterm-function-map "\e[5~" [prior]) | 104 | (define-key xterm-function-map "\e[1~" [home]) |
| 105 | (define-key xterm-function-map "\e[6~" [next]) | 105 | (define-key xterm-function-map "\e[2~" [insert]) |
| 106 | (define-key xterm-function-map "\e[11~" [f1]) | 106 | (define-key xterm-function-map "\e[3~" [delete]) |
| 107 | (define-key xterm-function-map "\e[12~" [f2]) | 107 | (define-key xterm-function-map "\e[4~" [select]) |
| 108 | (define-key xterm-function-map "\e[13~" [f3]) | 108 | (define-key xterm-function-map "\e[5~" [prior]) |
| 109 | (define-key xterm-function-map "\e[14~" [f4]) | 109 | (define-key xterm-function-map "\e[6~" [next]) |
| 110 | (define-key xterm-function-map "\e[15~" [f5]) | 110 | (define-key xterm-function-map "\e[11~" [f1]) |
| 111 | (define-key xterm-function-map "\e[17~" [f6]) | 111 | (define-key xterm-function-map "\e[12~" [f2]) |
| 112 | (define-key xterm-function-map "\e[18~" [f7]) | 112 | (define-key xterm-function-map "\e[13~" [f3]) |
| 113 | (define-key xterm-function-map "\e[19~" [f8]) | 113 | (define-key xterm-function-map "\e[14~" [f4]) |
| 114 | (define-key xterm-function-map "\e[20~" [f9]) | 114 | (define-key xterm-function-map "\e[15~" [f5]) |
| 115 | (define-key xterm-function-map "\e[21~" [f10]) | 115 | (define-key xterm-function-map "\e[17~" [f6]) |
| 116 | (define-key xterm-function-map "\e[23~" [f11]) | 116 | (define-key xterm-function-map "\e[18~" [f7]) |
| 117 | (define-key xterm-function-map "\e[24~" [f12]) | 117 | (define-key xterm-function-map "\e[19~" [f8]) |
| 118 | (define-key xterm-function-map "\e[29~" [print]) | 118 | (define-key xterm-function-map "\e[20~" [f9]) |
| 119 | 119 | (define-key xterm-function-map "\e[21~" [f10]) | |
| 120 | (define-key xterm-function-map "\eOP" [f1]) | 120 | (define-key xterm-function-map "\e[23~" [f11]) |
| 121 | (define-key xterm-function-map "\eOQ" [f2]) | 121 | (define-key xterm-function-map "\e[24~" [f12]) |
| 122 | (define-key xterm-function-map "\eOR" [f3]) | 122 | (define-key xterm-function-map "\e[29~" [print]) |
| 123 | (define-key xterm-function-map "\eOS" [f4]) | 123 | |
| 124 | 124 | (define-key xterm-function-map "\eOP" [f1]) | |
| 125 | (define-key xterm-function-map "\eO2P" [S-f1]) | 125 | (define-key xterm-function-map "\eOQ" [f2]) |
| 126 | (define-key xterm-function-map "\eO2Q" [S-f2]) | 126 | (define-key xterm-function-map "\eOR" [f3]) |
| 127 | (define-key xterm-function-map "\eO2R" [S-f3]) | 127 | (define-key xterm-function-map "\eOS" [f4]) |
| 128 | (define-key xterm-function-map "\eO2S" [S-f4]) | 128 | |
| 129 | (define-key xterm-function-map "\e[15;2~" [S-f5]) | 129 | (define-key xterm-function-map "\eO2P" [S-f1]) |
| 130 | (define-key xterm-function-map "\e[17;2~" [S-f6]) | 130 | (define-key xterm-function-map "\eO2Q" [S-f2]) |
| 131 | (define-key xterm-function-map "\e[18;2~" [S-f7]) | 131 | (define-key xterm-function-map "\eO2R" [S-f3]) |
| 132 | (define-key xterm-function-map "\e[19;2~" [S-f8]) | 132 | (define-key xterm-function-map "\eO2S" [S-f4]) |
| 133 | (define-key xterm-function-map "\e[20;2~" [S-f9]) | 133 | (define-key xterm-function-map "\e[15;2~" [S-f5]) |
| 134 | (define-key xterm-function-map "\e[21;2~" [S-f10]) | 134 | (define-key xterm-function-map "\e[17;2~" [S-f6]) |
| 135 | (define-key xterm-function-map "\e[23;2~" [S-f11]) | 135 | (define-key xterm-function-map "\e[18;2~" [S-f7]) |
| 136 | (define-key xterm-function-map "\e[24;2~" [S-f12]) | 136 | (define-key xterm-function-map "\e[19;2~" [S-f8]) |
| 137 | 137 | (define-key xterm-function-map "\e[20;2~" [S-f9]) | |
| 138 | (define-key xterm-function-map "\eO5P" [C-f1]) | 138 | (define-key xterm-function-map "\e[21;2~" [S-f10]) |
| 139 | (define-key xterm-function-map "\eO5Q" [C-f2]) | 139 | (define-key xterm-function-map "\e[23;2~" [S-f11]) |
| 140 | (define-key xterm-function-map "\eO5R" [C-f3]) | 140 | (define-key xterm-function-map "\e[24;2~" [S-f12]) |
| 141 | (define-key xterm-function-map "\eO5S" [C-f4]) | 141 | |
| 142 | (define-key xterm-function-map "\e[15;5~" [C-f5]) | 142 | (define-key xterm-function-map "\eO5P" [C-f1]) |
| 143 | (define-key xterm-function-map "\e[17;5~" [C-f6]) | 143 | (define-key xterm-function-map "\eO5Q" [C-f2]) |
| 144 | (define-key xterm-function-map "\e[18;5~" [C-f7]) | 144 | (define-key xterm-function-map "\eO5R" [C-f3]) |
| 145 | (define-key xterm-function-map "\e[19;5~" [C-f8]) | 145 | (define-key xterm-function-map "\eO5S" [C-f4]) |
| 146 | (define-key xterm-function-map "\e[20;5~" [C-f9]) | 146 | (define-key xterm-function-map "\e[15;5~" [C-f5]) |
| 147 | (define-key xterm-function-map "\e[21;5~" [C-f10]) | 147 | (define-key xterm-function-map "\e[17;5~" [C-f6]) |
| 148 | (define-key xterm-function-map "\e[23;5~" [C-f11]) | 148 | (define-key xterm-function-map "\e[18;5~" [C-f7]) |
| 149 | (define-key xterm-function-map "\e[24;5~" [C-f12]) | 149 | (define-key xterm-function-map "\e[19;5~" [C-f8]) |
| 150 | 150 | (define-key xterm-function-map "\e[20;5~" [C-f9]) | |
| 151 | (define-key xterm-function-map "\eO6P" [C-S-f1]) | 151 | (define-key xterm-function-map "\e[21;5~" [C-f10]) |
| 152 | (define-key xterm-function-map "\eO6Q" [C-S-f2]) | 152 | (define-key xterm-function-map "\e[23;5~" [C-f11]) |
| 153 | (define-key xterm-function-map "\eO6R" [C-S-f3]) | 153 | (define-key xterm-function-map "\e[24;5~" [C-f12]) |
| 154 | (define-key xterm-function-map "\eO6S" [C-S-f4]) | 154 | |
| 155 | (define-key xterm-function-map "\e[15;6~" [C-S-f5]) | 155 | (define-key xterm-function-map "\eO6P" [C-S-f1]) |
| 156 | (define-key xterm-function-map "\e[17;6~" [C-S-f6]) | 156 | (define-key xterm-function-map "\eO6Q" [C-S-f2]) |
| 157 | (define-key xterm-function-map "\e[18;6~" [C-S-f7]) | 157 | (define-key xterm-function-map "\eO6R" [C-S-f3]) |
| 158 | (define-key xterm-function-map "\e[19;6~" [C-S-f8]) | 158 | (define-key xterm-function-map "\eO6S" [C-S-f4]) |
| 159 | (define-key xterm-function-map "\e[20;6~" [C-S-f9]) | 159 | (define-key xterm-function-map "\e[15;6~" [C-S-f5]) |
| 160 | (define-key xterm-function-map "\e[21;6~" [C-S-f10]) | 160 | (define-key xterm-function-map "\e[17;6~" [C-S-f6]) |
| 161 | (define-key xterm-function-map "\e[23;6~" [C-S-f11]) | 161 | (define-key xterm-function-map "\e[18;6~" [C-S-f7]) |
| 162 | (define-key xterm-function-map "\e[24;6~" [C-S-f12]) | 162 | (define-key xterm-function-map "\e[19;6~" [C-S-f8]) |
| 163 | 163 | (define-key xterm-function-map "\e[20;6~" [C-S-f9]) | |
| 164 | (define-key xterm-function-map "\eO3P" [A-f1]) | 164 | (define-key xterm-function-map "\e[21;6~" [C-S-f10]) |
| 165 | (define-key xterm-function-map "\eO3Q" [A-f2]) | 165 | (define-key xterm-function-map "\e[23;6~" [C-S-f11]) |
| 166 | (define-key xterm-function-map "\eO3R" [A-f3]) | 166 | (define-key xterm-function-map "\e[24;6~" [C-S-f12]) |
| 167 | (define-key xterm-function-map "\eO3S" [A-f4]) | 167 | |
| 168 | (define-key xterm-function-map "\e[15;3~" [A-f5]) | 168 | (define-key xterm-function-map "\eO3P" [A-f1]) |
| 169 | (define-key xterm-function-map "\e[17;3~" [A-f6]) | 169 | (define-key xterm-function-map "\eO3Q" [A-f2]) |
| 170 | (define-key xterm-function-map "\e[18;3~" [A-f7]) | 170 | (define-key xterm-function-map "\eO3R" [A-f3]) |
| 171 | (define-key xterm-function-map "\e[19;3~" [A-f8]) | 171 | (define-key xterm-function-map "\eO3S" [A-f4]) |
| 172 | (define-key xterm-function-map "\e[20;3~" [A-f9]) | 172 | (define-key xterm-function-map "\e[15;3~" [A-f5]) |
| 173 | (define-key xterm-function-map "\e[21;3~" [A-f10]) | 173 | (define-key xterm-function-map "\e[17;3~" [A-f6]) |
| 174 | (define-key xterm-function-map "\e[23;3~" [A-f11]) | 174 | (define-key xterm-function-map "\e[18;3~" [A-f7]) |
| 175 | (define-key xterm-function-map "\e[24;3~" [A-f12]) | 175 | (define-key xterm-function-map "\e[19;3~" [A-f8]) |
| 176 | 176 | (define-key xterm-function-map "\e[20;3~" [A-f9]) | |
| 177 | (define-key xterm-function-map "\e[1;2A" [S-up]) | 177 | (define-key xterm-function-map "\e[21;3~" [A-f10]) |
| 178 | (define-key xterm-function-map "\e[1;2B" [S-down]) | 178 | (define-key xterm-function-map "\e[23;3~" [A-f11]) |
| 179 | (define-key xterm-function-map "\e[1;2C" [S-right]) | 179 | (define-key xterm-function-map "\e[24;3~" [A-f12]) |
| 180 | (define-key xterm-function-map "\e[1;2D" [S-left]) | 180 | |
| 181 | (define-key xterm-function-map "\e[1;2F" [S-end]) | 181 | (define-key xterm-function-map "\e[1;2A" [S-up]) |
| 182 | (define-key xterm-function-map "\e[1;2H" [S-home]) | 182 | (define-key xterm-function-map "\e[1;2B" [S-down]) |
| 183 | 183 | (define-key xterm-function-map "\e[1;2C" [S-right]) | |
| 184 | (define-key xterm-function-map "\e[1;5A" [C-up]) | 184 | (define-key xterm-function-map "\e[1;2D" [S-left]) |
| 185 | (define-key xterm-function-map "\e[1;5B" [C-down]) | 185 | (define-key xterm-function-map "\e[1;2F" [S-end]) |
| 186 | (define-key xterm-function-map "\e[1;5C" [C-right]) | 186 | (define-key xterm-function-map "\e[1;2H" [S-home]) |
| 187 | (define-key xterm-function-map "\e[1;5D" [C-left]) | 187 | |
| 188 | (define-key xterm-function-map "\e[1;5F" [C-end]) | 188 | (define-key xterm-function-map "\e[1;5A" [C-up]) |
| 189 | (define-key xterm-function-map "\e[1;5H" [C-home]) | 189 | (define-key xterm-function-map "\e[1;5B" [C-down]) |
| 190 | 190 | (define-key xterm-function-map "\e[1;5C" [C-right]) | |
| 191 | (define-key xterm-function-map "\e[1;6A" [C-S-up]) | 191 | (define-key xterm-function-map "\e[1;5D" [C-left]) |
| 192 | (define-key xterm-function-map "\e[1;6B" [C-S-down]) | 192 | (define-key xterm-function-map "\e[1;5F" [C-end]) |
| 193 | (define-key xterm-function-map "\e[1;6C" [C-S-right]) | 193 | (define-key xterm-function-map "\e[1;5H" [C-home]) |
| 194 | (define-key xterm-function-map "\e[1;6D" [C-S-left]) | 194 | |
| 195 | (define-key xterm-function-map "\e[1;6F" [C-S-end]) | 195 | (define-key xterm-function-map "\e[1;6A" [C-S-up]) |
| 196 | (define-key xterm-function-map "\e[1;6H" [C-S-home]) | 196 | (define-key xterm-function-map "\e[1;6B" [C-S-down]) |
| 197 | 197 | (define-key xterm-function-map "\e[1;6C" [C-S-right]) | |
| 198 | (define-key xterm-function-map "\e[1;3A" [A-up]) | 198 | (define-key xterm-function-map "\e[1;6D" [C-S-left]) |
| 199 | (define-key xterm-function-map "\e[1;3B" [A-down]) | 199 | (define-key xterm-function-map "\e[1;6F" [C-S-end]) |
| 200 | (define-key xterm-function-map "\e[1;3C" [A-right]) | 200 | (define-key xterm-function-map "\e[1;6H" [C-S-home]) |
| 201 | (define-key xterm-function-map "\e[1;3D" [A-left]) | 201 | |
| 202 | (define-key xterm-function-map "\e[1;3F" [A-end]) | 202 | (define-key xterm-function-map "\e[1;3A" [A-up]) |
| 203 | (define-key xterm-function-map "\e[1;3H" [A-home]) | 203 | (define-key xterm-function-map "\e[1;3B" [A-down]) |
| 204 | 204 | (define-key xterm-function-map "\e[1;3C" [A-right]) | |
| 205 | (define-key xterm-function-map "\e[2;2~" [S-insert]) | 205 | (define-key xterm-function-map "\e[1;3D" [A-left]) |
| 206 | (define-key xterm-function-map "\e[3;2~" [S-delete]) | 206 | (define-key xterm-function-map "\e[1;3F" [A-end]) |
| 207 | (define-key xterm-function-map "\e[5;2~" [S-prior]) | 207 | (define-key xterm-function-map "\e[1;3H" [A-home]) |
| 208 | (define-key xterm-function-map "\e[6;2~" [S-next]) | 208 | |
| 209 | 209 | (define-key xterm-function-map "\e[2;2~" [S-insert]) | |
| 210 | (define-key xterm-function-map "\e[2;5~" [C-insert]) | 210 | (define-key xterm-function-map "\e[3;2~" [S-delete]) |
| 211 | (define-key xterm-function-map "\e[3;5~" [C-delete]) | 211 | (define-key xterm-function-map "\e[5;2~" [S-prior]) |
| 212 | (define-key xterm-function-map "\e[5;5~" [C-prior]) | 212 | (define-key xterm-function-map "\e[6;2~" [S-next]) |
| 213 | (define-key xterm-function-map "\e[6;5~" [C-next]) | 213 | |
| 214 | 214 | (define-key xterm-function-map "\e[2;5~" [C-insert]) | |
| 215 | (define-key xterm-function-map "\e[2;6~" [C-S-insert]) | 215 | (define-key xterm-function-map "\e[3;5~" [C-delete]) |
| 216 | (define-key xterm-function-map "\e[3;6~" [C-S-delete]) | 216 | (define-key xterm-function-map "\e[5;5~" [C-prior]) |
| 217 | (define-key xterm-function-map "\e[5;6~" [C-S-prior]) | 217 | (define-key xterm-function-map "\e[6;5~" [C-next]) |
| 218 | (define-key xterm-function-map "\e[6;6~" [C-S-next]) | 218 | |
| 219 | 219 | (define-key xterm-function-map "\e[2;6~" [C-S-insert]) | |
| 220 | (define-key xterm-function-map "\e[2;3~" [A-insert]) | 220 | (define-key xterm-function-map "\e[3;6~" [C-S-delete]) |
| 221 | (define-key xterm-function-map "\e[3;3~" [A-delete]) | 221 | (define-key xterm-function-map "\e[5;6~" [C-S-prior]) |
| 222 | (define-key xterm-function-map "\e[5;3~" [A-prior]) | 222 | (define-key xterm-function-map "\e[6;6~" [C-S-next]) |
| 223 | (define-key xterm-function-map "\e[6;3~" [A-next]) | 223 | |
| 224 | 224 | (define-key xterm-function-map "\e[2;3~" [A-insert]) | |
| 225 | (define-key xterm-function-map "\eOA" [up]) | 225 | (define-key xterm-function-map "\e[3;3~" [A-delete]) |
| 226 | (define-key xterm-function-map "\eOB" [down]) | 226 | (define-key xterm-function-map "\e[5;3~" [A-prior]) |
| 227 | (define-key xterm-function-map "\eOC" [right]) | 227 | (define-key xterm-function-map "\e[6;3~" [A-next]) |
| 228 | (define-key xterm-function-map "\eOD" [left]) | 228 | |
| 229 | (define-key xterm-function-map "\eOF" [end]) | 229 | (define-key xterm-function-map "\eOA" [up]) |
| 230 | (define-key xterm-function-map "\eOH" [home]) | 230 | (define-key xterm-function-map "\eOB" [down]) |
| 231 | 231 | (define-key xterm-function-map "\eOC" [right]) | |
| 232 | (define-key xterm-function-map "\eO2A" [S-up]) | 232 | (define-key xterm-function-map "\eOD" [left]) |
| 233 | (define-key xterm-function-map "\eO2B" [S-down]) | 233 | (define-key xterm-function-map "\eOF" [end]) |
| 234 | (define-key xterm-function-map "\eO2C" [S-right]) | 234 | (define-key xterm-function-map "\eOH" [home]) |
| 235 | (define-key xterm-function-map "\eO2D" [S-left]) | 235 | |
| 236 | (define-key xterm-function-map "\eO2F" [S-end]) | 236 | (define-key xterm-function-map "\eO2A" [S-up]) |
| 237 | (define-key xterm-function-map "\eO2H" [S-home]) | 237 | (define-key xterm-function-map "\eO2B" [S-down]) |
| 238 | 238 | (define-key xterm-function-map "\eO2C" [S-right]) | |
| 239 | (define-key xterm-function-map "\eO5A" [C-up]) | 239 | (define-key xterm-function-map "\eO2D" [S-left]) |
| 240 | (define-key xterm-function-map "\eO5B" [C-down]) | 240 | (define-key xterm-function-map "\eO2F" [S-end]) |
| 241 | (define-key xterm-function-map "\eO5C" [C-right]) | 241 | (define-key xterm-function-map "\eO2H" [S-home]) |
| 242 | (define-key xterm-function-map "\eO5D" [C-left]) | 242 | |
| 243 | (define-key xterm-function-map "\eO5F" [C-end]) | 243 | (define-key xterm-function-map "\eO5A" [C-up]) |
| 244 | (define-key xterm-function-map "\eO5H" [C-home]) | 244 | (define-key xterm-function-map "\eO5B" [C-down]) |
| 245 | 245 | (define-key xterm-function-map "\eO5C" [C-right]) | |
| 246 | ;; Use inheritance to let the main keymap override those defaults. | 246 | (define-key xterm-function-map "\eO5D" [C-left]) |
| 247 | ;; This way we don't override terminfo-derived settings or settings | 247 | (define-key xterm-function-map "\eO5F" [C-end]) |
| 248 | ;; made in the .emacs file. | 248 | (define-key xterm-function-map "\eO5H" [C-home]) |
| 249 | (unless (let ((map (keymap-parent function-key-map)) | 249 | |
| 250 | found) | 250 | ;; Use inheritance to let the main keymap override those defaults. |
| 251 | (while (and (not found) map) | 251 | ;; This way we don't override terminfo-derived settings or settings |
| 252 | (setq found (eq xterm-function-map map) | 252 | ;; made in the .emacs file. |
| 253 | map (keymap-parent map))) | ||
| 254 | found) | ||
| 255 | (set-keymap-parent xterm-function-map (keymap-parent function-key-map)) | 253 | (set-keymap-parent xterm-function-map (keymap-parent function-key-map)) |
| 256 | (set-keymap-parent function-key-map xterm-function-map)) | 254 | (set-keymap-parent function-key-map xterm-function-map)) |
| 257 | 255 | ||