daledesilva / obsidian_ink

Other
417 stars 10 forks source link

Respond to Apple Pencil double tap or squeeze #42

Open daledesilva opened 4 months ago

daledesilva commented 4 months ago

What's your idea? Respond to Apple Pencil double tap or squeeze events

Why? How would it help you (or others)? Could be assigned to useful functions like switching to eraser, switching colours, etc.

Anything else? This was requested on YouTube. Creating this issue here for further discussion.

YkionArt commented 4 months ago

And let's not forget SPen and Microsoft Stylus too 🙃 They don't have as many interactions as Apple Pencil Pro has now, but even implementing just pressing the side button to quick-access the eraser would be very useful!

I hadn't noticed before, but the Pencil Squeeze action actually does already bring up small menu with Undo/Redo buttons in Obsidian on iPad Pro M4, which is a start! (see image)

Screenshot 2024-05-19 at 11 47 08 jpeg

Very useful for me since I don't own the overpriced Magic Keyboard and can't cmd+Z to undo text 😅

However, currently this menu doesn't work inside the Ink section (of course, Ink does already have its own undo/redo buttons), in this case tapping "undo" from the Pen Menu would go back to before Ink Section was created, even if there content was added to Ink section after adding it in the first place.

daledesilva commented 4 months ago

Thanks for the reminder about other styluses.

I'll also connect with the Obsidian team/docs to see if I can integrate with that existing squeeze functionality.

Also, you're on an older version of the plugin. You can update now to see some much nicer UI.

tripp396 commented 4 months ago

Just picked up the M4 iPad Pro and was thinking same thing. Can test as functionality is explored

jgburn commented 1 month ago

From this thread (and one mentioned in it) it doesn’t seem like obsidian currently does anything with Apple Pencil inputs, but I’d be interested to see gestures added such as double tap (the screen) to swap to eraser as implemented here: https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1760