Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically disable shake to find

Mac os El Capitan introduced a feature called "Shake mouse pointer to locate" - it seems to ignore the cursor visibility set by CGDisplayHideCursor / CGDisplayShowCursor

I need to completely hide the mouse cursor for my cross platform first person game.

How can I get around this problem?

like image 990
Tyron Avatar asked Apr 18 '26 23:04

Tyron


1 Answers

No system event to handle this in my experience. It's not the prettiest, but you can follow the advice in this blogpost and rehide the cursors when listening to the mouseMove event.

override func mouseMoved(with event: NSEvent) {
    NSCursor.hide()
}
like image 56
NickSpag Avatar answered Apr 21 '26 20:04

NickSpag