GithubHelp home page GithubHelp logo

ddvk / remarkable-stylus Goto Github PK

View Code? Open in Web Editor NEW
180.0 19.0 10.0 24 KB

hack to get the button of a lamy pen working

License: GNU Lesser General Public License v3.0

QMake 0.87% C++ 94.56% Shell 4.57%

remarkable-stylus's Introduction

QT plugin for lamy pen

Generates a key press when the pen button is pressed

Usage

Copy libqevdevlamyplugin.so to /usr/lib/plugins/generic

export QT_QPA_GENERIC_PLUGINS=evdevlamy
or xochitl -plugin evdevlamy

to make it permanent edit the /lib/systemd/system/xochitl.service

also, you'll need to patch xochitl with remarkable-hacks

Compilation

source /usr/local/oecore-x86_64/environment-setup-cortexa9hf-neon-oe-linux-gnueabi
qmake
make

Automagic

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

plus the patch for xochitl from: https://github.com/ddvk/remarkable-hacks

Needs to be reapplied after a software upgrade (both this and the hacks)

Uninstall Automagic

sh -c "$(wget https://raw.githubusercontent.com/ddvk/remarkable-stylus/master/remove.sh -O-)" 

remarkable-stylus's People

Contributors

ddvk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

remarkable-stylus's Issues

Gesture-based for switching tools?

I was just thinking, and I've looked through the code but don't know enough of it to make any meaningful estimate:

How much work would it be to have four different gestures for different tools? For example, when pressing the button and hovering upwards, switching to one particular tool.

I don't have much time right now but if someone gives me a couple pointers (like methods to check out for this) I can take a look later.

libqevdevlamyplugin.so no longer works for 3.9.3.1986 (Qt 6.5.2)

Starting from reMarkable 3.9.3.1986 (current) the Qt Framework version has been bumped up to 6.5.2.

09:22:51.942 qt.core.plugin.factoryloaderlooking at "/usr/lib/plugins/generic/libqevdevlamyplugin.so"
09:22:51.942 qt.core.plugin.loader    Failed to find metadata in lib /usr/lib/plugins/generic/libqevdevlamyplugin.so: '/usr/lib/plugins/generic/libqevdevlamyplugin.so' is not a valid ELF object (.qtmetadata section has incorrect magic)
09:22:51.943 qt.core.plugin.factoryloader"Failed to extract plugin meta data from '/usr/lib/plugins/generic/libqevdevlamyplugin.so': '/usr/lib/plugins/generic/libqevdevlamyplugin.so' is not a valid ELF object (.qtmetadata section has incorrect magic)" 
         not a plugin

Does it work on Samsung S Pen?

Hello @ddvk!
Thank you for this plug-in.
EDIT: and I answer myself: it does work with the Samsung S-Pen (s6 lite tab)! This Samsung pen works very fine on RM2 and it is even magnetic as the original one. Highly recommended.
Regards,
Javier

Bug with erase selection by button?

Thanks for the great added features! I think I've found a bug in the stylus button hack. When I hold down the button to do a select erase and then release the button without lifting the stylus off the tablet, it continues writing and changes the pen thickness. I noticed it in Marker (goes from thin to thick), but I believe it occurs in other pen settings too. I haven't noticed this in prior versions of the hack. Is this how it's intended to function, or is it a bug? Thanks again for all the added features. I've linked to an youtube vid showing the potential bug.

Is it possible to distinguish between distinct pens?

I own several pens compatible with the remarkable 1:

  • remarkable
  • Staedtler noris digital
  • Lamy digital

I was wondering if there is any way to distinguish these pens, or even two pens of the same model, in software. If not, oh well. But if so, it'd be really cool to be able to tie certain pens with certain writing implements in xochitl or other software.

Is this at all possible?

Not an issue: This modification works with a Surface Pro 1 stylus

Not actually an issue, but rather a discovery about this plugin that I think is pretty cool. I did not know where else I could post this.

This plugin detects the button press on my old Surface Pro 1 stylus and puts the RM2 into eraser mode. I can either press the button on the side of the stylus or I can flip the stylus and use the button on the end as an eraser by pressing it against the RM2 surface while doing the erasing gestures and it works well.

Note, that it is a Surface Pro 1 (circa 2013) stylus, not a newer Surface stylus.

[Question] Thickness of Eraser

I want to thank @ddvk for your amazing work. I wouldn't have got my Lamy stylus without this repo.
I notice that the original Marker Plus has a finer erasing functionality compared to that of Lamy stylus. Is this something restricted by the hardware of Lamy pen?

Install without rm hacks

Thank you for writing this, eraser capabilities would greatly improve my rm1 experience!

I do not have a need for the other rm hacks, and value the uncluttered interface of the rm (though missing out on features). Could you provide a stand-alone installer for the stylus patch? I think this would be useful also for people wanting to try out other software that would be incompatible with rm hacks, like ko reader.

Making permanent

Hi there

I had it all working (using automagic), and on restart stopped. So trying to figure out how to make permanent.
Have opened the xochitl.service file open but unsure what to change? Appreciate further guidance

How to

Hey,

thanks for writing the code!
I just wanted to try if it works. I don't understand how to install.

What I did:

  • installed remarkable-hacks (patch 06)
  • on rm:
wget https://github.com/ddvk/remarkable-stylus/archive/master.zip
unzip master.zip

Where do I find the libqevdevlamyplugin.so? If I need to compile it first, do I have to compile it on the remarkable? If so:
source /usr/local/oecore-x86_64/environment-setup-cortexa9hf-neon-oe-linux-gnueabi
doesn't work on the rm.

Thanks!

Debugging?

Hi,

I cant't get the erazer to work again. It used to work and I don't know what I've done to break it. Already uninstalled/reinstalled via automagic. (hacks are installed and working)
How can I debug or get a hint what is wrong?

Thanks

Button isn't working

I successfully installed the most recent patch using automagic. I ran the automagic for the lamy pen but it doesn't seem to be working.

Screen output:
reMarkable: // sh -c "$(wget https://raw.githubusercontent.com/ddvk/remarkable-stylus/master/patch.sh -O-)"
Connecting to raw.githubusercontent.com (151.101.0.133:443)
wget: note: TLS certificate validation not implemented

  •                100% |*************************************|   540  0:00:00 ETA
    

Connecting to github.com (140.82.114.3:443)
wget: note: TLS certificate validation not implemented
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (52.217.36.220:443)
libqevdevlamyplugin. 100% |*************************************| 43080 0:00:00 ETA

version 2.9.1.217 eraser not being reset to pen

Just installed the hack under version 2.9.2.217. When using the button for the Lamy it will switch to the eraser, but after letting the button go it does not switch back to the pen, but stays on the eraser. The same when using the Marker Plus, it will erase, but does not switch back to the pen when flipping the pen back.
removed the stylus hack and it works for the Market Plus correctly, but of course the button on the Lamy does not erase.

Fix Automagic install for compatibility with newer Toltec versions

Hi, I noticed an issue with Automagic install with newer Toltec versions. When I bought my Remarkable 2, I've installed (in order) ddvk hacks, remarkable-stylus, and then Toltec with various packages. For update 2.7 I've uninstalled everything, performed the update and re-installed everything back. This time though, the remarkable-stylus hack went away (I believe after restarting) and I didn't manage to bring it back through Automagic. What I realized is that this time I had to manually append -plugin evdevlamy to /etc/systemd/system/xochitl.service.d/toltec-wrapper.conf (which calls /opt/bin/xochitl) rather than the usual /lib/systemd/system/xochitl.service (which calls /usr/bin/xochitl). Could you please add this to the Automagic in order to avoid doing this manually? Thanks!

Remove stylus software

I am going to sell my remarkable 1 and like to restore everything to 'normal'. How can I remove the stylus hack software?

Map button to Undo

I would like the button mapped to undo. It's the one command I tend to need to repeat several times rapidly and is more annoying to have to do through swipes than tool switching or tool/eraser switching.

I couldn't find anything in Readme.md on how to customize the action - is it possible?

Button question

is it possible to configure button to?

hold to erase
tap to undo

Switches to Last Tool

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.

No action from button

I'm not getting any action from my new Lamy AL-star EMR 471. DDVK hacks for tool switching and tool/eraser switching are working.

I used the Automagic script to install.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.