Index: cygwin/fhandler_console.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/fhandler_console.cc,v retrieving revision 1.109 diff -u -p -r1.109 fhandler_console.cc --- cygwin/fhandler_console.cc 2 Apr 2003 23:01:11 -0000 1.109 +++ cygwin/fhandler_console.cc 8 Apr 2003 18:48:35 -0000 @@ -321,13 +321,26 @@ fhandler_console::read (void *pv, size_t break; } - if (!input_rec.Event.KeyEvent.bKeyDown) - continue; - #define ich (input_rec.Event.KeyEvent.uChar.AsciiChar) #define wch (input_rec.Event.KeyEvent.uChar.UnicodeChar) #define ALT_PRESSED (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED) #define CTRL_PRESSED (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED) + + /* + Ignore key up events, except for left alt events with non-zero character + */ + if (!input_rec.Event.KeyEvent.bKeyDown && + /* + Event for left alt, with a non-zero character, comes from + "alt + numerics" key sequence. + e.g. 0233 => é + */ + !(wch != 0 && + // ?? experimentally determined on an XP system + virtual_key_code == VK_MENU && + // left alt -- see http://www.microsoft.com/hwdev/tech/input/Scancode.asp + input_rec.Event.KeyEvent.wVirtualScanCode == 0x38)) + continue; if (wch == 0 || /* arrow/function keys */