cocreate icon indicating copy to clipboard operation
cocreate copied to clipboard

Pen vs touch vs mouse

Open edemaine opened this issue 4 years ago • 3 comments

How can we assign different modes to different mouse/pen buttons and to touch?

One way would be for mode select to apply only to the applied button/pointer. But this might be a bit counterintuitive... Should it be toggled behavior? Also not sure how to denote multiple modes - maybe each selected mode has a little inset icon of mouse/pen/touch?

Touch seems to be the special type of pointer event -- mouse and pen are always intentional, while sometimes want to disable touch / make it behave differently.

  • [x] Add toggle to disable touch when desired (#62)
  • [ ] Make a dialog for configuring touch: what other options do we want?
  • [ ] Around pen actions, want to disable touch
  • [ ] Distinguishing single-touch from multitouch gestures (#13). So could still pan/zoom with two fingers even with "touch disabled".

edemaine avatar Jun 11 '20 05:06 edemaine

Related to this, pen devices have a dedicated button for eraser. It would be great if the app can interpret this behavior, so I don't need to always switch the buttons. (But I have never seen any web-based service to interpret, so maybe it is not possible at all)

tomtachi avatar Aug 07 '20 00:08 tomtachi

@tomtachi Pointer Events do distinguish between the buttons, but they have cryptic names like 1 and 16, not "pen" and "eraser", and differ from device to device. So maybe the best thing to do is have a dialog where you can specify the operation for each button/tip. Perhaps the same dialog for configuring how touch should work (mentioned above) and for custom key configuration (#16/#57).

An alternative would be for every tip/button have its own mode, and you select it in the same way (similar to what's mentioned in the issue above). So you could hit the pen button with the tip of your pen, and hit the erase button with the back of your pen, and then both those modes are selected depending on which tip you use. And they could be changed similarly. (A similar trick could define separate behaviors for different mouse buttons.) This is more flexible but maybe less intuitive? I am also not sure how to represent it visually on the tool buttons -- are two buttons drawn down, and you need to remember which is which, or maybe there's an overlay?

If you have a preference between these options, let me know!

edemaine avatar Aug 07 '20 16:08 edemaine

So in the second option, each pen mode remembers the last used tools? I feel the interface useful and universal. Once we know how to do, it should be intuitive; it is like putting different paint on different brushes.

tomtachi avatar Aug 08 '20 01:08 tomtachi