News for hackers. Stuff that matters.
Re:Show HN: This website moves your mouse cursor by baobabKoodaa on Friday April 02, 2021 @01:54PM (#26673905)
> Note to the author: the illusion would be even better if you used the user-agent to render a system-accurate mouse cursor ;) (on macOS the real cursor is black and the fake one is white)

You're right, it would make the illusion better. I developed this on Ubuntu where the default cursor is black, and I did consider doing this. Eventually decided to just use the default white cursor from Windows because it has better contrast on the dark color scheme. I guess I could set up 3 different color schemes for 3 different cursors for Mac, Linux, Windows, but it may be a bit too much work. I think most people who notice the cursor is different will just think "oh, this website uses a custom cursor", they won't necessarily realize that it's just an image.

Re:Show HN: This website moves your mouse cursor by tgsovlerkhgsel on Friday April 02, 2021 @08:07PM (#26677184)
It's definitely what tipped me off. With an accurate cursor, I might have been confused into wondering how it was done.

With the Pointer Lock API, you can actually take the user's cursor https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Loc... (but the browser will show a notice).

Re:Show HN: This website moves your mouse cursor by Waterluvian on Friday April 02, 2021 @02:27PM (#26674288)
I'm on 18.04 and my cursor is white (and much smaller than the one on the site). I never realised Ubuntu had a black cursor option.

I think you could make these changes, but I think that's if you want to have fun doing it. The diminishing returns are tiny and the gag lands well.

Re:Show HN: This website moves your mouse cursor by brundolf on Friday April 02, 2021 @02:35PM (#26674391)
You're probably on a different desktop environment (Gnome, KDE, etc)
Re:Show HN: This website moves your mouse cursor by modeless on Friday April 02, 2021 @02:17PM (#26674159)
Even better would be to use the fullscreen api and mouse capture api to trap the mouse for real. Then you could render fake browser UI and do whatever you want when people try to click on it. If you really wanted to mess with people.
Re:Show HN: This website moves your mouse cursor by baobabKoodaa on Friday April 02, 2021 @02:20PM (#26674201)
If you use the fullscreen api or the pointer lock api, Chrome will render a popup that says "press ESC to..." Without that it would be sick!
Re:Show HN: This website moves your mouse cursor by modeless on Friday April 02, 2021 @02:22PM (#26674229)
Yeah but I bet at least half of people wouldn't notice, especially if you put something interesting on the other side of the screen for a second. Or you could render a bunch of overlapping fake warnings all over the screen, making it difficult to find the real one. Or you could put an exit fullscreen button and pretend to exit fullscreen when clicked, but you're actually still in fullscreen. Etc. I should probably stop giving the malware guys ideas...
Re:Show HN: This website moves your mouse cursor by juotlrjrb on Friday April 02, 2021 @07:35PM (#26677010)
Ctrl+W... Alt+F4...