Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

macOS Monterey - only meta key events fire #16

Open
mulhoon opened this issue Feb 3, 2022 · 3 comments
Open

macOS Monterey - only meta key events fire #16

mulhoon opened this issue Feb 3, 2022 · 3 comments

Comments

@mulhoon
Copy link

mulhoon commented Feb 3, 2022

Testing this with macOS Monterey via the Terminal.

Meta key events fire (META, ALT, CTRL and SHIFT), but no other keys fire the event.

Terminal.app was added to accessibility in Security and Privacy for this test.

@sancarn
Copy link
Contributor

sancarn commented Feb 3, 2022

  1. Would appreciate if you ran ./src/test.ts. Is it still only META, ALT, CTRL and SHIFT coming through?
  2. Can you try it again on a fresh login (just making sure you are at the head of the Tap
  3. This will be an issue with the swift code at this point
//Create the event tap using [CGEvent.tapCreate](https://developer.apple.com/documentation/coregraphics/cgevent/1454426-tapcreate)
guard let eventTap = CGEvent.tapCreate(tap: .cgSessionEventTap,
                                      place: .headInsertEventTap,
                                      options: .defaultTap,
                                      eventsOfInterest: CGEventMask(eventMask),
                                      callback: myCGEventTapCallback,
                                      userInfo: nil) else {
                                        logErr("Failed to create event tap. This may be because the application this is embedded within hasn't received permission. Please go to System Preferences > Security > Accesibility to add this application to the trusted applications.")
                                        exit(1)
}

Unfortunately I don't have Monterey (still on Mojave) so can't test it on a later OS (No way that I am aware of)

@sancarn
Copy link
Contributor

sancarn commented Feb 3, 2022

Possibly related to feedback-assistant/reports#235 (comment)

@lutsifer
Copy link

Interesting, it turns out that on fresh login it works just fine and it loses the ability to capture non-meta keys at some point...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants