diff options
| author | Karoly Lorentey | 2005-06-26 03:19:45 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-06-26 03:19:45 +0000 |
| commit | 2bb819d593a8cbf989a84c5346ba9386b89f6960 (patch) | |
| tree | 4cf40e4f6ae44ce0230c4ae9ff31484b1e068023 | |
| parent | f01b6d17cc07655d6ce62a4ac5097947529b81a2 (diff) | |
| download | emacs-2bb819d593a8cbf989a84c5346ba9386b89f6960.tar.gz emacs-2bb819d593a8cbf989a84c5346ba9386b89f6960.zip | |
Update Lisp code for a terminal-local `function-key-map'.
* lisp/term/x-win.el (x-setup-function-keys): New function. Move
function-key-map tweaks here.
* lisp/faces.el (x-create-frame-with-faces): Call x-setup-function-keys.
* lisp/term/iris-ansi.el: Update for terminal-local function-key-map.
* lisp/term/lk201.el: Ditto.
* lisp/term/news.el: Ditto.
* lisp/term/rxvt.el: Ditto.
* lisp/term/sun.el: Ditto.
* lisp/term/xterm.el: Ditto.
* lisp/startup.el: Cosmetic change.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-356
| -rw-r--r-- | lisp/faces.el | 1 | ||||
| -rw-r--r-- | lisp/startup.el | 2 | ||||
| -rw-r--r-- | lisp/term/iris-ansi.el | 390 | ||||
| -rw-r--r-- | lisp/term/lk201.el | 129 | ||||
| -rw-r--r-- | lisp/term/news.el | 2 | ||||
| -rw-r--r-- | lisp/term/rxvt.el | 16 | ||||
| -rw-r--r-- | lisp/term/sun.el | 2 | ||||
| -rw-r--r-- | lisp/term/x-win.el | 40 | ||||
| -rw-r--r-- | lisp/term/xterm.el | 138 |
9 files changed, 365 insertions, 355 deletions
diff --git a/lisp/faces.el b/lisp/faces.el index e284d1f9ca5..eb8fe15e1c0 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -1713,6 +1713,7 @@ Value is the new frame created." | |||
| 1713 | success) | 1713 | success) |
| 1714 | (unwind-protect | 1714 | (unwind-protect |
| 1715 | (progn | 1715 | (progn |
| 1716 | (x-setup-function-keys frame) | ||
| 1716 | (x-handle-reverse-video frame parameters) | 1717 | (x-handle-reverse-video frame parameters) |
| 1717 | (frame-set-background-mode frame) | 1718 | (frame-set-background-mode frame) |
| 1718 | (face-set-after-frame-default frame) | 1719 | (face-set-after-frame-default frame) |
diff --git a/lisp/startup.el b/lisp/startup.el index 9bad1262579..f1cce0325f5 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -504,7 +504,7 @@ from the returned command line.") | |||
| 504 | Window-system startup files should add their own initialization | 504 | Window-system startup files should add their own initialization |
| 505 | function to this list. The function should take no arguments, | 505 | function to this list. The function should take no arguments, |
| 506 | and initialize the window system environment to prepare for | 506 | and initialize the window system environment to prepare for |
| 507 | opening the first frame (e.g. open a connection to the server).") | 507 | opening the first frame (e.g. open a connection to an X server).") |
| 508 | 508 | ||
| 509 | ;; Handle the X-like command-line arguments "-fg", "-bg", "-name", etc. | 509 | ;; Handle the X-like command-line arguments "-fg", "-bg", "-name", etc. |
| 510 | (defun tty-handle-args (args) | 510 | (defun tty-handle-args (args) |
diff --git a/lisp/term/iris-ansi.el b/lisp/term/iris-ansi.el index 05c7e9a5955..9cdddaae4e4 100644 --- a/lisp/term/iris-ansi.el +++ b/lisp/term/iris-ansi.el | |||
| @@ -25,304 +25,316 @@ | |||
| 25 | 25 | ||
| 26 | ;;; Code: | 26 | ;;; Code: |
| 27 | 27 | ||
| 28 | ;; XXX We need to find a way to have these define-keys be display-local. -- Lorentey | 28 | (defvar iris-function-map nil |
| 29 | "Function key definitions for SGI xwsh and winterm apps.") | ||
| 29 | 30 | ||
| 30 | (define-key function-key-map "\e[120q" [S-escape]) | 31 | ;; Make reloads faster. |
| 31 | (define-key function-key-map "\e[121q" [C-escape]) | 32 | (unless iris-function-map |
| 33 | (setq iris-function-map (make-sparse-keymap)) | ||
| 32 | 34 | ||
| 33 | (define-key function-key-map "\e[001q" [f1]) | 35 | (define-key iris-function-map "\e[120q" [S-escape]) |
| 34 | (define-key function-key-map "\e[013q" [S-f1]) | 36 | (define-key iris-function-map "\e[121q" [C-escape]) |
| 35 | (define-key function-key-map "\e[025q" [C-f1]) | ||
| 36 | 37 | ||
| 38 | (define-key iris-function-map "\e[001q" [f1]) | ||
| 39 | (define-key iris-function-map "\e[013q" [S-f1]) | ||
| 40 | (define-key iris-function-map "\e[025q" [C-f1]) | ||
| 37 | 41 | ||
| 38 | (define-key function-key-map "\e[002q" [f2]) | ||
| 39 | (define-key function-key-map "\e[014q" [S-f2]) | ||
| 40 | (define-key function-key-map "\e[026q" [C-f2]) | ||
| 41 | (define-key function-key-map "\e[038q" [M-f2]) | ||
| 42 | 42 | ||
| 43 | (define-key function-key-map "\e[003q" [f3]) | 43 | (define-key iris-function-map "\e[002q" [f2]) |
| 44 | (define-key function-key-map "\e[015q" [S-f3]) | 44 | (define-key iris-function-map "\e[014q" [S-f2]) |
| 45 | (define-key function-key-map "\e[027q" [C-f3]) | 45 | (define-key iris-function-map "\e[026q" [C-f2]) |
| 46 | (define-key iris-function-map "\e[038q" [M-f2]) | ||
| 46 | 47 | ||
| 48 | (define-key iris-function-map "\e[003q" [f3]) | ||
| 49 | (define-key iris-function-map "\e[015q" [S-f3]) | ||
| 50 | (define-key iris-function-map "\e[027q" [C-f3]) | ||
| 47 | 51 | ||
| 48 | (define-key function-key-map "\e[004q" [f4]) | ||
| 49 | (define-key function-key-map "\e[016q" [S-f4]) | ||
| 50 | (define-key function-key-map "\e[028q" [C-f4]) | ||
| 51 | 52 | ||
| 53 | (define-key iris-function-map "\e[004q" [f4]) | ||
| 54 | (define-key iris-function-map "\e[016q" [S-f4]) | ||
| 55 | (define-key iris-function-map "\e[028q" [C-f4]) | ||
| 52 | 56 | ||
| 53 | (define-key function-key-map "\e[005q" [f5]) | ||
| 54 | (define-key function-key-map "\e[017q" [S-f5]) | ||
| 55 | (define-key function-key-map "\e[029q" [C-f5]) | ||
| 56 | 57 | ||
| 58 | (define-key iris-function-map "\e[005q" [f5]) | ||
| 59 | (define-key iris-function-map "\e[017q" [S-f5]) | ||
| 60 | (define-key iris-function-map "\e[029q" [C-f5]) | ||
| 57 | 61 | ||
| 58 | (define-key function-key-map "\e[006q" [f6]) | ||
| 59 | (define-key function-key-map "\e[018q" [S-f6]) | ||
| 60 | (define-key function-key-map "\e[030q" [C-f6]) | ||
| 61 | 62 | ||
| 63 | (define-key iris-function-map "\e[006q" [f6]) | ||
| 64 | (define-key iris-function-map "\e[018q" [S-f6]) | ||
| 65 | (define-key iris-function-map "\e[030q" [C-f6]) | ||
| 62 | 66 | ||
| 63 | (define-key function-key-map "\e[007q" [f7]) | ||
| 64 | (define-key function-key-map "\e[019q" [S-f7]) | ||
| 65 | (define-key function-key-map "\e[031q" [C-f7]) | ||
| 66 | 67 | ||
| 68 | (define-key iris-function-map "\e[007q" [f7]) | ||
| 69 | (define-key iris-function-map "\e[019q" [S-f7]) | ||
| 70 | (define-key iris-function-map "\e[031q" [C-f7]) | ||
| 67 | 71 | ||
| 68 | (define-key function-key-map "\e[008q" [f8]) | ||
| 69 | (define-key function-key-map "\e[020q" [S-f8]) | ||
| 70 | (define-key function-key-map "\e[032q" [C-f8]) | ||
| 71 | 72 | ||
| 73 | (define-key iris-function-map "\e[008q" [f8]) | ||
| 74 | (define-key iris-function-map "\e[020q" [S-f8]) | ||
| 75 | (define-key iris-function-map "\e[032q" [C-f8]) | ||
| 72 | 76 | ||
| 73 | (define-key function-key-map "\e[009q" [f9]) | ||
| 74 | (define-key function-key-map "\e[021q" [S-f9]) | ||
| 75 | (define-key function-key-map "\e[033q" [C-f9]) | ||
| 76 | 77 | ||
| 78 | (define-key iris-function-map "\e[009q" [f9]) | ||
| 79 | (define-key iris-function-map "\e[021q" [S-f9]) | ||
| 80 | (define-key iris-function-map "\e[033q" [C-f9]) | ||
| 77 | 81 | ||
| 78 | (define-key function-key-map "\e[010q" [f10]) | ||
| 79 | (define-key function-key-map "\e[022q" [S-f10]) | ||
| 80 | (define-key function-key-map "\e[034q" [C-f10]) | ||
| 81 | 82 | ||
| 83 | (define-key iris-function-map "\e[010q" [f10]) | ||
| 84 | (define-key iris-function-map "\e[022q" [S-f10]) | ||
| 85 | (define-key iris-function-map "\e[034q" [C-f10]) | ||
| 82 | 86 | ||
| 83 | (define-key function-key-map "\e[011q" [f11]) | ||
| 84 | (define-key function-key-map "\e[023q" [S-f11]) | ||
| 85 | (define-key function-key-map "\e[035q" [C-f11]) | ||
| 86 | (define-key function-key-map "\e[047q" [M-f11]) | ||
| 87 | 87 | ||
| 88 | (define-key function-key-map "\e[012q" [f12]) | 88 | (define-key iris-function-map "\e[011q" [f11]) |
| 89 | (define-key function-key-map "\e[024q" [S-f12]) | 89 | (define-key iris-function-map "\e[023q" [S-f11]) |
| 90 | (define-key function-key-map "\e[036q" [C-f12]) | 90 | (define-key iris-function-map "\e[035q" [C-f11]) |
| 91 | (define-key function-key-map "\e[048q" [M-f12]) | 91 | (define-key iris-function-map "\e[047q" [M-f11]) |
| 92 | 92 | ||
| 93 | (define-key iris-function-map "\e[012q" [f12]) | ||
| 94 | (define-key iris-function-map "\e[024q" [S-f12]) | ||
| 95 | (define-key iris-function-map "\e[036q" [C-f12]) | ||
| 96 | (define-key iris-function-map "\e[048q" [M-f12]) | ||
| 93 | 97 | ||
| 94 | (define-key function-key-map "\e[057q" [C-`]) | ||
| 95 | (define-key function-key-map "\e[115q" [M-`]) | ||
| 96 | 98 | ||
| 97 | (define-key function-key-map "\e[049q" [?\C-1]) | 99 | (define-key iris-function-map "\e[057q" [C-`]) |
| 98 | (define-key function-key-map "\e[058q" [?\M-1]) | 100 | (define-key iris-function-map "\e[115q" [M-`]) |
| 99 | 101 | ||
| 102 | (define-key iris-function-map "\e[049q" [?\C-1]) | ||
| 103 | (define-key iris-function-map "\e[058q" [?\M-1]) | ||
| 100 | 104 | ||
| 101 | (define-key function-key-map "\e[059q" [?\M-2]) | ||
| 102 | 105 | ||
| 103 | (define-key function-key-map "\e[050q" [?\C-3]) | 106 | (define-key iris-function-map "\e[059q" [?\M-2]) |
| 104 | (define-key function-key-map "\e[060q" [?\M-3]) | ||
| 105 | 107 | ||
| 106 | (define-key function-key-map "\e[051q" [?\C-4]) | 108 | (define-key iris-function-map "\e[050q" [?\C-3]) |
| 107 | (define-key function-key-map "\e[061q" [?\M-4]) | 109 | (define-key iris-function-map "\e[060q" [?\M-3]) |
| 108 | 110 | ||
| 109 | (define-key function-key-map "\e[052q" [?\C-5]) | 111 | (define-key iris-function-map "\e[051q" [?\C-4]) |
| 110 | (define-key function-key-map "\e[062q" [?\M-5]) | 112 | (define-key iris-function-map "\e[061q" [?\M-4]) |
| 111 | 113 | ||
| 114 | (define-key iris-function-map "\e[052q" [?\C-5]) | ||
| 115 | (define-key iris-function-map "\e[062q" [?\M-5]) | ||
| 112 | 116 | ||
| 113 | (define-key function-key-map "\e[063q" [?\M-6]) | ||
| 114 | 117 | ||
| 115 | (define-key function-key-map "\e[053q" [?\C-7]) | 118 | (define-key iris-function-map "\e[063q" [?\M-6]) |
| 116 | (define-key function-key-map "\e[064q" [?\M-7]) | ||
| 117 | 119 | ||
| 118 | (define-key function-key-map "\e[054q" [?\C-8]) | 120 | (define-key iris-function-map "\e[053q" [?\C-7]) |
| 119 | (define-key function-key-map "\e[065q" [?\M-8]) | 121 | (define-key iris-function-map "\e[064q" [?\M-7]) |
| 120 | 122 | ||
| 121 | (define-key function-key-map "\e[055q" [?\C-9]) | 123 | (define-key iris-function-map "\e[054q" [?\C-8]) |
| 122 | (define-key function-key-map "\e[066q" [?\M-9]) | 124 | (define-key iris-function-map "\e[065q" [?\M-8]) |
| 123 | 125 | ||
| 124 | (define-key function-key-map "\e[056q" [?\C-0]) | 126 | (define-key iris-function-map "\e[055q" [?\C-9]) |
| 125 | (define-key function-key-map "\e[067q" [?\M-0]) | 127 | (define-key iris-function-map "\e[066q" [?\M-9]) |
| 126 | 128 | ||
| 127 | (define-key function-key-map "\e[068q" [?\M--]) | 129 | (define-key iris-function-map "\e[056q" [?\C-0]) |
| 130 | (define-key iris-function-map "\e[067q" [?\M-0]) | ||
| 128 | 131 | ||
| 129 | (define-key function-key-map "\e[069q" [?\C-=]) | 132 | (define-key iris-function-map "\e[068q" [?\M--]) |
| 130 | (define-key function-key-map "\e[070q" [?\M-=]) | ||
| 131 | 133 | ||
| 132 | ;; I don't know what to do with those. | 134 | (define-key iris-function-map "\e[069q" [?\C-=]) |
| 133 | ;(define-key function-key-map "^H" [<del>]) | 135 | (define-key iris-function-map "\e[070q" [?\M-=]) |
| 134 | ;(define-key function-key-map "^H" [S-<del>]) | ||
| 135 | ;(define-key function-key-map "\177" [C-<del>]) | ||
| 136 | ;(define-key function-key-map "\e[071q" [M-<del>]) | ||
| 137 | 136 | ||
| 138 | (define-key function-key-map "\e[Z" [?\S-\t]) | 137 | ;; I don't know what to do with those. |
| 139 | (define-key function-key-map "\e[072q" [?\C-\t]) | 138 | ;(define-key iris-function-map "^H" [<del>]) |
| 140 | ;; This only works if you remove the M-TAB keybing from the system.4Dwmrc | 139 | ;(define-key iris-function-map "^H" [S-<del>]) |
| 141 | ;; our your ~/.4Dwmrc, if you use the 4Dwm window manager. | 140 | ;(define-key iris-function-map "\177" [C-<del>]) |
| 142 | (define-key function-key-map "\e[073q" [?\M-\t]) | 141 | ;(define-key iris-function-map "\e[071q" [M-<del>]) |
| 143 | 142 | ||
| 144 | (define-key function-key-map "\e[074q" [?\M-q]) | 143 | (define-key iris-function-map "\e[Z" [?\S-\t]) |
| 144 | (define-key iris-function-map "\e[072q" [?\C-\t]) | ||
| 145 | ;; This only works if you remove the M-TAB keybing from the system.4Dwmrc | ||
| 146 | ;; our your ~/.4Dwmrc, if you use the 4Dwm window manager. | ||
| 147 | (define-key iris-function-map "\e[073q" [?\M-\t]) | ||
| 145 | 148 | ||
| 146 | (define-key function-key-map "\e[075q" [?\M-w]) | 149 | (define-key iris-function-map "\e[074q" [?\M-q]) |
| 147 | 150 | ||
| 148 | (define-key function-key-map "\e[076q" [?\M-e]) | 151 | (define-key iris-function-map "\e[075q" [?\M-w]) |
| 149 | 152 | ||
| 150 | (define-key function-key-map "\e[077q" [?\M-r]) | 153 | (define-key iris-function-map "\e[076q" [?\M-e]) |
| 151 | 154 | ||
| 152 | (define-key function-key-map "\e[078q" [?\M-t]) | 155 | (define-key iris-function-map "\e[077q" [?\M-r]) |
| 153 | 156 | ||
| 154 | (define-key function-key-map "\e[079q" [?\M-y]) | 157 | (define-key iris-function-map "\e[078q" [?\M-t]) |
| 155 | 158 | ||
| 156 | (define-key function-key-map "\e[080q" [?\M-u]) | 159 | (define-key iris-function-map "\e[079q" [?\M-y]) |
| 157 | 160 | ||
| 158 | (define-key function-key-map "\e[081q" [?\M-i]) | 161 | (define-key iris-function-map "\e[080q" [?\M-u]) |
| 159 | 162 | ||
| 160 | (define-key function-key-map "\e[082q" [?\M-o]) | 163 | (define-key iris-function-map "\e[081q" [?\M-i]) |
| 161 | 164 | ||
| 162 | (define-key function-key-map "\e[083q" [?\M-p]) | 165 | (define-key iris-function-map "\e[082q" [?\M-o]) |
| 163 | 166 | ||
| 164 | (define-key function-key-map "\e[084q" [?\M-\[]) | 167 | (define-key iris-function-map "\e[083q" [?\M-p]) |
| 165 | 168 | ||
| 166 | (define-key function-key-map "\e[085q" [?\M-\]]) | 169 | (define-key iris-function-map "\e[084q" [?\M-\[]) |
| 167 | 170 | ||
| 168 | (define-key function-key-map "\e[086q" [?\M-\\]) | 171 | (define-key iris-function-map "\e[085q" [?\M-\]]) |
| 169 | 172 | ||
| 170 | (define-key function-key-map "\e[087q" [?\M-a]) | 173 | (define-key iris-function-map "\e[086q" [?\M-\\]) |
| 171 | 174 | ||
| 172 | (define-key function-key-map "\e[088q" [?\M-s]) | 175 | (define-key iris-function-map "\e[087q" [?\M-a]) |
| 173 | 176 | ||
| 174 | (define-key function-key-map "\e[089q" [?\M-d]) | 177 | (define-key iris-function-map "\e[088q" [?\M-s]) |
| 175 | 178 | ||
| 176 | (define-key function-key-map "\e[090q" [?\M-f]) | 179 | (define-key iris-function-map "\e[089q" [?\M-d]) |
| 177 | 180 | ||
| 178 | (define-key function-key-map "\e[091q" [?\M-g]) | 181 | (define-key iris-function-map "\e[090q" [?\M-f]) |
| 179 | 182 | ||
| 180 | (define-key function-key-map "\e[092q" [?\M-h]) | 183 | (define-key iris-function-map "\e[091q" [?\M-g]) |
| 181 | 184 | ||
| 182 | (define-key function-key-map "\e[093q" [?\M-j]) | 185 | (define-key iris-function-map "\e[092q" [?\M-h]) |
| 183 | 186 | ||
| 184 | (define-key function-key-map "\e[094q" [?\M-k]) | 187 | (define-key iris-function-map "\e[093q" [?\M-j]) |
| 185 | 188 | ||
| 186 | (define-key function-key-map "\e[095q" [?\M-l]) | 189 | (define-key iris-function-map "\e[094q" [?\M-k]) |
| 187 | 190 | ||
| 188 | (define-key function-key-map "\e[096q" [?\C-\;]) | 191 | (define-key iris-function-map "\e[095q" [?\M-l]) |
| 189 | (define-key function-key-map "\e[097q" [?\M-:]) ;; we are cheating | ||
| 190 | ;; here, this is realy | ||
| 191 | ;; M-;, but M-: | ||
| 192 | ;; generates the same | ||
| 193 | ;; string and is more | ||
| 194 | ;; usefull. | ||
| 195 | 192 | ||
| 196 | (define-key function-key-map "\e[098q" [?\C-']) | 193 | (define-key iris-function-map "\e[096q" [?\C-\;]) |
| 197 | (define-key function-key-map "\e[099q" [?\M-']) | 194 | (define-key iris-function-map "\e[097q" [?\M-:]) ;; we are cheating |
| 195 | ;; here, this is realy | ||
| 196 | ;; M-;, but M-: | ||
| 197 | ;; generates the same | ||
| 198 | ;; string and is more | ||
| 199 | ;; usefull. | ||
| 198 | 200 | ||
| 199 | (define-key function-key-map "\e[100q" [?\M-\n]) | 201 | (define-key iris-function-map "\e[098q" [?\C-']) |
| 202 | (define-key iris-function-map "\e[099q" [?\M-']) | ||
| 200 | 203 | ||
| 201 | (define-key function-key-map "\e[101q" [?\M-z]) | 204 | (define-key iris-function-map "\e[100q" [?\M-\n]) |
| 202 | 205 | ||
| 203 | (define-key function-key-map "\e[102q" [?\M-x]) | 206 | (define-key iris-function-map "\e[101q" [?\M-z]) |
| 204 | 207 | ||
| 205 | (define-key function-key-map "\e[103q" [?\M-c]) | 208 | (define-key iris-function-map "\e[102q" [?\M-x]) |
| 206 | 209 | ||
| 207 | (define-key function-key-map "\e[104q" [?\M-v]) | 210 | (define-key iris-function-map "\e[103q" [?\M-c]) |
| 208 | 211 | ||
| 209 | (define-key function-key-map "\e[105q" [?\M-b]) | 212 | (define-key iris-function-map "\e[104q" [?\M-v]) |
| 210 | 213 | ||
| 211 | (define-key function-key-map "\e[106q" [M-n]) | 214 | (define-key iris-function-map "\e[105q" [?\M-b]) |
| 212 | 215 | ||
| 213 | (define-key function-key-map "\e[107q" [M-m]) | 216 | (define-key iris-function-map "\e[106q" [M-n]) |
| 214 | 217 | ||
| 215 | (define-key function-key-map "\e[108q" [?\C-,]) | 218 | (define-key iris-function-map "\e[107q" [M-m]) |
| 216 | (define-key function-key-map "\e[109q" [?\M-,]) | ||
| 217 | 219 | ||
| 218 | (define-key function-key-map "\e[110q" [?\C-.]) | 220 | (define-key iris-function-map "\e[108q" [?\C-,]) |
| 219 | (define-key function-key-map "\e[111q" [?\M-.]) | 221 | (define-key iris-function-map "\e[109q" [?\M-,]) |
| 220 | 222 | ||
| 221 | (define-key function-key-map "\e[112q" [?\C-/]) | 223 | (define-key iris-function-map "\e[110q" [?\C-.]) |
| 222 | (define-key function-key-map "\e[113q" [?\M-/]) | 224 | (define-key iris-function-map "\e[111q" [?\M-.]) |
| 223 | 225 | ||
| 224 | (define-key function-key-map "\e[139q" [insert]) | 226 | (define-key iris-function-map "\e[112q" [?\C-/]) |
| 225 | (define-key function-key-map "\e[139q" [S-insert]) | 227 | (define-key iris-function-map "\e[113q" [?\M-/]) |
| 226 | (define-key function-key-map "\e[140q" [C-insert]) | ||
| 227 | (define-key function-key-map "\e[141q" [M-insert]) | ||
| 228 | 228 | ||
| 229 | (define-key function-key-map "\e[H" [home]) | 229 | (define-key iris-function-map "\e[139q" [insert]) |
| 230 | (define-key function-key-map "\e[143q" [S-home]) | 230 | (define-key iris-function-map "\e[139q" [S-insert]) |
| 231 | (define-key function-key-map "\e[144q" [C-home]) | 231 | (define-key iris-function-map "\e[140q" [C-insert]) |
| 232 | (define-key iris-function-map "\e[141q" [M-insert]) | ||
| 232 | 233 | ||
| 234 | (define-key iris-function-map "\e[H" [home]) | ||
| 235 | (define-key iris-function-map "\e[143q" [S-home]) | ||
| 236 | (define-key iris-function-map "\e[144q" [C-home]) | ||
| 233 | 237 | ||
| 234 | (define-key function-key-map "\e[150q" [prior]) | ||
| 235 | (define-key function-key-map "\e[151q" [S-prior]) ;; those don't seem | ||
| 236 | ;; to generate | ||
| 237 | ;; anything | ||
| 238 | (define-key function-key-map "\e[152q" [C-prior]) | ||
| 239 | 238 | ||
| 239 | (define-key iris-function-map "\e[150q" [prior]) | ||
| 240 | (define-key iris-function-map "\e[151q" [S-prior]) ;; those don't seem | ||
| 241 | ;; to generate | ||
| 242 | ;; anything | ||
| 243 | (define-key iris-function-map "\e[152q" [C-prior]) | ||
| 240 | 244 | ||
| 241 | ;; (define-key function-key-map "^?" [delete]) ?? something else seems to take care of this. | ||
| 242 | (define-key function-key-map "\e[P" [S-delete]) | ||
| 243 | (define-key function-key-map "\e[142q" [C-delete]) | ||
| 244 | (define-key function-key-map "\e[M" [M-delete]) | ||
| 245 | 245 | ||
| 246 | (define-key function-key-map "\e[146q" [end]) | 246 | ;; (define-key iris-function-map "^?" [delete]) ?? something else seems to take care of this. |
| 247 | (define-key function-key-map "\e[147q" [S-end]) ;; those don't seem to | 247 | (define-key iris-function-map "\e[P" [S-delete]) |
| 248 | ;; generate anything | 248 | (define-key iris-function-map "\e[142q" [C-delete]) |
| 249 | (define-key function-key-map "\e[148q" [C-end]) | 249 | (define-key iris-function-map "\e[M" [M-delete]) |
| 250 | 250 | ||
| 251 | (define-key function-key-map "\e[154q" [next]) | 251 | (define-key iris-function-map "\e[146q" [end]) |
| 252 | (define-key function-key-map "\e[155q" [S-next]) | 252 | (define-key iris-function-map "\e[147q" [S-end]) ;; those don't seem to |
| 253 | (define-key function-key-map "\e[156q" [C-next]) | 253 | ;; generate anything |
| 254 | (define-key iris-function-map "\e[148q" [C-end]) | ||
| 254 | 255 | ||
| 256 | (define-key iris-function-map "\e[154q" [next]) | ||
| 257 | (define-key iris-function-map "\e[155q" [S-next]) | ||
| 258 | (define-key iris-function-map "\e[156q" [C-next]) | ||
| 255 | 259 | ||
| 256 | (define-key function-key-map "\e[161q" [S-up]) | ||
| 257 | (define-key function-key-map "\e[162q" [C-up]) | ||
| 258 | (define-key function-key-map "\e[163q" [M-up]) | ||
| 259 | 260 | ||
| 260 | (define-key function-key-map "\e[158q" [S-left]) | 261 | (define-key iris-function-map "\e[161q" [S-up]) |
| 261 | (define-key function-key-map "\e[159q" [C-left]) | 262 | (define-key iris-function-map "\e[162q" [C-up]) |
| 262 | (define-key function-key-map "\e[160q" [M-left]) | 263 | (define-key iris-function-map "\e[163q" [M-up]) |
| 263 | 264 | ||
| 264 | (define-key function-key-map "\e[164q" [S-down]) | 265 | (define-key iris-function-map "\e[158q" [S-left]) |
| 265 | (define-key function-key-map "\e[165q" [C-down]) | 266 | (define-key iris-function-map "\e[159q" [C-left]) |
| 266 | (define-key function-key-map "\e[166q" [M-down]) | 267 | (define-key iris-function-map "\e[160q" [M-left]) |
| 267 | 268 | ||
| 268 | (define-key function-key-map "\e[167q" [S-right]) | 269 | (define-key iris-function-map "\e[164q" [S-down]) |
| 269 | (define-key function-key-map "\e[168q" [C-right]) | 270 | (define-key iris-function-map "\e[165q" [C-down]) |
| 270 | (define-key function-key-map "\e[169q" [M-right]) | 271 | (define-key iris-function-map "\e[166q" [M-down]) |
| 271 | 272 | ||
| 272 | ;; Keypad functions, most of those are untested. | 273 | (define-key iris-function-map "\e[167q" [S-right]) |
| 273 | (define-key function-key-map "\e[179q" [?\C-/]) | 274 | (define-key iris-function-map "\e[168q" [C-right]) |
| 274 | (define-key function-key-map "\e[180q" [?\M-/]) | 275 | (define-key iris-function-map "\e[169q" [M-right]) |
| 275 | 276 | ||
| 276 | (define-key function-key-map "\e[187q" [?\C-*]) | 277 | ;; Keypad functions, most of those are untested. |
| 277 | (define-key function-key-map "\e[188q" [?\M-*]) | 278 | (define-key iris-function-map "\e[179q" [?\C-/]) |
| 279 | (define-key iris-function-map "\e[180q" [?\M-/]) | ||
| 278 | 280 | ||
| 279 | (define-key function-key-map "\e[198q" [?\C--]) | 281 | (define-key iris-function-map "\e[187q" [?\C-*]) |
| 280 | (define-key function-key-map "\e[199q" [?\M--]) | 282 | (define-key iris-function-map "\e[188q" [?\M-*]) |
| 281 | 283 | ||
| 282 | ;; Something else takes care of home, up, prior, down, left, right, next | 284 | (define-key iris-function-map "\e[198q" [?\C--]) |
| 283 | ;(define-key function-key-map "\e[H" [home]) | 285 | (define-key iris-function-map "\e[199q" [?\M--]) |
| 284 | (define-key function-key-map "\e[172q" [C-home]) | ||
| 285 | 286 | ||
| 286 | ;(define-key function-key-map "\e[A" [up]) | 287 | ;; Something else takes care of home, up, prior, down, left, right, next |
| 287 | (define-key function-key-map "\e[182q" [C-up]) | 288 | ;(define-key iris-function-map "\e[H" [home]) |
| 289 | (define-key iris-function-map "\e[172q" [C-home]) | ||
| 288 | 290 | ||
| 291 | ;(define-key iris-function-map "\e[A" [up]) | ||
| 292 | (define-key iris-function-map "\e[182q" [C-up]) | ||
| 289 | 293 | ||
| 290 | ;(define-key function-key-map "\e[150q" [prior]) | ||
| 291 | (define-key function-key-map "\e[190q" [C-prior]) | ||
| 292 | 294 | ||
| 295 | ;(define-key iris-function-map "\e[150q" [prior]) | ||
| 296 | (define-key iris-function-map "\e[190q" [C-prior]) | ||
| 293 | 297 | ||
| 294 | (define-key function-key-map "\e[200q" [?\C-+]) | ||
| 295 | (define-key function-key-map "\e[201q" [?\M-+]) | ||
| 296 | 298 | ||
| 297 | ;(define-key function-key-map "\e[D" [left]) | 299 | (define-key iris-function-map "\e[200q" [?\C-+]) |
| 298 | (define-key function-key-map "\e[174q" [C-left]) | 300 | (define-key iris-function-map "\e[201q" [?\M-+]) |
| 299 | 301 | ||
| 302 | ;(define-key iris-function-map "\e[D" [left]) | ||
| 303 | (define-key iris-function-map "\e[174q" [C-left]) | ||
| 300 | 304 | ||
| 301 | (define-key function-key-map "\e[000q" [begin]) | ||
| 302 | (define-key function-key-map "\e[184q" [C-begin]) | ||
| 303 | 305 | ||
| 306 | (define-key iris-function-map "\e[000q" [begin]) | ||
| 307 | (define-key iris-function-map "\e[184q" [C-begin]) | ||
| 304 | 308 | ||
| 305 | ;(define-key function-key-map "\e[C" [right]) | ||
| 306 | (define-key function-key-map "\e[192q" [C-right]) | ||
| 307 | 309 | ||
| 308 | ;(define-key function-key-map "\e[146q" [end]) | 310 | ;(define-key iris-function-map "\e[C" [right]) |
| 309 | (define-key function-key-map "\e[176q" [C-end]) | 311 | (define-key iris-function-map "\e[192q" [C-right]) |
| 310 | 312 | ||
| 311 | ;(define-key function-key-map "\e[B" [down]) | 313 | ;(define-key iris-function-map "\e[146q" [end]) |
| 312 | (define-key function-key-map "\e[186q" [C-down]) | 314 | (define-key iris-function-map "\e[176q" [C-end]) |
| 313 | 315 | ||
| 314 | ;(define-key function-key-map "\e[154q" [next]) | 316 | ;(define-key iris-function-map "\e[B" [down]) |
| 315 | (define-key function-key-map "\e[194q" [C-next]) | 317 | (define-key iris-function-map "\e[186q" [C-down]) |
| 316 | 318 | ||
| 319 | ;(define-key iris-function-map "\e[154q" [next]) | ||
| 320 | (define-key iris-function-map "\e[194q" [C-next]) | ||
| 317 | 321 | ||
| 318 | (define-key function-key-map "\e[100q" [M-enter]) | ||
| 319 | 322 | ||
| 320 | (define-key function-key-map "\e[139q" [insert]) | 323 | (define-key iris-function-map "\e[100q" [M-enter]) |
| 321 | (define-key function-key-map "\e[178q" [C-inset]) | ||
| 322 | 324 | ||
| 323 | (define-key function-key-map "\e[P" [delete]) | 325 | (define-key iris-function-map "\e[139q" [insert]) |
| 324 | (define-key function-key-map "\e[196q" [C-delete]) | 326 | (define-key iris-function-map "\e[178q" [C-inset]) |
| 325 | (define-key function-key-map "\e[197q" [M-delete]) | 327 | |
| 328 | (define-key iris-function-map "\e[P" [delete]) | ||
| 329 | (define-key iris-function-map "\e[196q" [C-delete]) | ||
| 330 | (define-key iris-function-map "\e[197q" [M-delete])) | ||
| 331 | |||
| 332 | ;; Use inheritance to let the main keymap override these defaults. | ||
| 333 | ;; This way we don't override terminfo-derived settings or settings | ||
| 334 | ;; made in the .emacs file. | ||
| 335 | (let ((m (copy-keymap iris-function-map))) | ||
| 336 | (set-keymap-parent m (keymap-parent function-key-map)) | ||
| 337 | (set-keymap-parent function-key-map m)) | ||
| 326 | 338 | ||
| 327 | ;;; arch-tag: b1d0e73a-bb7d-47be-9fb2-6fb126469a1b | 339 | ;;; arch-tag: b1d0e73a-bb7d-47be-9fb2-6fb126469a1b |
| 328 | ;;; iris-ansi.el ends here | 340 | ;;; iris-ansi.el ends here |
diff --git a/lisp/term/lk201.el b/lisp/term/lk201.el index e09b176ba8f..735db12ba82 100644 --- a/lisp/term/lk201.el +++ b/lisp/term/lk201.el | |||
| @@ -2,86 +2,85 @@ | |||
| 2 | ;; Define function key sequences for DEC terminals. | 2 | ;; Define function key sequences for DEC terminals. |
| 3 | 3 | ||
| 4 | (defvar lk201-function-map nil | 4 | (defvar lk201-function-map nil |
| 5 | "Function key definitions for lk201.") | 5 | "Function key definitions for DEC terminals.") |
| 6 | 6 | ||
| 7 | ;; Protect against reloads. | 7 | ;; Make reloads faster. |
| 8 | (unless lk201-function-map | 8 | (unless lk201-function-map |
| 9 | (setq lk201-function-map (make-sparse-keymap)) | 9 | (setq lk201-function-map (make-sparse-keymap)) |
| 10 | 10 | ||
| 11 | ;; XXX We need to find a way to have these define-keys be display-local. -- Lorentey | ||
| 12 | |||
| 13 | ;; Termcap or terminfo should set these. | 11 | ;; Termcap or terminfo should set these. |
| 14 | ;; (define-key function-key-map "\e[A" [up]) | 12 | ;; (define-key lk201-function-map "\e[A" [up]) |
| 15 | ;; (define-key function-key-map "\e[B" [down]) | 13 | ;; (define-key lk201-function-map "\e[B" [down]) |
| 16 | ;; (define-key function-key-map "\e[C" [right]) | 14 | ;; (define-key lk201-function-map "\e[C" [right]) |
| 17 | ;; (define-key function-key-map "\e[D" [left]) | 15 | ;; (define-key lk201-function-map "\e[D" [left]) |
| 18 | 16 | ||
| 19 | (define-key function-key-map "\e[1~" [find]) | 17 | (define-key lk201-function-map "\e[1~" [find]) |
| 20 | (define-key function-key-map "\e[2~" [insert]) | 18 | (define-key lk201-function-map "\e[2~" [insert]) |
| 21 | (define-key function-key-map "\e[3~" [delete]) | 19 | (define-key lk201-function-map "\e[3~" [delete]) |
| 22 | (define-key function-key-map "\e[4~" [select]) | 20 | (define-key lk201-function-map "\e[4~" [select]) |
| 23 | (define-key function-key-map "\e[5~" [prior]) | 21 | (define-key lk201-function-map "\e[5~" [prior]) |
| 24 | (define-key function-key-map "\e[6~" [next]) | 22 | (define-key lk201-function-map "\e[6~" [next]) |
| 25 | (define-key function-key-map "\e[11~" [f1]) | 23 | (define-key lk201-function-map "\e[11~" [f1]) |
| 26 | (define-key function-key-map "\e[12~" [f2]) | 24 | (define-key lk201-function-map "\e[12~" [f2]) |
| 27 | (define-key function-key-map "\e[13~" [f3]) | 25 | (define-key lk201-function-map "\e[13~" [f3]) |
| 28 | (define-key function-key-map "\e[14~" [f4]) | 26 | (define-key lk201-function-map "\e[14~" [f4]) |
| 29 | (define-key function-key-map "\e[15~" [f5]) | 27 | (define-key lk201-function-map "\e[15~" [f5]) |
| 30 | (define-key function-key-map "\e[17~" [f6]) | 28 | (define-key lk201-function-map "\e[17~" [f6]) |
| 31 | (define-key function-key-map "\e[18~" [f7]) | 29 | (define-key lk201-function-map "\e[18~" [f7]) |
| 32 | (define-key function-key-map "\e[19~" [f8]) | 30 | (define-key lk201-function-map "\e[19~" [f8]) |
| 33 | (define-key function-key-map "\e[20~" [f9]) | 31 | (define-key lk201-function-map "\e[20~" [f9]) |
| 34 | (define-key function-key-map "\e[21~" [f10]) | 32 | (define-key lk201-function-map "\e[21~" [f10]) |
| 35 | ;; Customarily F11 is used as the ESC key. | 33 | ;; Customarily F11 is used as the ESC key. |
| 36 | ;; The file that includes this one, takes care of that. | 34 | ;; The file that includes this one, takes care of that. |
| 37 | (define-key function-key-map "\e[23~" [f11]) | 35 | (define-key lk201-function-map "\e[23~" [f11]) |
| 38 | (define-key function-key-map "\e[24~" [f12]) | 36 | (define-key lk201-function-map "\e[24~" [f12]) |
| 39 | (define-key function-key-map "\e[25~" [f13]) | 37 | (define-key lk201-function-map "\e[25~" [f13]) |
| 40 | (define-key function-key-map "\e[26~" [f14]) | 38 | (define-key lk201-function-map "\e[26~" [f14]) |
| 41 | (define-key function-key-map "\e[28~" [help]) | 39 | (define-key lk201-function-map "\e[28~" [help]) |
| 42 | (define-key function-key-map "\e[29~" [menu]) | 40 | (define-key lk201-function-map "\e[29~" [menu]) |
| 43 | (define-key function-key-map "\e[31~" [f17]) | 41 | (define-key lk201-function-map "\e[31~" [f17]) |
| 44 | (define-key function-key-map "\e[32~" [f18]) | 42 | (define-key lk201-function-map "\e[32~" [f18]) |
| 45 | (define-key function-key-map "\e[33~" [f19]) | 43 | (define-key lk201-function-map "\e[33~" [f19]) |
| 46 | (define-key function-key-map "\e[34~" [f20]) | 44 | (define-key lk201-function-map "\e[34~" [f20]) |
| 47 | 45 | ||
| 48 | ;; Termcap or terminfo should set these. | 46 | ;; Termcap or terminfo should set these. |
| 49 | ;; (define-key function-key-map "\eOA" [up]) | 47 | ;; (define-key lk201-function-map "\eOA" [up]) |
| 50 | ;; (define-key function-key-map "\eOB" [down]) | 48 | ;; (define-key lk201-function-map "\eOB" [down]) |
| 51 | ;; (define-key function-key-map "\eOC" [right]) | 49 | ;; (define-key lk201-function-map "\eOC" [right]) |
| 52 | ;; (define-key function-key-map "\eOD" [left]) | 50 | ;; (define-key lk201-function-map "\eOD" [left]) |
| 53 | 51 | ||
| 54 | ;; Termcap or terminfo should set these, but doesn't properly. | 52 | ;; Termcap or terminfo should set these, but doesn't properly. |
| 55 | ;; Termcap sets these to k1-k4, which get mapped to f1-f4 in term.c | 53 | ;; Termcap sets these to k1-k4, which get mapped to f1-f4 in term.c |
| 56 | (define-key function-key-map "\eOP" [kp-f1]) | 54 | (define-key lk201-function-map "\eOP" [kp-f1]) |
| 57 | (define-key function-key-map "\eOQ" [kp-f2]) | 55 | (define-key lk201-function-map "\eOQ" [kp-f2]) |
| 58 | (define-key function-key-map "\eOR" [kp-f3]) | 56 | (define-key lk201-function-map "\eOR" [kp-f3]) |
| 59 | (define-key function-key-map "\eOS" [kp-f4]) | 57 | (define-key lk201-function-map "\eOS" [kp-f4]) |
| 60 | 58 | ||
| 61 | (define-key function-key-map "\eOI" [kp-tab]) | 59 | (define-key lk201-function-map "\eOI" [kp-tab]) |
| 62 | (define-key function-key-map "\eOj" [kp-multiply]) | 60 | (define-key lk201-function-map "\eOj" [kp-multiply]) |
| 63 | (define-key function-key-map "\eOk" [kp-add]) | 61 | (define-key lk201-function-map "\eOk" [kp-add]) |
| 64 | (define-key function-key-map "\eOl" [kp-separator]) | 62 | (define-key lk201-function-map "\eOl" [kp-separator]) |
| 65 | (define-key function-key-map "\eOM" [kp-enter]) | 63 | (define-key lk201-function-map "\eOM" [kp-enter]) |
| 66 | (define-key function-key-map "\eOm" [kp-subtract]) | 64 | (define-key lk201-function-map "\eOm" [kp-subtract]) |
| 67 | (define-key function-key-map "\eOn" [kp-decimal]) | 65 | (define-key lk201-function-map "\eOn" [kp-decimal]) |
| 68 | (define-key function-key-map "\eOo" [kp-divide]) | 66 | (define-key lk201-function-map "\eOo" [kp-divide]) |
| 69 | (define-key function-key-map "\eOp" [kp-0]) | 67 | (define-key lk201-function-map "\eOp" [kp-0]) |
| 70 | (define-key function-key-map "\eOq" [kp-1]) | 68 | (define-key lk201-function-map "\eOq" [kp-1]) |
| 71 | (define-key function-key-map "\eOr" [kp-2]) | 69 | (define-key lk201-function-map "\eOr" [kp-2]) |
| 72 | (define-key function-key-map "\eOs" [kp-3]) | 70 | (define-key lk201-function-map "\eOs" [kp-3]) |
| 73 | (define-key function-key-map "\eOt" [kp-4]) | 71 | (define-key lk201-function-map "\eOt" [kp-4]) |
| 74 | (define-key function-key-map "\eOu" [kp-5]) | 72 | (define-key lk201-function-map "\eOu" [kp-5]) |
| 75 | (define-key function-key-map "\eOv" [kp-6]) | 73 | (define-key lk201-function-map "\eOv" [kp-6]) |
| 76 | (define-key function-key-map "\eOw" [kp-7]) | 74 | (define-key lk201-function-map "\eOw" [kp-7]) |
| 77 | (define-key function-key-map "\eOx" [kp-8]) | 75 | (define-key lk201-function-map "\eOx" [kp-8]) |
| 78 | (define-key function-key-map "\eOy" [kp-9]) | 76 | (define-key lk201-function-map "\eOy" [kp-9])) |
| 79 | 77 | ||
| 80 | ;; Use inheritance to let the main keymap override these defaults. | 78 | ;; Use inheritance to let the main keymap override these defaults. |
| 81 | ;; This way we don't override terminfo-derived settings or settings | 79 | ;; This way we don't override terminfo-derived settings or settings |
| 82 | ;; made in the .emacs file. | 80 | ;; made in the .emacs file. |
| 83 | (set-keymap-parent lk201-function-map (keymap-parent function-key-map)) | 81 | (let ((m (copy-keymap lk201-function-map))) |
| 84 | (set-keymap-parent function-key-map lk201-function-map)) | 82 | (set-keymap-parent m (keymap-parent function-key-map)) |
| 83 | (set-keymap-parent function-key-map m)) | ||
| 85 | 84 | ||
| 86 | ;;; arch-tag: 7ffb4444-6a23-43e1-b457-43cf4f673c0d | 85 | ;;; arch-tag: 7ffb4444-6a23-43e1-b457-43cf4f673c0d |
| 87 | ;;; lk201.el ends here | 86 | ;;; lk201.el ends here |
diff --git a/lisp/term/news.el b/lisp/term/news.el index 1b251dae58e..a6f7481c422 100644 --- a/lisp/term/news.el +++ b/lisp/term/news.el | |||
| @@ -35,8 +35,6 @@ | |||
| 35 | (if (not (keymapp news-fkey-prefix)) | 35 | (if (not (keymapp news-fkey-prefix)) |
| 36 | (error "What? Your news termcap/terminfo has no keycaps in it")) | 36 | (error "What? Your news termcap/terminfo has no keycaps in it")) |
| 37 | 37 | ||
| 38 | ;; XXX We need to find a way to have these define-keys be display-local. -- Lorentey | ||
| 39 | |||
| 40 | ;; Termcap or terminfo will set these | 38 | ;; Termcap or terminfo will set these |
| 41 | ;; (define-key news-fkey-prefix "P" [f1]) | 39 | ;; (define-key news-fkey-prefix "P" [f1]) |
| 42 | ;; (define-key news-fkey-prefix "Q" [f2]) | 40 | ;; (define-key news-fkey-prefix "Q" [f2]) |
diff --git a/lisp/term/rxvt.el b/lisp/term/rxvt.el index 180e0b40946..6b824ecd0b9 100644 --- a/lisp/term/rxvt.el +++ b/lisp/term/rxvt.el | |||
| @@ -36,7 +36,6 @@ | |||
| 36 | (setq rxvt-function-map (make-sparse-keymap)) | 36 | (setq rxvt-function-map (make-sparse-keymap)) |
| 37 | 37 | ||
| 38 | ;; Set up function-key-map entries that termcap and terminfo don't know. | 38 | ;; Set up function-key-map entries that termcap and terminfo don't know. |
| 39 | ;; XXX We need to find a way to have these define-keys be display-local. -- Lorentey | ||
| 40 | (define-key rxvt-function-map "\e[A" [up]) | 39 | (define-key rxvt-function-map "\e[A" [up]) |
| 41 | (define-key rxvt-function-map "\e[B" [down]) | 40 | (define-key rxvt-function-map "\e[B" [down]) |
| 42 | (define-key rxvt-function-map "\e[C" [right]) | 41 | (define-key rxvt-function-map "\e[C" [right]) |
| @@ -95,13 +94,14 @@ | |||
| 95 | (define-key rxvt-function-map "\e[d" [S-left]) | 94 | (define-key rxvt-function-map "\e[d" [S-left]) |
| 96 | (define-key rxvt-function-map "\e[c" [S-right]) | 95 | (define-key rxvt-function-map "\e[c" [S-right]) |
| 97 | (define-key rxvt-function-map "\e[a" [S-up]) | 96 | (define-key rxvt-function-map "\e[a" [S-up]) |
| 98 | (define-key rxvt-function-map "\e[b" [S-down]) | 97 | (define-key rxvt-function-map "\e[b" [S-down])) |
| 99 | 98 | ||
| 100 | ;; Use inheritance to let the main keymap override those defaults. | 99 | ;; Use inheritance to let the main keymap override those defaults. |
| 101 | ;; This way we don't override terminfo-derived settings or settings | 100 | ;; This way we don't override terminfo-derived settings or settings |
| 102 | ;; made in the .emacs file. | 101 | ;; made in the .emacs file. |
| 103 | (set-keymap-parent rxvt-function-map (keymap-parent function-key-map)) | 102 | (let ((m (copy-keymap rxvt-function-map))) |
| 104 | (set-keymap-parent function-key-map rxvt-function-map)) | 103 | (set-keymap-parent m (keymap-parent function-key-map)) |
| 104 | (set-keymap-parent function-key-map m)) | ||
| 105 | 105 | ||
| 106 | 106 | ||
| 107 | ;; Set up colors, for those versions of rxvt that support it. | 107 | ;; Set up colors, for those versions of rxvt that support it. |
diff --git a/lisp/term/sun.el b/lisp/term/sun.el index 667762e0aa7..238bb2f7212 100644 --- a/lisp/term/sun.el +++ b/lisp/term/sun.el | |||
| @@ -92,8 +92,6 @@ | |||
| 92 | ;; so we ignore them on the way down | 92 | ;; so we ignore them on the way down |
| 93 | ;; | 93 | ;; |
| 94 | 94 | ||
| 95 | ;; XXX We need to find a way to have these define-keys be display-local. -- Lorentey | ||
| 96 | |||
| 97 | (defvar sun-raw-prefix (make-sparse-keymap)) | 95 | (defvar sun-raw-prefix (make-sparse-keymap)) |
| 98 | (define-key function-key-map "\e[" sun-raw-prefix) | 96 | (define-key function-key-map "\e[" sun-raw-prefix) |
| 99 | 97 | ||
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index ae36e208bff..56ee16de2ba 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el | |||
| @@ -1167,24 +1167,26 @@ XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp") | |||
| 1167 | 1167 | ||
| 1168 | ;;;; Function keys | 1168 | ;;;; Function keys |
| 1169 | 1169 | ||
| 1170 | ;; Map certain keypad keys into ASCII characters | 1170 | (defun x-setup-function-keys (frame) |
| 1171 | ;; that people usually expect. | 1171 | "Set up `function-key-map' on FRAME for the X window system." |
| 1172 | (define-key function-key-map [backspace] [127]) | 1172 | ;; Map certain keypad keys into ASCII characters that people usually expect. |
| 1173 | (define-key function-key-map [delete] [127]) | 1173 | (with-selected-frame (or frame (selected-frame)) |
| 1174 | (define-key function-key-map [tab] [?\t]) | 1174 | (define-key function-key-map [backspace] [127]) |
| 1175 | (define-key function-key-map [linefeed] [?\n]) | 1175 | (define-key function-key-map [delete] [127]) |
| 1176 | (define-key function-key-map [clear] [?\C-l]) | 1176 | (define-key function-key-map [tab] [?\t]) |
| 1177 | (define-key function-key-map [return] [?\C-m]) | 1177 | (define-key function-key-map [linefeed] [?\n]) |
| 1178 | (define-key function-key-map [escape] [?\e]) | 1178 | (define-key function-key-map [clear] [?\C-l]) |
| 1179 | (define-key function-key-map [M-backspace] [?\M-\d]) | 1179 | (define-key function-key-map [return] [?\C-m]) |
| 1180 | (define-key function-key-map [M-delete] [?\M-\d]) | 1180 | (define-key function-key-map [escape] [?\e]) |
| 1181 | (define-key function-key-map [M-tab] [?\M-\t]) | 1181 | (define-key function-key-map [M-backspace] [?\M-\d]) |
| 1182 | (define-key function-key-map [M-linefeed] [?\M-\n]) | 1182 | (define-key function-key-map [M-delete] [?\M-\d]) |
| 1183 | (define-key function-key-map [M-clear] [?\M-\C-l]) | 1183 | (define-key function-key-map [M-tab] [?\M-\t]) |
| 1184 | (define-key function-key-map [M-return] [?\M-\C-m]) | 1184 | (define-key function-key-map [M-linefeed] [?\M-\n]) |
| 1185 | (define-key function-key-map [M-escape] [?\M-\e]) | 1185 | (define-key function-key-map [M-clear] [?\M-\C-l]) |
| 1186 | (define-key function-key-map [iso-lefttab] [backtab]) | 1186 | (define-key function-key-map [M-return] [?\M-\C-m]) |
| 1187 | (define-key function-key-map [S-iso-lefttab] [backtab]) | 1187 | (define-key function-key-map [M-escape] [?\M-\e]) |
| 1188 | (define-key function-key-map [iso-lefttab] [backtab]) | ||
| 1189 | (define-key function-key-map [S-iso-lefttab] [backtab]))) | ||
| 1188 | 1190 | ||
| 1189 | ;; These tell read-char how to convert | 1191 | ;; These tell read-char how to convert |
| 1190 | ;; these special chars to ASCII. | 1192 | ;; these special chars to ASCII. |
| @@ -2246,7 +2248,7 @@ order until succeed.") | |||
| 2246 | (if text | 2248 | (if text |
| 2247 | (remove-text-properties 0 (length text) '(foreign-selection nil) text)) | 2249 | (remove-text-properties 0 (length text) '(foreign-selection nil) text)) |
| 2248 | text)) | 2250 | text)) |
| 2249 | 2251 | ||
| 2250 | ;;; Return the value of the current X selection. | 2252 | ;;; Return the value of the current X selection. |
| 2251 | ;;; Consult the selection, and the cut buffer. Treat empty strings | 2253 | ;;; Consult the selection, and the cut buffer. Treat empty strings |
| 2252 | ;;; as if they were unset. | 2254 | ;;; as if they were unset. |
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index f4cdd26a438..dd3f2dadece 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el | |||
| @@ -31,72 +31,10 @@ | |||
| 31 | (defvar xterm-function-map nil | 31 | (defvar xterm-function-map nil |
| 32 | "Function key map overrides for xterm.") | 32 | "Function key map overrides for xterm.") |
| 33 | 33 | ||
| 34 | ;; Protect against reloads. | 34 | ;; Make reloads faster. |
| 35 | (unless xterm-function-map | 35 | (unless xterm-function-map |
| 36 | (setq xterm-function-map (make-sparse-keymap)) | 36 | (setq xterm-function-map (make-sparse-keymap)) |
| 37 | 37 | ||
| 38 | ;; XXX We need to find a way to make these definitions display-local. -- Lorentey | ||
| 39 | |||
| 40 | ;; The terminal intialization C code file might have initialized | ||
| 41 | ;; function keys F13->F60 from the termcap/terminfo information. On | ||
| 42 | ;; a PC-style keyboard these keys correspond to | ||
| 43 | ;; MODIFIER-FUNCTION_KEY, where modifier is S-, C, A-, C-S-. The | ||
| 44 | ;; code here subsitutes the corresponding defintions in | ||
| 45 | ;; function-key-map. This substitution is needed because if a key | ||
| 46 | ;; definition if found in function-key-map, there are no further | ||
| 47 | ;; lookups in other keymaps. | ||
| 48 | (substitute-key-definition [f13] [S-f1] function-key-map) | ||
| 49 | (substitute-key-definition [f14] [S-f2] function-key-map) | ||
| 50 | (substitute-key-definition [f15] [S-f3] function-key-map) | ||
| 51 | (substitute-key-definition [f16] [S-f4] function-key-map) | ||
| 52 | (substitute-key-definition [f17] [S-f5] function-key-map) | ||
| 53 | (substitute-key-definition [f18] [S-f6] function-key-map) | ||
| 54 | (substitute-key-definition [f19] [S-f7] function-key-map) | ||
| 55 | (substitute-key-definition [f20] [S-f8] function-key-map) | ||
| 56 | (substitute-key-definition [f21] [S-f9] function-key-map) | ||
| 57 | (substitute-key-definition [f22] [S-f10] function-key-map) | ||
| 58 | (substitute-key-definition [f23] [S-f11] function-key-map) | ||
| 59 | (substitute-key-definition [f24] [S-f12] function-key-map) | ||
| 60 | |||
| 61 | (substitute-key-definition [f25] [C-f1] function-key-map) | ||
| 62 | (substitute-key-definition [f26] [C-f2] function-key-map) | ||
| 63 | (substitute-key-definition [f27] [C-f3] function-key-map) | ||
| 64 | (substitute-key-definition [f28] [C-f4] function-key-map) | ||
| 65 | (substitute-key-definition [f29] [C-f5] function-key-map) | ||
| 66 | (substitute-key-definition [f30] [C-f6] function-key-map) | ||
| 67 | (substitute-key-definition [f31] [C-f7] function-key-map) | ||
| 68 | (substitute-key-definition [f32] [C-f8] function-key-map) | ||
| 69 | (substitute-key-definition [f33] [C-f9] function-key-map) | ||
| 70 | (substitute-key-definition [f34] [C-f10] function-key-map) | ||
| 71 | (substitute-key-definition [f35] [C-f11] function-key-map) | ||
| 72 | (substitute-key-definition [f36] [C-f12] function-key-map) | ||
| 73 | |||
| 74 | (substitute-key-definition [f37] [C-S-f1] function-key-map) | ||
| 75 | (substitute-key-definition [f38] [C-S-f2] function-key-map) | ||
| 76 | (substitute-key-definition [f39] [C-S-f3] function-key-map) | ||
| 77 | (substitute-key-definition [f40] [C-S-f4] function-key-map) | ||
| 78 | (substitute-key-definition [f41] [C-S-f5] function-key-map) | ||
| 79 | (substitute-key-definition [f42] [C-S-f6] function-key-map) | ||
| 80 | (substitute-key-definition [f43] [C-S-f7] function-key-map) | ||
| 81 | (substitute-key-definition [f44] [C-S-f8] function-key-map) | ||
| 82 | (substitute-key-definition [f45] [C-S-f9] function-key-map) | ||
| 83 | (substitute-key-definition [f46] [C-S-f10] function-key-map) | ||
| 84 | (substitute-key-definition [f47] [C-S-f11] function-key-map) | ||
| 85 | (substitute-key-definition [f48] [C-S-f12] function-key-map) | ||
| 86 | |||
| 87 | (substitute-key-definition [f49] [A-f1] function-key-map) | ||
| 88 | (substitute-key-definition [f50] [A-f2] function-key-map) | ||
| 89 | (substitute-key-definition [f51] [A-f3] function-key-map) | ||
| 90 | (substitute-key-definition [f52] [A-f4] function-key-map) | ||
| 91 | (substitute-key-definition [f53] [A-f5] function-key-map) | ||
| 92 | (substitute-key-definition [f54] [A-f6] function-key-map) | ||
| 93 | (substitute-key-definition [f55] [A-f7] function-key-map) | ||
| 94 | (substitute-key-definition [f56] [A-f8] function-key-map) | ||
| 95 | (substitute-key-definition [f57] [A-f9] function-key-map) | ||
| 96 | (substitute-key-definition [f58] [A-f10] function-key-map) | ||
| 97 | (substitute-key-definition [f59] [A-f11] function-key-map) | ||
| 98 | (substitute-key-definition [f60] [A-f12] function-key-map) | ||
| 99 | |||
| 100 | (define-key xterm-function-map "\e[A" [up]) | 38 | (define-key xterm-function-map "\e[A" [up]) |
| 101 | (define-key xterm-function-map "\e[B" [down]) | 39 | (define-key xterm-function-map "\e[B" [down]) |
| 102 | (define-key xterm-function-map "\e[C" [right]) | 40 | (define-key xterm-function-map "\e[C" [right]) |
| @@ -245,13 +183,75 @@ | |||
| 245 | (define-key xterm-function-map "\eO5C" [C-right]) | 183 | (define-key xterm-function-map "\eO5C" [C-right]) |
| 246 | (define-key xterm-function-map "\eO5D" [C-left]) | 184 | (define-key xterm-function-map "\eO5D" [C-left]) |
| 247 | (define-key xterm-function-map "\eO5F" [C-end]) | 185 | (define-key xterm-function-map "\eO5F" [C-end]) |
| 248 | (define-key xterm-function-map "\eO5H" [C-home]) | 186 | (define-key xterm-function-map "\eO5H" [C-home])) |
| 187 | |||
| 188 | ;; Use inheritance to let the main keymap override those defaults. | ||
| 189 | ;; This way we don't override terminfo-derived settings or settings | ||
| 190 | ;; made in the .emacs file. | ||
| 191 | (let ((m (copy-keymap xterm-function-map))) | ||
| 192 | (set-keymap-parent m (keymap-parent function-key-map)) | ||
| 193 | (set-keymap-parent function-key-map m)) | ||
| 194 | |||
| 195 | ;; The terminal intialization C code file might have initialized | ||
| 196 | ;; function keys F13->F60 from the termcap/terminfo information. On | ||
| 197 | ;; a PC-style keyboard these keys correspond to | ||
| 198 | ;; MODIFIER-FUNCTION_KEY, where modifier is S-, C, A-, C-S-. The | ||
| 199 | ;; code here subsitutes the corresponding defintions in | ||
| 200 | ;; function-key-map. This substitution is needed because if a key | ||
| 201 | ;; definition if found in function-key-map, there are no further | ||
| 202 | ;; lookups in other keymaps. | ||
| 203 | (substitute-key-definition [f13] [S-f1] function-key-map) | ||
| 204 | (substitute-key-definition [f14] [S-f2] function-key-map) | ||
| 205 | (substitute-key-definition [f15] [S-f3] function-key-map) | ||
| 206 | (substitute-key-definition [f16] [S-f4] function-key-map) | ||
| 207 | (substitute-key-definition [f17] [S-f5] function-key-map) | ||
| 208 | (substitute-key-definition [f18] [S-f6] function-key-map) | ||
| 209 | (substitute-key-definition [f19] [S-f7] function-key-map) | ||
| 210 | (substitute-key-definition [f20] [S-f8] function-key-map) | ||
| 211 | (substitute-key-definition [f21] [S-f9] function-key-map) | ||
| 212 | (substitute-key-definition [f22] [S-f10] function-key-map) | ||
| 213 | (substitute-key-definition [f23] [S-f11] function-key-map) | ||
| 214 | (substitute-key-definition [f24] [S-f12] function-key-map) | ||
| 215 | |||
| 216 | (substitute-key-definition [f25] [C-f1] function-key-map) | ||
| 217 | (substitute-key-definition [f26] [C-f2] function-key-map) | ||
| 218 | (substitute-key-definition [f27] [C-f3] function-key-map) | ||
| 219 | (substitute-key-definition [f28] [C-f4] function-key-map) | ||
| 220 | (substitute-key-definition [f29] [C-f5] function-key-map) | ||
| 221 | (substitute-key-definition [f30] [C-f6] function-key-map) | ||
| 222 | (substitute-key-definition [f31] [C-f7] function-key-map) | ||
| 223 | (substitute-key-definition [f32] [C-f8] function-key-map) | ||
| 224 | (substitute-key-definition [f33] [C-f9] function-key-map) | ||
| 225 | (substitute-key-definition [f34] [C-f10] function-key-map) | ||
| 226 | (substitute-key-definition [f35] [C-f11] function-key-map) | ||
| 227 | (substitute-key-definition [f36] [C-f12] function-key-map) | ||
| 228 | |||
| 229 | (substitute-key-definition [f37] [C-S-f1] function-key-map) | ||
| 230 | (substitute-key-definition [f38] [C-S-f2] function-key-map) | ||
| 231 | (substitute-key-definition [f39] [C-S-f3] function-key-map) | ||
| 232 | (substitute-key-definition [f40] [C-S-f4] function-key-map) | ||
| 233 | (substitute-key-definition [f41] [C-S-f5] function-key-map) | ||
| 234 | (substitute-key-definition [f42] [C-S-f6] function-key-map) | ||
| 235 | (substitute-key-definition [f43] [C-S-f7] function-key-map) | ||
| 236 | (substitute-key-definition [f44] [C-S-f8] function-key-map) | ||
| 237 | (substitute-key-definition [f45] [C-S-f9] function-key-map) | ||
| 238 | (substitute-key-definition [f46] [C-S-f10] function-key-map) | ||
| 239 | (substitute-key-definition [f47] [C-S-f11] function-key-map) | ||
| 240 | (substitute-key-definition [f48] [C-S-f12] function-key-map) | ||
| 241 | |||
| 242 | (substitute-key-definition [f49] [A-f1] function-key-map) | ||
| 243 | (substitute-key-definition [f50] [A-f2] function-key-map) | ||
| 244 | (substitute-key-definition [f51] [A-f3] function-key-map) | ||
| 245 | (substitute-key-definition [f52] [A-f4] function-key-map) | ||
| 246 | (substitute-key-definition [f53] [A-f5] function-key-map) | ||
| 247 | (substitute-key-definition [f54] [A-f6] function-key-map) | ||
| 248 | (substitute-key-definition [f55] [A-f7] function-key-map) | ||
| 249 | (substitute-key-definition [f56] [A-f8] function-key-map) | ||
| 250 | (substitute-key-definition [f57] [A-f9] function-key-map) | ||
| 251 | (substitute-key-definition [f58] [A-f10] function-key-map) | ||
| 252 | (substitute-key-definition [f59] [A-f11] function-key-map) | ||
| 253 | (substitute-key-definition [f60] [A-f12] function-key-map) | ||
| 249 | 254 | ||
| 250 | ;; Use inheritance to let the main keymap override those defaults. | ||
| 251 | ;; This way we don't override terminfo-derived settings or settings | ||
| 252 | ;; made in the .emacs file. | ||
| 253 | (set-keymap-parent xterm-function-map (keymap-parent function-key-map)) | ||
| 254 | (set-keymap-parent function-key-map xterm-function-map)) | ||
| 255 | 255 | ||
| 256 | ;; Set up colors, for those versions of xterm that support it. | 256 | ;; Set up colors, for those versions of xterm that support it. |
| 257 | (defvar xterm-standard-colors | 257 | (defvar xterm-standard-colors |