ddvk / remarkable-stylus

hack to get the button of a lamy pen working
GNU Lesser General Public License v3.0
185 stars 10 forks source link

Switches to Last Tool #7

Closed JBlocklove closed 3 years ago

JBlocklove commented 3 years ago

Recently when I press the Lamy pen button, after I release it the tool becomes my last used tool rather than the one I switched from.

For example, the tools would go fineliner -> eraser -> selection tool -> eraser -> fineliner and so on in that pattern, with the eraser properly showing up only when the button is held down. This has happened with both other pen settings as well as the selection tool now.

This seems to begin happening whenever I select a new tool, and the only way to revert it is to reinstall the plugin. It doesn't seem like this is the intended function.

This is on a reMarkable 2 with the most up-to-date remarkable-hacks installed and a few other programs installed through toltec.

Tridens92 commented 3 years ago

@JBlocklove , I too am experiencing some weirdness with the lamy button since upgrading to the latest version of remarkable hacks, but I'm not sure if we're experiencing the same thing or not. I'm a bit confused by your description.

As I understand it, the way the hack is supposed to work is that the eraser only functions when the button is held down. If you press the button and release it quickly, it assumes you want to switch to the last used tool (for instance, say you're using the fineliner, then switch to ballpoint. Clicking and releasing the Lamy button will change the tool back to the fineliner). ddvk explains this here: [(https://github.com/ddvk/remarkable-hacks/issues/126)] [excerpt from above link]:

the timing of the hold seems to be a bit tight (200ms)

detecting touch is kind of involved, what seems to work for now is:

switch to eraser on button press

on release < 1 sec: switch tool and go back to pen

if > 1 sec treat as hold and go back to pen if < 300ms double click: undo, go back to pen

So if you press and release the button too quickly, it will briefly change to the eraser on the menu, then immediately change to the last tool.

I'm having trouble since the last upgrade of remarkable-hacks, but not sure what the issue is yet. Seems to be switching to Select tool for me when I don’t want it to. I'm doing more testing until I can determine how to reproduce.

Anyway, hope this helps.

JBlocklove commented 3 years ago

Oh, interesting. It seems like I got the switch a couple of times by accident and then when I was trying to figure out what caused it I was just not holding down the button long enough. So I think that solves my issue and I'll close this. Best of luck figuring out what's going on with yours! If it becomes relevant to this or I find that this isn't exactly what's happening I'll re-open the issue.