input/ps2: drop fake right-shift scancodes

Seen on X250

Description from https://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.html

  The ten grey keys Insert, Home, PgUp, Delete, End, PgDn, Up, Left,
  Down, Right are supposed to function regardless of the state of Shift
  and NumLock keys. But for an old AT keyboard the keypad keys would
  produce digits when Numlock was on or Shift was down. Therefore, in
  order to fool old programs, fake scancodes are sent: when LShift is
  down, and Insert is pressed, e0 aa e0 52 is sent; upon release of
  Insert e0 d2 e0 2a is sent. In other words, a fake LShift-up and fake
  LShift-down are inserted.

Fixes #2888
This commit is contained in:
Christian Helmuth 2018-08-17 14:34:15 +02:00
parent 87908242c5
commit d909715f1b
1 changed files with 2 additions and 2 deletions

View File

@ -153,7 +153,7 @@ class Ps2::Keyboard : public Input_driver
case READ_E0_VALUE:
/* drop fake shifts */
if ((v & 0x7f) == 0x2a) {
if ((v & 0x7f) == 0x2a || (v & 0x7f) == 0x36) {
reset();
return;
}
@ -301,7 +301,7 @@ class Ps2::Keyboard : public Input_driver
case READ_EXT:
/* drop fake shifts */
if (v == 0x12) {
if (v == 0x12 || v == 0x59) {
reset();
return;
}