diff options
author | Eli Zaretskii <eliz@gnu.org> | 1997-02-02 15:41:27 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 1997-02-02 15:41:27 +0000 |
commit | b4e694df04ce0d931179f0f4862ae4c852c95e38 (patch) | |
tree | 5a129227f6fdbc064d2f38b9b2e89e89e7aaf97d | |
parent | ce153ac5f99e3f29e813ca8f3fcbd593c16fc3af (diff) | |
download | emacs-b4e694df04ce0d931179f0f4862ae4c852c95e38.tar.gz |
dos_rawgetc: When international keyboard doesn't have
to be supported, recognize Alt-key combinations even if the Alt
key is no longer pressed.
-rw-r--r-- | src/msdos.c | 14 |
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 () if (c == 0) { - if (code & Alt) + /* We only look at the keyboard Ctrl/Shift/Alt keys when + Emacs is ready to read a key. Therefore, if they press + `Alt-x' when Emacs is busy, by the time we get to + `dos_get_modifiers', they might have already released the + Alt key, and Emacs gets just `x', which is BAD. + However, for keys with the `Map' property set, the ASCII + code returns zero iff Alt is pressed. So, when we DON'T + have to support international_keyboard, we don't have to + distinguish between the left and right Alt keys, and we + can set the META modifier for any keys with the `Map' + property if they return zero ASCII code (c = 0). */ + if ( (code & Alt) + || ( (code & 0xf000) == Map && !international_keyboard)) modifiers |= meta_modifier; if (code & Ctrl) modifiers |= ctrl_modifier; |