diff options
| author | Richard M. Stallman | 1996-06-19 22:17:35 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-06-19 22:17:35 +0000 |
| commit | 8c205c63c0f8e9562333d2797e4943d35158f0a6 (patch) | |
| tree | f9b1ac34027ae6234430518e56e86c63d9829c72 /src | |
| parent | d4ecdb6bbef41561c0f89a510ede92ce75336404 (diff) | |
| download | emacs-8c205c63c0f8e9562333d2797e4943d35158f0a6.tar.gz emacs-8c205c63c0f8e9562333d2797e4943d35158f0a6.zip | |
(Vwin32_alt_is_meta): New variable.
(win32_get_modifiers): Map Alt to alt_modifier if required.
(syms_of_win32fns): DEFVAR new variable.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32fns.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/w32fns.c b/src/w32fns.c index 07001736595..29ce4c70cd5 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -49,6 +49,10 @@ Lisp_Object Vwin32_color_map; | |||
| 49 | /* Non nil if alt key presses are passed on to Windows. */ | 49 | /* Non nil if alt key presses are passed on to Windows. */ |
| 50 | Lisp_Object Vwin32_pass_alt_to_system; | 50 | Lisp_Object Vwin32_pass_alt_to_system; |
| 51 | 51 | ||
| 52 | /* Non nil if alt key is translated to meta_modifier, nil if it is translated | ||
| 53 | to alt_modifier. */ | ||
| 54 | Lisp_Object Vwin32_alt_is_meta; | ||
| 55 | |||
| 52 | /* Non nil if left window, right window, and application key events | 56 | /* Non nil if left window, right window, and application key events |
| 53 | are passed on to Windows. */ | 57 | are passed on to Windows. */ |
| 54 | Lisp_Object Vwin32_pass_optional_keys_to_system; | 58 | Lisp_Object Vwin32_pass_optional_keys_to_system; |
| @@ -2650,7 +2654,8 @@ win32_get_modifiers () | |||
| 2650 | { | 2654 | { |
| 2651 | return (((GetKeyState (VK_SHIFT)&0x8000) ? shift_modifier : 0) | | 2655 | return (((GetKeyState (VK_SHIFT)&0x8000) ? shift_modifier : 0) | |
| 2652 | ((GetKeyState (VK_CONTROL)&0x8000) ? ctrl_modifier : 0) | | 2656 | ((GetKeyState (VK_CONTROL)&0x8000) ? ctrl_modifier : 0) | |
| 2653 | ((GetKeyState (VK_MENU)&0x8000) ? meta_modifier : 0)); | 2657 | ((GetKeyState (VK_MENU)&0x8000) ? |
| 2658 | ((NILP (Vwin32_alt_is_meta)) ? alt_modifier : meta_modifier) : 0)); | ||
| 2654 | } | 2659 | } |
| 2655 | 2660 | ||
| 2656 | void | 2661 | void |
| @@ -5002,6 +5007,11 @@ When non-nil, for example, alt pressed and released and then space will\n\ | |||
| 5002 | open the System menu. When nil, Emacs silently swallows alt key events."); | 5007 | open the System menu. When nil, Emacs silently swallows alt key events."); |
| 5003 | Vwin32_pass_alt_to_system = Qnil; | 5008 | Vwin32_pass_alt_to_system = Qnil; |
| 5004 | 5009 | ||
| 5010 | DEFVAR_LISP ("win32-alt-is-meta", &Vwin32_alt_is_meta, | ||
| 5011 | "Non-nil if the alt key is to be considered the same as the meta key.\n\ | ||
| 5012 | When nil, Emacs will translate the alt key to the Alt modifier, and not Meta."); | ||
| 5013 | Vwin32_alt_is_meta = Qt; | ||
| 5014 | |||
| 5005 | DEFVAR_LISP ("win32-pass-optional-keys-to-system", | 5015 | DEFVAR_LISP ("win32-pass-optional-keys-to-system", |
| 5006 | &Vwin32_pass_optional_keys_to_system, | 5016 | &Vwin32_pass_optional_keys_to_system, |
| 5007 | "Non-nil if the 'optional' keys (left window, right window,\n\ | 5017 | "Non-nil if the 'optional' keys (left window, right window,\n\ |