Standalone tool that turns the button on the Lamy Pen into an eraser on the reMarkable.
Also confirmed to work with these other styli:
- Samsung S6 S Pen
- Wacom One Pen CP91300B2Z
The tool will definitely break when the reMarkable updates. When that happens, just reinstall!
SSH into your reMarkable and make a directory to store our files:
cd
mkdir RemarkableLamyEraser
Download the binary from the release page, and the .service file from the project page:
cd ~/RemarkableLamyEraser
wget https://github.com/isaacwisdom/RemarkableLamyEraser/releases/latest/download/RemarkableLamyEraser
wget https://github.com/isaacwisdom/RemarkableLamyEraser/raw/main/RemarkableLamyEraser/LamyEraser.service
Make the binary exectuable, copy the .service file to systemd file, enable, and start it. This means the tool will automatically start on boot:
chmod +x RemarkableLamyEraser
cp LamyEraser.service /lib/systemd/system/
systemctl daemon-reload
systemctl enable LamyEraser.service
systemctl start LamyEraser.service
systemctl stop LamyEraser.service
systemctl disable LamyEraser.service
rm -rf ~/RemarkableLamyEraser
rm /lib/systemd/system/LamyEraser.service
systemctl daemon-reload
systemctl reset-failed
Press and hold to erase, release to use as a normal pen. Double click the button to undo. Note that at the moment, double pressing to undo only works for portrait documents in right handed orientation.
Further customization can be done by adding arguments to ExecStart line of the LamyEraser.service file. This can be opened with nano ~/RemarkableLamyEraser/LamyEraser.service
.
The supported arguments are:
--press
Press and hold to erase, release to use as a normal pen. This is the default behavior.
--toggle
Press the button to erase, press the button again to swtich back to a normal pen.
--double-press undo
Double click the button to undo. This is the default behavior.
--double-press redo
Double click the button to redo.
--left-handed
Use this option if you are using left handed mode.
For example, this line would use the toggle mode and redo on a double click:
ExecStart=/home/root/RemarkableLamyEraser/RemarkableLamyEraser --toggle --double-press redo
To apply your config, run these commands:
cd ~/RemarkableLamyEraser
cp LamyEraser.service /lib/systemd/system/
systemctl stop LamyEraser.service
systemctl daemon-reload
systemctl start LamyEraser.service
When you press the button on the Lamy Pen, an input event with code BTN_TOOL_RUBBER is sent into dev/input/event1. Essentially, this tricks the reMarkable into thinking you are using the eraser side of the Marker Plus.
- Download the latest toolchain for your device from https://remarkablewiki.com/devel/toolchain (e.g.
codex-x86_64-cortexa9hf-neon-rm10x-toolchain-3.1.15.sh
) - run that file to install the toolchain (e.g.
sudo sh codex-x86_64-cortexa9hf-neon-rm10x-toolchain-3.1.15.sh
) - source the printed environment file (e.g.
source /opt/codex/rm11x/3.1.15/environment-setup-cortexa7hf-neon-remarkable-linux-gnueabi
) - compile
main.c
using theCC
environment variable (e.g.$CC -O2 main.c
)- if there is an error like
no such file or directory
, copy the command and execute it directly instead of using$CC
, e.g.arm-remarkable-linux-gnueabi-gcc -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=/opt/codex/rm11x/3.1.15/sysroots/cortexa7hf-neon-remarkable-linux-gnueabi -O2 main.c
)
- if there is an error like
- RM1 support (testers needed)
- Left handed and landscape support for actions
- Nice install script
- toltec package
- config file (as opposed to current command line argument system)
- expand "How it works" section.
- flexible triggers (such as "click", "press and hold", "double click", "double click and hold", etc.)
- freely assignable actions (as listed below, able to assign to any trigger above) (these last two will require some significant code restructuring)
The testing branch is used for code that builds towards the items on the TODO list above, but isn't yet in a format that is ready to be committed to the main branch. Essentially, any commits to the main branch should be stable and relatively clean, while the testing branch code will be "stable", but messy. Currently, the testing branch is being used to test:
- Double click actions
The actions currently being implemented are:
- undo (working only for portrait view with right hand orientation)
- redo (working only for portrait view with right hand orientation)
- erase (needed for RM1 support, since it can't use the Marker Plus style rubber events)
- erase selection
- select