Mercurial > emacs
changeset 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 | 338e4ffdb54b |
children | 2d5caf3fd862 |
files | src/keyboard.c |
diffstat | 1 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/keyboard.c Sun Feb 07 00:30:36 1993 +0000 +++ b/src/keyboard.c Sun Feb 07 00:31:58 1993 +0000 @@ -164,6 +164,9 @@ events until a non-ASCII event is acceptable as input. */ Lisp_Object unread_switch_frame; +/* A mask of extra modifier bits to put into every keyboard char. */ +int extra_keyboard_modifiers; + /* Char to use as prefix when a meta character is typed in. This is bound on entry to minibuffer in case ESC is changed there. */ @@ -1313,6 +1316,12 @@ if (noninteractive && XTYPE (c) == Lisp_Int && XINT (c) < 0) Fkill_emacs (make_number (1)); + /* Test for ControlMask and Mod1Mask. */ + if (extra_keyboard_modifiers & 4) + c &= ~0140; + if (extra_keyboard_modifiers & 8) + c |= 0200; + non_reread: restore_getcjmp (save_jump); @@ -4333,6 +4342,14 @@ "Character to see next line of menu prompt.\n\ Type this character while in a menu prompt to rotate around the lines of it."); XSET (menu_prompt_more_char, Lisp_Int, ' '); + + DEFVAR_INT ("extra-keyboard-modifiers", &extra_keyboard_modifiers, + "A mask of additional modifier keys to use with every keyboard character.\n\ +These bits follow the convention for X windows,\n\ +but the control and meta bits work even when you are not using X:\n\ + 1 -- shift bit 2 -- lock bit\n\ + 4 -- control bit 8 -- meta bit."); + extra_keyboard_modifiers = 0; } keys_of_keyboard ()