mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-12 14:45:21 +08:00
Fix for Bug #57. The event tap was never returning events of either of the types specified and so mapKeyFromEvent would prematurely return with a null-equivalent KeyButton. Pulling the entire block of code, as the value it produces isn't used anyway.
Also fixed an incorrect pair of constants in the event tap generation code. Luckily, the two constants resolve to the same integer value, but things would get ugly if either value changed. Thanks to Peter Van der Beken (peterv@propagandism.org) for the patch.
This commit is contained in:
@@ -284,22 +284,6 @@ COSXKeyState::mapKeyFromEvent(CKeyIDs& ids,
|
||||
#endif
|
||||
|
||||
if (layoutValid) {
|
||||
|
||||
// choose action
|
||||
UInt16 action;
|
||||
switch (eventKind) {
|
||||
case kEventRawKeyDown:
|
||||
action = kUCKeyActionDown;
|
||||
break;
|
||||
|
||||
case kEventRawKeyRepeat:
|
||||
action = kUCKeyActionAutoKey;
|
||||
break;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
// translate key
|
||||
UniCharCount count;
|
||||
UniChar chars[2];
|
||||
|
||||
Reference in New Issue
Block a user