Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect if cursor is hidden on Mac OS X

Is there a programmatic, non-private-API way to detect whether the mouse cursor is hidden on Mac OS X? (As occurs, for example, when typing into a text field.)

NSCursor has hide and unhide but no isHidden. I'm wondering if there is some other API which might do what I want. C-based APIs are fine.

like image 443
Nick Moore Avatar asked Feb 17 '11 08:02

Nick Moore


People also ask

How do I find a missing cursor on my Mac?

If your mouse cursor isn't showing up, a simple click-and-drag operation may bring it up. Simply hold as though you are selecting an item or bunch of text, then release. This should bring up your mouse cursor on the screen!

Why did my cursor disappear Mac?

If your Mac's mouse keeps disappearing, make sure that it's connected and the cursor isn't too small. Quickly shaking your Mac's mouse will enlarge the cursor, allowing you to find it. You can also try checking hot corners, lowering cursor speed, and disabling mouse-enhancement software.

Why does my cursor keep disappearing Mac Mojave?

It can be used to quit applications that are taking too much memory. As noted earlier, the disappearing cursor on Mojave problem is memory- related and can thus be resolved by quitting memory intensive applications.


1 Answers

Try CGCursorIsVisible() (returns a BOOL).

like image 176
DarkDust Avatar answered Oct 25 '22 17:10

DarkDust