* Reset keyboard state when an emergency key has been processed - it's likely
that we lost a few keystrokes, and would make keys (like SysReq) stick. Thanks to Rene for the note! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31688 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
b7419f8d91
commit
1ad5198c09
@ -152,8 +152,11 @@ keyboard_handle_int(ps2_dev *dev)
|
||||
else
|
||||
emergencyKeyStatus &= EMERGENCY_SYS_REQ;
|
||||
} else if (emergencyKeyStatus > EMERGENCY_SYS_REQ
|
||||
&& debug_emergency_key_pressed(kUnshiftedKeymap[scancode]))
|
||||
&& debug_emergency_key_pressed(kUnshiftedKeymap[scancode])) {
|
||||
// we probably have lost some keys, so reset our key states
|
||||
emergencyKeyStatus = 0;
|
||||
return B_HANDLED_INTERRUPT;
|
||||
}
|
||||
|
||||
keyInfo.timestamp = dev->history[0].time;
|
||||
keyInfo.scancode = scancode;
|
||||
|
@ -465,8 +465,11 @@ KeyboardDevice::_InterpretBuffer()
|
||||
|
||||
char letter = current[i] - 4 + 'a';
|
||||
|
||||
if (debug_emergency_key_pressed(letter))
|
||||
if (debug_emergency_key_pressed(letter)) {
|
||||
// we probably have lost some keys, so reset our key state
|
||||
sysReqPressed = false;
|
||||
continue;
|
||||
}
|
||||
} else if (key == 0) {
|
||||
// unmapped key
|
||||
key = 0x200000 + current[i];
|
||||
|
@ -147,8 +147,14 @@ debug_keyboard_interrupt(void *data)
|
||||
break;
|
||||
|
||||
default:
|
||||
if (altPressed && sysReqPressed)
|
||||
debug_emergency_key_pressed(kUnshiftedKeymap[key]);
|
||||
if (altPressed && sysReqPressed) {
|
||||
if (debug_emergency_key_pressed(kUnshiftedKeymap[key])) {
|
||||
// we probably have lost some keys, so reset our key states
|
||||
controlPressed = false;
|
||||
sysReqPressed = false;
|
||||
altPressed = false;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user