mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 17:52:52 +00:00
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:
parent
87908242c5
commit
d909715f1b
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user