0

Mouse Cursor styling, like Col-Resize and Not-Allowed See Examples Here do not seem to apply to the mouse that appears on a phone or tablet through USB OTG. Any way to apply CSS, Javascript or other styles to the OTG mouse?

marqso
  • 61
  • 9
  • a lot of browsers don't support all of those... – dandavis Apr 09 '15 at 01:20
  • Good point. But I tested them in chrome, where they all work, and in chrome for android -using OTG to get a mouse cursor- and none of them did. Are we thinking that mobile browsers don't employ these styles AT ALL, even though OTG exists and is well supported? And if so, it'd be nice to know that for sure... – marqso Apr 09 '15 at 04:31
  • 1
    mobile browsers don't support cursor styles because there's no mouse cursor on mobile... – dandavis Apr 09 '15 at 07:15
  • I think I understand now that there might be some confusion over the whole issue. check out https://developer.mozilla.org/en-US/docs/Web/CSS/cursor and scroll down to Browser Compatibility and choose the Mobile tab... ---"?"--- It's funny that they'd put a Mobile tab in , and then populate it this way, where even the Feature cells are, like, "Uh-whaaa?" – marqso Apr 09 '15 at 15:39

2 Answers2

0

According to Mozilla on this page (scroll down to Browser Compatibility and click the Mobile tab) the question, even of which features might be available for a Mouse cursor that doesn't generally appear on Mobile, remains an unknown, or maybe up in the air. As more OTG applications take hold (one thinks of the usefulness of a tailored mouse in certain game environments - crosshairs, anyone?) perhaps the spec will rise to the occasion...

marqso
  • 61
  • 9
0

It is actually Android's kernel that doesn't support different mouse cursors. Even in the app IDE's it is impossible to change the cursor without drawing on top of it. People don't typically use mice on mobile devices for Internet browsing therefore that's why it is not implemented.

If you're absolutely looking for a solution, you will have to host your webpage inside an app container with a WebView and use Android's Javascript Communication Interface to detect the mouse hovers, and a System Overlay to draw on top the mouse cursor. It is a difficult implementation but it is the only solution for the specific situation. I can maybe help you out with the implementation if you request.

Happy developing,

Aaron Gillion
  • 2,227
  • 3
  • 19
  • 31