mirror of
https://github.com/VARCem/PDCurses.git
synced 2026-09-24 15:55:14 +00:00
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user