summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-06-19 22:17:35 +0000
committerRichard M. Stallman <rms@gnu.org>1996-06-19 22:17:35 +0000
commitad984accb9137e12dc4dd5f8518ce0d7bda0bcc6 (patch)
tree3cf111413a99dbdcbca1896154ac36432cc93009 /src
parentd2db98fd8c12d26adc4f1d7c5b2477ad00f9735c (diff)
downloademacs-ad984accb9137e12dc4dd5f8518ce0d7bda0bcc6.tar.gz
(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.c12
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;
/* Non nil if alt key presses are passed on to Windows. */
Lisp_Object Vwin32_pass_alt_to_system;
+/* Non nil if alt key is translated to meta_modifier, nil if it is translated
+ to alt_modifier. */
+Lisp_Object Vwin32_alt_is_meta;
+
/* Non nil if left window, right window, and application key events
are passed on to Windows. */
Lisp_Object Vwin32_pass_optional_keys_to_system;
@@ -2650,7 +2654,8 @@ win32_get_modifiers ()
{
return (((GetKeyState (VK_SHIFT)&0x8000) ? shift_modifier : 0) |
((GetKeyState (VK_CONTROL)&0x8000) ? ctrl_modifier : 0) |
- ((GetKeyState (VK_MENU)&0x8000) ? meta_modifier : 0));
+ ((GetKeyState (VK_MENU)&0x8000) ?
+ ((NILP (Vwin32_alt_is_meta)) ? alt_modifier : meta_modifier) : 0));
}
void
@@ -5002,6 +5007,11 @@ When non-nil, for example, alt pressed and released and then space will\n\
open the System menu. When nil, Emacs silently swallows alt key events.");
Vwin32_pass_alt_to_system = Qnil;
+ DEFVAR_LISP ("win32-alt-is-meta", &Vwin32_alt_is_meta,
+ "Non-nil if the alt key is to be considered the same as the meta key.\n\
+When nil, Emacs will translate the alt key to the Alt modifier, and not Meta.");
+ Vwin32_alt_is_meta = Qt;
+
DEFVAR_LISP ("win32-pass-optional-keys-to-system",
&Vwin32_pass_optional_keys_to_system,
"Non-nil if the 'optional' keys (left window, right window,\n\