aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii1997-02-02 15:41:27 +0000
committerEli Zaretskii1997-02-02 15:41:27 +0000
commit917e56592f7553f3f8d7967e18e035460d2c5cf2 (patch)
treecefc2cdec09fb071f2479c37adc8f0fcc0013e72 /src
parent498e9ac35b6de8904387e57bfc1fd0319c7b5e74 (diff)
downloademacs-917e56592f7553f3f8d7967e18e035460d2c5cf2.tar.gz
emacs-917e56592f7553f3f8d7967e18e035460d2c5cf2.zip
dos_rawgetc: When international keyboard doesn't have
to be supported, recognize Alt-key combinations even if the Alt key is no longer pressed.
Diffstat (limited to 'src')
-rw-r--r--src/msdos.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/msdos.c b/src/msdos.c
index 02bdfc0f31c..94b75a5efc3 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -1646,7 +1646,19 @@ dos_rawgetc ()
1646 1646
1647 if (c == 0) 1647 if (c == 0)
1648 { 1648 {
1649 if (code & Alt) 1649 /* We only look at the keyboard Ctrl/Shift/Alt keys when
1650 Emacs is ready to read a key. Therefore, if they press
1651 `Alt-x' when Emacs is busy, by the time we get to
1652 `dos_get_modifiers', they might have already released the
1653 Alt key, and Emacs gets just `x', which is BAD.
1654 However, for keys with the `Map' property set, the ASCII
1655 code returns zero iff Alt is pressed. So, when we DON'T
1656 have to support international_keyboard, we don't have to
1657 distinguish between the left and right Alt keys, and we
1658 can set the META modifier for any keys with the `Map'
1659 property if they return zero ASCII code (c = 0). */
1660 if ( (code & Alt)
1661 || ( (code & 0xf000) == Map && !international_keyboard))
1650 modifiers |= meta_modifier; 1662 modifiers |= meta_modifier;
1651 if (code & Ctrl) 1663 if (code & Ctrl)
1652 modifiers |= ctrl_modifier; 1664 modifiers |= ctrl_modifier;