Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eraser toggle on Lamy button press #19

Closed
bordaigorl opened this issue May 2, 2020 · 25 comments
Closed

Eraser toggle on Lamy button press #19

bordaigorl opened this issue May 2, 2020 · 25 comments

Comments

@bordaigorl
Copy link

I got a Lamy pen, which is compatible with reMarkable tips and works really well.
The pen has a handy button which would be useful as an eraser toggle, but unfortunately the remarkable ignores its events.
In /dev/input/event0 you get:

  • type: 1 code: 331 value: 1 on button down
  • type: 1 code: 331 value: 0 on button up

Would it be possible to patch the event loop so that these events are properly handled?

For me this solution would be even superior to the new Marker with eraser since I would be able to use the precision of the marker tip to erase...

@ddvk
Copy link
Owner

ddvk commented Jun 5, 2020

i have to get my hands on one.
i think you can get this to work without patching xochitl much

you can load qpa plugins e.g (
QT_QPA_GENERIC_PLUGIN=evdevtablet xochitl
or QT_QPA_GENERIC_PLUGIN=evdevkeyboard:/dev/input/event0 xochitil

will have to modify the plugin to emit some keycode (https://code.woboq.org/qt5/qtbase/src/platformsupport/input/evdevtablet/qevdevtablethandler.cpp.html)

@dstango
Copy link

dstango commented Jun 5, 2020

I'm willing to sponsor you a Lamy as a little thank you for your great work. Send me a private message and we'll work out how you get one.

@ddvk
Copy link
Owner

ddvk commented Jun 5, 2020

I'm willing to sponsor you a Lamy as a little thank you for your great work. Send me a private message and we'll work out how you get one.

thanks, really appreciate it, but no need. i’ll order one

@slowan
Copy link

slowan commented Jun 5, 2020

I got a Lamy pen, which is compatible with reMarkable tips and works really well.

Thanks for the pen tip. Luckily they just have it now on "a____n de" for just 29.

It would be awesome to have the eraser switch on the button.

@Tridens92
Copy link

Wow, this would be an incredible feature. Having no eraser is my biggest grip with rM v. 1. Just ordered a Lamy two weeks ago. I would be so grateful for this addition to an already incredible hack.

@ddvk
Copy link
Owner

ddvk commented Jun 8, 2020

while i'm waiting for the pen to arrive, i did some experiments. you can try if it works (early prototype)

https://github.com/ddvk/remarkable-stylus

the latest patches should respond to ctrl-u for toggling the eraser

@burgarth
Copy link

burgarth commented Jun 8, 2020 via email

@dstango
Copy link

dstango commented Jun 8, 2020

Great, it works!!!
Suggestion (might be personal preference):
(right now a single button press toggles pen/eraser) -- it might be handy to have the button act like "while button pressed = eraser, while button released = pen", because the button is right in the reach of the index finger.
caveat: that might get tricky when lifting the pen while the button is still pressed, and then releasing the button too high up in the air.

@bordaigorl
Copy link
Author

Thoroughly impressive!!!

Maybe I'm misunderstanding something: is this supposed to work with standard xochitl or only with a patched one?
If the latter: what is the minimal patch needed to make this work?

@ddvk
Copy link
Owner

ddvk commented Jun 9, 2020

Thoroughly impressive!!!

Maybe I'm misunderstanding something: is this supposed to work with standard xochitl or only with a patched one?

If the latter: what is the minimal patch needed to make this work?

only with the lastest patch

@bordaigorl
Copy link
Author

I can confirm it works.
I would also prefer the eraser to be toggled back on button lift.
Well done!

@ddvk
Copy link
Owner

ddvk commented Jun 9, 2020

try this patch (with hold to erase)

sh -c "$(wget https://raw.githubusercontent.com/ddvk/remarkable-hacks/master/patch.sh -O-)" _ patch_06_1

@burgarth
Copy link

burgarth commented Jun 9, 2020 via email

@dstango
Copy link

dstango commented Jun 9, 2020

Patch 06_1 works like a charm for me -- eraser toggle back when lifting the button -- great!!!!
Thank you!

@slowan
Copy link

slowan commented Jun 11, 2020

try this patch (with hold to erase)

sh -c "$(wget https://raw.githubusercontent.com/ddvk/remarkable-hacks/master/patch.sh -O-)" _ patch_06_1

Button doesn't work with 06_1 patch (switch nor hold). Note: ddvk/remarkable-stylus is installed on the device.

Patch 06 works flawlessly.

@ddvk
Copy link
Owner

ddvk commented Jun 11, 2020

Button doesn't work with 06_1 patch (switch nor hold). Note: ddvk/remarkable-stylus is installed on the device.

Patch 06 works flawlessly.

getting mixed feedback here, it should select the eraser as long as the button is kept pressed

@burgarth
Copy link

burgarth commented Jun 11, 2020 via email

@ddvk
Copy link
Owner

ddvk commented Jun 11, 2020

my pen should arrive today so i ll be able to test it

@slowan
Copy link

slowan commented Jun 11, 2020

Button doesn't work with 06_1 patch (switch nor hold). Note: ddvk/remarkable-stylus is installed on the device.
Patch 06 works flawlessly.

getting mixed feedback here, it should select the eraser as long as the button is kept pressed

I have tried it again too with same results.

@AaronDavidSchneider
Copy link

In my case both options work flawlessly

@falevian
Copy link

Thanks! This patch did not work for me, the button does not do anything with it. patch_06 works wonderfully though.

Yo have to install also this:
sh -c "$(wget https://raw.githubusercontent.com/ddvk/remarkable-stylus/master/patch.sh -O-)"

@ddvk
Copy link
Owner

ddvk commented Jun 11, 2020

Button doesn't work with 06_1 patch (switch nor hold). Note: ddvk/remarkable-stylus is installed on the device.
Patch 06 works flawlessly.

getting mixed feedback here, it should select the eraser as long as the button is kept pressed

I have tried it again too with same results.
you sure you ran the patched version with the -plugin argument? anyway, added to install script

@burgarth
Copy link

burgarth commented Jun 11, 2020 via email

@ddvk
Copy link
Owner

ddvk commented Jun 22, 2020

closing this one as fixed

@ddvk ddvk closed this as completed Jun 22, 2020
@slowan
Copy link

slowan commented Jun 25, 2020

Now it works. Possibly I haven't used the -plugin argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants