Skip to content

Ambioid/linux-surface-pen-button-remap

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Remapper for the Bluetooth (Eraser) Button of the Surface Pen

Work in progress.

The Surface Pen bluetooth-button can distinguish between three actions, which are reported as key events:

  • Single-click (⌘ Meta+F20).
  • Double-click (⌘ Meta+F19).
  • Press and hold (⌘ Meta+F18).

This utility allows you to re-map these actions via evedev/uinput so that they can be used e.g. in presentation tools that do not allow custom keyboard shortcuts or have trouble handling the meta key. For more hardware-details, have a look at the official Windows specification page.

Install

To install it you need cargo.

Clone the repository and open it. Then run cargo build --release and copy the binary file to /usr/bin/ via sudo cp ./target/release/surface-pen-button /usr/bin/ . Now you can start it via sudo surface-pen-button.

If you want to install the systemd service which automatically starts on system startup and restarts when the Pen isn't connected until it's connected you have to copy the surface-pen-button.service file to /etc/systemd/system/ via sudo cp surface-pen-button.service /etc/systemd/system/. Then you have to run sudo systemctl daemon-reload and then to enable it at system startup sudo systemctl enable --now surface-pen-button.service.

About

Remapper for the Bluetooth (Eraser) Button of the Surface Pen (Work in Progress).

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Rust 100.0%