Correctly detect accuracy of input device and treat it accordingly

Use case or problem

Obsidian currently treats input from more accurate “fine pointer” type devices (like graphics tablets and large touch screens) as if they were less accurate “coarse pointer” type devices (like a mobile touchscreen). This mistakenly overrides the default OS behavior for these devices – which is to act as a standard mouse, as they do in most programs – and prevents them from performing any mouse-style click & drag operations in Obsidian.

The mobile-type behaviors it adds to them then conflict with their default behaviors. For example, with a graphics tablet on Windows, “click and hold” is treated as “right click” by default, but Obsidian treats it as a text selection because it think it’s a mobile-like device. The right click menu pops up at the same time text is selected, blocking the text and making it difficult to select more than one word.

While graphics tablets were once primarily used by artists, they are increasingly becoming a staple of notetaking, with operating systems like Windows providing a suite of secondary features (which operate at the OS level) to encourage this shift, such as the ability to handwrite and redline text in any program.

Obsidian adding mobile controls to fine pointer devices prevents users from taking full advantage of the excellent tools their OS provides for them.

Allowing fine pointer devices to do their thing would also allow them to interact with Canvas in its current state. Given how visual of a tool Canvas is and the userbase it will attract going forward, it makes sense to ensure Obsidian is compatible out-of-the-box with the tools visual artists use to navigate their favorite software packages.

Proposed solution

Update whatever code is being used to detect touchscreens so it also accounts for the pointer accuracy. It should not apply “coarse pointer” type controls to “fine pointer” type devices. Fine pointer devices can be ignored and allowed to function as mice.

This should NOT require interacting with the drivers, adding gesture support, or doing anything else fancy. (Those are other requests floating around – my concern is just ensuring the pen’s default behavior at the OS level is not interfered with.)

I found that this code, when put in a Templater script, correctly detected whether I was using a device meant to behave as a mouse (my mouse, my graphics tablet, and a relative’s touchscreen laptop) vs one meant to behave as a mobile touchscreen (my phone).

(I know that Obsidian isn’t written in raw JS, but it’s a helpful proof-of-concept. Hopefully the solution in your software suite is not much more complex than this.)

I am also not against this being a toggle-able setting, in case existing graphics tablet and large touchscreen users have adjusted to Obsidian’s strange behavior and would like to keep it that way.

Current workaround (optional)

There are two options:

  1. You can change the default settings in your device/OS to minimize behavior conflicts. But that would break your workflow in other programs and should not be necessary.

  2. For drawing tablets on Windows specifically, you can disable Windows Ink in their driver settings. But this also disables all of the great notetaking features that Windows adds to pen & touch devices across your entire OS. This should not be necessary to use a program like Obsidian.

Related feature requests (optional)

I originally reported this as a bug after discovering the issue while playing with Canvas, before realizing it was a more widespread issue:

Another user reported parts of this issue along with a request for gesture support:

Another user requested a workaround for Canvas specifically:

I suspect a lot of other odd feature requests and bug reports floating around that the mods are having trouble replicating are related to this as well, as this quirk of Obsidian interferes with the expected control schemes on many touchscreen devices.

4 Likes