aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-09-05 11:56:03 -0400
committerKevin O'Connor <kevin@koconnor.net>2016-09-12 10:22:10 -0400
commit6cd69b75ead91fea625951cb7d89ad47e94137d7 (patch)
tree6518c195771669bb96f6869dc36ac7cca81271bd
parentfec2140c8601afae0ce997ffa7674d1dbd12de01 (diff)
downloadseabios-6cd69b75ead91fea625951cb7d89ad47e94137d7.tar.gz
seabios-6cd69b75ead91fea625951cb7d89ad47e94137d7.tar.xz
seabios-6cd69b75ead91fea625951cb7d89ad47e94137d7.zip
kbd: Ignore fake shift keys
AT keyboards can produce "fake" shift keys on some extended events. It's not necessary to process these artificial events as the actual extended keys are detected directly. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--src/kbd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/kbd.c b/src/kbd.c
index b00853f..b93d9d2 100644
--- a/src/kbd.c
+++ b/src/kbd.c
@@ -428,10 +428,16 @@ __process_key(u8 scancode)
return;
case 0x2a: /* L Shift press */
case 0xaa: /* L Shift release */
+ if (flags1 & KF1_LAST_E0)
+ // Ignore fake shifts
+ return;
kbd_set_flag(key_release, KF0_LSHIFT, 0, 0);
return;
case 0x36: /* R Shift press */
case 0xb6: /* R Shift release */
+ if (flags1 & KF1_LAST_E0)
+ // Ignore fake shifts
+ return;
kbd_set_flag(key_release, KF0_RSHIFT, 0, 0);
return;
case 0x1d: /* Ctrl press */