Android Hover Support

Tablets can use mice and stylii (styluses? styli?) ! It would be super nice if we could indicate affordances with reactive hover effects like we can on desktop. Modern web browsers already support this - I’m not totally familiar with the full web stack under the hood of Obsidian but I imagine most of the work of supporting this has already been taken care of upstream!

Android exposes stylus air-hover through MotionEvent.ACTION_HOVER_ENTER,
ACTION_HOVER_MOVE, and ACTION_HOVER_EXIT, with TOOL_TYPE_STYLUS and
AXIS_DISTANCE.

On Obsidian Android, mouse hover reaches the plugin WebView, but stylus air-hover
does not: the plugin receives pointerType “pen” only when the stylus touches the
screen. This prevents community plugins from showing a pre-contact stylus cursor.

Could Obsidian’s Android WebView host expose native stylus hover to plugins,
for example through a CustomEvent or plugin API carrying x/y, toolType, and
distance? This would enable hover cursors, brush previews, and pen-aware UI
without affecting touch input.

Same here on a Samsung Galaxy Tab with S Pen (Air command off). On Patrick H. Lauke’s “pen-tracker” test page in Chrome, stylus hover arrives as pointermove with pointerType: "pen", pressure: 0, and buttons goes from 0 to 1 when the side button is pressed. Inside Obsidian, logging every pointer, mouse and touch event on window in the capture phase shows nothing at all until the pen touches the glass. Obsidian’s own ribbon icons don’t highlight on stylus hover either.

One more consequence: the S Pen side button can’t be read while hovering. The only trace in Obsidian is a single contextmenu event with no pointerType and no release event, so handwriting plugins can’t offer “press the button to open a menu / hold it to erase” the way native apps do.

If the Android container let ACTION_HOVER_* / generic motion events reach the WebView (as Chrome does), the standard Pointer Events would just work: no new plugin API needed.