mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-08 12:53:53 +08:00
Converted win32 to new keyboard state tracking design. Also
changed locking to screen so that keys no longer count (only mouse buttons and scroll lock toggled on). This is to deal with the unreliability of key event reporting which can leave us locked to a screen with no key physically pressed. The result of this is that clients get key repeats and releases without the corresponding key press. CKeyState handles this by discarding repeat/release events on keys it hasn't seen go down. Also made a few other minor fixes to win32 keyboard handling.
This commit is contained in:
@@ -174,6 +174,13 @@ CXWindowsKeyState::mapModifiersFromX(unsigned int state) const
|
||||
return mask;
|
||||
}
|
||||
|
||||
bool
|
||||
CXWindowsKeyState::fakeCtrlAltDel()
|
||||
{
|
||||
// pass keys through unchanged
|
||||
return false;
|
||||
}
|
||||
|
||||
const char*
|
||||
CXWindowsKeyState::getKeyName(KeyButton keycode) const
|
||||
{
|
||||
@@ -864,7 +871,7 @@ CXWindowsKeyState::findBestKeyIndex(KeySymIndex keyIndex,
|
||||
// if the action is an auto-repeat then we don't call this
|
||||
// method since we just need to synthesize a key repeat on the
|
||||
// same keycode that we pressed.
|
||||
// XXX -- do this right
|
||||
// FIXME -- do this right
|
||||
for (unsigned int i = 0; i < 4; ++i) {
|
||||
if (keyIndex->second.m_keycode[i] != 0) {
|
||||
return i;
|
||||
|
||||
Reference in New Issue
Block a user