OSXvnc icon indicating copy to clipboard operation
OSXvnc copied to clipboard

Use different event source for special keys

Open stacks13 opened this issue 1 year ago • 1 comments

Issue: https://github.com/stweil/OSXvnc/issues/54

Issue was possibly due to the following reasons

  • Accessibility shortcuts added since Monterey: https://gist.github.com/lukaskubanek/df1cf3287e30095b7265da639b6b43ae
  • The Obj C implementation of CGEventPost, CGEventSourceCreate when used with kCGEventSourceStatePrivate and kCGHIDEventTap

Found the fix by trying out some different combinations Event Source and Event Tap

By making use of kCGEventSourceStateHIDSystemState for keys with keyCode > 96, the m key works fine after pressing the these keys: Arrow Keys, Home, End, Insert, Function keys, Page Up/Down

stacks13 avatar Nov 23 '23 07:11 stacks13

@stweil I have signed off on commits. Please re-run workflow and review

stacks13 avatar Nov 28 '23 09:11 stacks13