From 56be2161dc33ceefe75e8e765593bf917c8872a9 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Tue, 28 Nov 2006 20:50:07 +0000 Subject: [PATCH] Oops... in DOS and OS/2, modifier keys weren't being returned unless they followed a key with modifiers held, or another (or the same) modifier key. --- dos/pdckbd.c | 8 ++++---- os2/pdckbd.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dos/pdckbd.c b/dos/pdckbd.c index a17ba8a2..ed9d5454 100644 --- a/dos/pdckbd.c +++ b/dos/pdckbd.c @@ -19,7 +19,7 @@ #include "pdcdos.h" -RCSID("$Id: pdckbd.c,v 1.60 2006/11/28 19:15:03 wmcbrine Exp $"); +RCSID("$Id: pdckbd.c,v 1.61 2006/11/28 20:50:07 wmcbrine Exp $"); /************************************************************************ * Table for key code translation of function keys in keypad mode * @@ -240,13 +240,13 @@ bool PDC_check_bios_key(void) return TRUE; } - if (old_shift && !shift_status) + if (old_shift && !shift_status) /* modifier released */ { if (!key_pressed && SP->return_key_modifiers) return TRUE; - - key_pressed = FALSE; } + else if (!old_shift && shift_status) /* modifier pressed */ + key_pressed = FALSE; old_shift = shift_status; diff --git a/os2/pdckbd.c b/os2/pdckbd.c index b74b6049..00fa7ff3 100644 --- a/os2/pdckbd.c +++ b/os2/pdckbd.c @@ -35,7 +35,7 @@ static bool key_pressed = FALSE; static int mouse_events = 0; #endif -RCSID("$Id: pdckbd.c,v 1.65 2006/11/28 19:15:04 wmcbrine Exp $"); +RCSID("$Id: pdckbd.c,v 1.66 2006/11/28 20:50:07 wmcbrine Exp $"); /************************************************************************ * Table for key code translation of function keys in keypad mode * @@ -284,13 +284,13 @@ bool PDC_check_bios_key(void) return TRUE; } - if (old_shift && !kbdinfo.fsState) + if (old_shift && !kbdinfo.fsState) /* modifier released */ { if (!key_pressed && SP->return_key_modifiers) return TRUE; - - key_pressed = FALSE; } + else if (!old_shift && kbdinfo.fsState) /* modifier pressed */ + key_pressed = FALSE; old_shift = kbdinfo.fsState;