comparison src/keyboard.c @ 1842:2cc82d6070e2

(extra_keyboard_modifiers): New Lisp var. (read_char): Support ctl and meta bits in extra_keyboard_modifiers.
author Richard M. Stallman <rms@gnu.org>
date Sun, 07 Feb 1993 00:31:58 +0000
parents 04fb1d3d6992
children 86ff3942d7e1
comparison
equal deleted inserted replaced
1841:338e4ffdb54b 1842:2cc82d6070e2
161 161
162 read_key_sequence uses this to delay switch-frame events until the 162 read_key_sequence uses this to delay switch-frame events until the
163 end of the key sequence; Fread_char uses it to put off switch-frame 163 end of the key sequence; Fread_char uses it to put off switch-frame
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
167 /* A mask of extra modifier bits to put into every keyboard char. */
168 int extra_keyboard_modifiers;
166 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
170 Lisp_Object meta_prefix_char; 173 Lisp_Object meta_prefix_char;
1311 1314
1312 /* Terminate Emacs in batch mode if at eof. */ 1315 /* Terminate Emacs in batch mode if at eof. */
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);
1319 1328
1320 start_polling (); 1329 start_polling ();
4331 4340
4332 DEFVAR_LISP ("menu-prompt-more-char", &menu_prompt_more_char, 4341 DEFVAR_LISP ("menu-prompt-more-char", &menu_prompt_more_char,
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 ()
4339 { 4356 {
4340 initial_define_key (global_map, Ctl ('Z'), "suspend-emacs"); 4357 initial_define_key (global_map, Ctl ('Z'), "suspend-emacs");