Setting cursors when cursor leaves the electron window


#1

Hey, so i’m working on an update to my colour palette tool I built with electron. I have a colour picker working with RobotJS. I want to have a system cursor while in ‘picker mode’. Sure with CSS I can set this on the body, but that’ll only be within my app’ window. I’ve attached a GIF to better demonstrate this:

http://imgur.com/yNHV8wX

So the cursor is the default white arrow, it would be ideal to use the cross-hair cursor to better indicate to the user that they’re in picker mode.

Thanks!


#2

If you’re on Windows, look at this, you can use electron-edge and manually change the cursor everytime the user clicks the “pick” button, but since you have to modify the Windows Registry, your app should run as Administrator. If there’s a better way to do it, I’d love to know :open_mouth: