News for hackers. Stuff that matters.
Re:Show HN: 'Hack' the user cursor by TheAceOfHearts on Sunday April 16, 2017 @04:57AM (#14125004)
Interesting trick. I was recently looking through Safari CSS Reference and thought using an image to replace the cursor wasn't allowed: "Although the CSS specification allows it, Safari does not support custom cursors." [0]

What are examples of legitimate use-cases for supporting custom cursors? If you're considering using a custom cursors, keep in mind that not all users keep the normal cursor size. At least on macOS, you can increase the size from the Accessibility panel.

Hopefully the web can start providing access to more built-in accessibility features. One such feature that was added recently is Reduced Motion Media Query [1]. Wouldn't it be great to have a media query for "Increase contrast"? I can't be the only one that's occasionally frustrated from websites that mix 50 shades of barely readable gray.

[0] https://developer.apple.com/library/content/documentation/Ap...

[1] https://developer.apple.com/library/content/releasenotes/Gen...

Re:Show HN: 'Hack' the user cursor by aschampion on Sunday April 16, 2017 @06:51AM (#14125290)
> What are examples of legitimate use-cases for supporting custom cursors?

We build web applications serving expert users for which this is essential. For precise selection the default cursor often occludes important information. Think of how confusing something like Photoshop, AutoCAD or Maya would be without contextual cursors.

It would be sensible, however, to place behind a permission in the same way as location or notification APIs. Unfortunately most browsers' UX for permissions is awful.

Re:Show HN: 'Hack' the user cursor by shawnz on Sunday April 16, 2017 @11:22AM (#14126087)
OP is specifically talking about the ability to use arbitrary images as cursors. Why aren't the standard i-beam, crosshair, resize etc cursors enough for your purposes?
Re:Show HN: 'Hack' the user cursor by aschampion on Sunday April 16, 2017 @11:48AM (#14126173)
Modal function cues: paintbucket, eyedropper, etc.

Common interaction cues that span functions but aren't in the CSS set: multiaxis, rotation, etc.

Not to mention the innumerable domain-specific possibilities. It's another example of the tension between the idea of browser-as-the-future-ubiquitous-platform and browser-as-lowest-common-denominator-mobile-safe-sandbox, which is eroding the established niche of desktop software for deep, focused, domain-optimized work because of the tyranny of CRUDy consumption-focused web apps.

Re:Show HN: 'Hack' the user cursor by jfim on Sunday April 16, 2017 @11:57AM (#14126204)
Sometimes you're conveying additional information through the cursor. For example, the default cursor in Photoshop when using the brush tools is a circle that shows your brush width, so that when using the brushes you know which area will be painted (see http://pe-images.s3.amazonaws.com/basics/cs5/preferences/sho... for example). Some other CAD applications show whether a line is freestanding or snapped to another through the cursor as well.
Re:Show HN: 'Hack' the user cursor by Chris_Newton on Sunday April 16, 2017 @12:14PM (#14126266)
If you’re developing a UI with interesting interactions, you can provide useful and intuitive feedback to the user by changing the cursor, either to reflect what will happen if they click at the current location, or to show that for some reason they can not do something by clicking at the current location.

Exactly what actions are possible or potentially expected but actually not possible will naturally depend on context, including the purpose of the application itself, anything already done by the user, and perhaps other factors like whether the user is holding any keys down at the moment. There are endless possibilities where this idea could be useful, from “fill the intermediate cells using rule X” in a spreadsheet to “guard this ally” in a game.

As an aside, UIs that use this technique may also use larger or more complicated tool tips and/or context menus, which means that a lot of the local status and commands within a UI can be viewed in the immediate vicinity of where they are relevant. On larger screens or UIs that divide the available space into different areas for different purposes, that locality can be useful both for reducing user errors and for increasing efficiency.

Re:Show HN: 'Hack' the user cursor by jasonkostempski on Monday April 17, 2017 @11:50AM (#14131782)
"Unfortunately most browsers' UX for permissions is awful."

The worst UX being when they don't ask at all for things that really should be asked for, like javascript.

Re:Show HN: 'Hack' the user cursor by lawik on Sunday April 16, 2017 @05:41AM (#14125086)
I am certain in my heart that the most reasonable use case is to replace the cursor with a detailed gauntlet cursor or severed hand as in Warcraft to let the user know whether they are The Alliance or Horde.

Kidding, of course. But damn I loved that sort of thing back when. Especially being able to do it with weird plugins as a fledgling "webmaster".

Re:Show HN: 'Hack' the user cursor by Freak_NL on Sunday April 16, 2017 @05:21AM (#14125047)
> What are examples of legitimate use-cases for supporting custom cursors?

Probably special cursors that indicate a different type of action that can be performed; like the hand-shaped pointer you get when hovering over a button or the various resize arrows, but custom. A tipped paint bucket for example on a website presenting a drawing application.

Re:Show HN: 'Hack' the user cursor by sharpercoder on Sunday April 16, 2017 @09:30AM (#14125713)
A presentation app where the cursor can be changed to a laser pointer (big red dot).
Re:Show HN: 'Hack' the user cursor by Nemo157 on Sunday April 16, 2017 @05:07AM (#14125027)
That does seem to be the case for me (at least on Safari 9.1); the real cursor disappears, but no fake cursor appears.
Re:Show HN: 'Hack' the user cursor by hrrsn on Sunday April 16, 2017 @05:43AM (#14125092)
The demo works fine on Safari 10 for me.