diff options
| author | Richard M. Stallman | 1993-02-07 00:31:58 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-02-07 00:31:58 +0000 |
| commit | 9fa4395de79a4951b0923ba161e432fc537eaf7e (patch) | |
| tree | 768591f4de0cd11bffbff23a3ba1778ee4a165f8 /src | |
| parent | 64bb1782c4a618179514edc30d34753605752a17 (diff) | |
| download | emacs-9fa4395de79a4951b0923ba161e432fc537eaf7e.tar.gz emacs-9fa4395de79a4951b0923ba161e432fc537eaf7e.zip | |
(extra_keyboard_modifiers): New Lisp var.
(read_char): Support ctl and meta bits in extra_keyboard_modifiers.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 6585c29a914..b20cd71d5dd 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -164,6 +164,9 @@ Lisp_Object unread_command_events; | |||
| 164 | events until a non-ASCII event is acceptable as input. */ | 164 | events until a non-ASCII event is acceptable as input. */ |
| 165 | Lisp_Object unread_switch_frame; | 165 | Lisp_Object unread_switch_frame; |
| 166 | 166 | ||
| 167 | /* A mask of extra modifier bits to put into every keyboard char. */ | ||
| 168 | int extra_keyboard_modifiers; | ||
| 169 | |||
| 167 | /* Char to use as prefix when a meta character is typed in. | 170 | /* Char to use as prefix when a meta character is typed in. |
| 168 | This is bound on entry to minibuffer in case ESC is changed there. */ | 171 | This is bound on entry to minibuffer in case ESC is changed there. */ |
| 169 | 172 | ||
| @@ -1313,6 +1316,12 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 1313 | if (noninteractive && XTYPE (c) == Lisp_Int && XINT (c) < 0) | 1316 | if (noninteractive && XTYPE (c) == Lisp_Int && XINT (c) < 0) |
| 1314 | Fkill_emacs (make_number (1)); | 1317 | Fkill_emacs (make_number (1)); |
| 1315 | 1318 | ||
| 1319 | /* Test for ControlMask and Mod1Mask. */ | ||
| 1320 | if (extra_keyboard_modifiers & 4) | ||
| 1321 | c &= ~0140; | ||
| 1322 | if (extra_keyboard_modifiers & 8) | ||
| 1323 | c |= 0200; | ||
| 1324 | |||
| 1316 | non_reread: | 1325 | non_reread: |
| 1317 | 1326 | ||
| 1318 | restore_getcjmp (save_jump); | 1327 | restore_getcjmp (save_jump); |
| @@ -4333,6 +4342,14 @@ Otherwise, menu prompting uses the echo area."); | |||
| 4333 | "Character to see next line of menu prompt.\n\ | 4342 | "Character to see next line of menu prompt.\n\ |
| 4334 | Type this character while in a menu prompt to rotate around the lines of it."); | 4343 | Type this character while in a menu prompt to rotate around the lines of it."); |
| 4335 | XSET (menu_prompt_more_char, Lisp_Int, ' '); | 4344 | XSET (menu_prompt_more_char, Lisp_Int, ' '); |
| 4345 | |||
| 4346 | DEFVAR_INT ("extra-keyboard-modifiers", &extra_keyboard_modifiers, | ||
| 4347 | "A mask of additional modifier keys to use with every keyboard character.\n\ | ||
| 4348 | These bits follow the convention for X windows,\n\ | ||
| 4349 | but the control and meta bits work even when you are not using X:\n\ | ||
| 4350 | 1 -- shift bit 2 -- lock bit\n\ | ||
| 4351 | 4 -- control bit 8 -- meta bit."); | ||
| 4352 | extra_keyboard_modifiers = 0; | ||
| 4336 | } | 4353 | } |
| 4337 | 4354 | ||
| 4338 | keys_of_keyboard () | 4355 | keys_of_keyboard () |