While using macOS Mojave, I would like the mouse pointer (cursor, carat) to become invisible as soon as any key is pressed, including modifier and navigation keys.

In summary:

  • The mouse should remain invisible until moved.
  • The mouse must remain at the same coordinates as when it disappeared; no sending it off the screen, out of sight.

I have tried Cursorcerer which allows a single hotkey to hide the mouse and also an idle timer, neither of those features address the problem. Many Mac applications (iTerm2, Sublime Text, Firefox) have settings that hide the mouse when keys are pressed. Some applications (Chrome, LibreOffice) do not. I have investigated modifying keyloggers in Python (https://github.com/beatsbears/pkl) with


and Objective-C (https://github.com/neilco/keylogger) with

[NSCursor setHiddenUntilMouseMoves:YES];

without success.

Those calls to setHiddenUntilMouseMoves do not cause the mouse to hide. A recent OS update (10.14.5) is preventing them from running.

Can anyone suggest a way for me to achieve my desired outcome?

I am open to using terminal commands, 3rd party software, etc.

  • What's wrong with Cursorcerer in Mojave? I'm the developer.. I'm still running High Sierra, but I really should upgrade and fix any problems that people may have – user47712 Jul 2 '19 at 4:38
  • One possible defect with Cursorcerer is that the hotkey will be lost and I need to open the System Preferences to reassign. I have not identified what causes this to be lost, it only happens a couple of times a week and is not a big deal. The reason Cursorcerer does not suit my needs is that one specific hotkey is required to hide the mouse pointer and I want any key press (Ctrl, Alt, Shift, Super, A-Z, 0-9, or arrow keys) to hide the pointer. – Les Grieve Jul 3 '19 at 11:36

You must log in to answer this question.

Browse other questions tagged .