Post marked as unsolved
Click to stop watching this post.
You have stopped watching this post. Click to start watching again.
Post marked as unsolved with 0 replies
84
Views
Unable to obtain permission for xcode app to use NSEvent.addGlobalMonitorForEvents(matching: NSEvent.EventTypeMask.keyUp, handler: {(event: NSEvent) in print("\(event)")})
I am building a mouse and keyboard tracking software as a piece of a user assistant AI, but have hit a major block in progress since I can't gather data from the keyboard globally despite already having enabled the app in Accessibility and disabled sandbox like it was suggested I do.
I'm using "NSEvent.addGlobalMonitorForEvents(matching: NSEvent.EventTypeMask.keyUp, handler: {(event: NSEvent) in print("\(event)")})" and it works perfectly with the "NSEvent.EventTypeMask.mouseMoved" mask
Any suggestions as to what it could be? A checkbox I forgot to click somewhere? Another class/function that can be used for global keyboard input?