diff --git a/libs/video/targets/in_svgalib.c b/libs/video/targets/in_svgalib.c index 7400e4006..09146c2e2 100644 --- a/libs/video/targets/in_svgalib.c +++ b/libs/video/targets/in_svgalib.c @@ -86,7 +86,7 @@ keyhandler (int scancode, int state) sc = scancode & 0x7f; key = scantokey[0][sc]; - if ((shifts & 0xc)) { + if ((shifts & 0x03)) { ascii = scantokey[2][sc]; } else if (shifts & 3) { ascii = scantokey[1][sc]; diff --git a/libs/video/targets/in_win.c b/libs/video/targets/in_win.c index 9056017eb..82659597e 100644 --- a/libs/video/targets/in_win.c +++ b/libs/video/targets/in_win.c @@ -656,7 +656,7 @@ MapKey (unsigned int keycode, int press, int *k, int *u) else key = scantokey[scan]; - if (shifts & 0x0c) { + if (shifts & 0x03) { if (extended) uc = shift_ext_scantokey[scan]; else @@ -692,8 +692,8 @@ MapKey (unsigned int keycode, int press, int *k, int *u) break; } - Con_DPrintf ("%08x %02x %04x %c\n", keycode, scan, key, - uc > 32 && uc < 127 ? uc : '#'); + Con_DPrintf ("%08x %d %02x %02lx %04x %c\n", keycode, press, scan, shifts, + key, uc > 32 && uc < 127 ? uc : '#'); *k = key; *u = uc; }