Remapper from key to click only while tapping the touchpad.
Implemented as Fusuma Plugin.
ThumbSense is a tool that lets you control a laptop's touchpad using the keyboard. It assigns certain keyboard keys as mouse buttons and switches between acting as mouse buttons or normal keyboard keys based on whether the user's thumb is touching the touchpad. ThumbSense aims to make it easier to use the touchpad without moving your hand away from the keyboard.
- fusuma 2.0 or later
- fusuma-plugin-keypress 0.5 or later (automatically installed)
- fusuma-plugin-remap (udev rules setup required)
- Install the necessary packages for native extensions:
$ sudo apt install ruby-dev build-essential
- Install the required library for building fusuma-plugin-remap:
$ sudo apt install libevdev-dev
- Set up udev rules to create a virtual input device (for fusuma-plugin-remap):
$ echo 'KERNEL=="uinput", MODE="0660", GROUP="input", OPTIONS+="static_node=uinput"' | sudo tee /etc/udev/rules.d/60-udev-fusuma-remap.rules
$ sudo udevadm control --reload-rules && sudo udevadm trigger
- Install fusuma-plugin-thumbsense:
$ sudo gem install fusuma-plugin-thumbsense
To add the thumbsense context
, edit ~/.config/fusuma/config.yml
.
The context
section is separated by ---
and specified as context: thumbsense
.
Fusuma will switch to the thumbsense
context while tapping the touchpad.
You can remap keys to mouse buttons while tapping the touchpad.
The remap
property is configured within the thumbsense
context.
Available mouse buttons include:
BTN_LEFT
BTN_MIDDLE
BTN_RIGHT
BTN_SIDE
BTN_EXTRA
BTN_FORWARD
BTN_BACK
BTN_TASK
BTN_0
BTN_1
- ...
BTN_9
Add the following code to ~/.config/fusuma/config.yml
:
# Add thumbsense context
---
context: thumbsense
remap:
F: BTN_LEFT
E: BTN_MIDDLE
D: BTN_RIGHT
SPACE: BTN_LEFT
J: BTN_LEFT
K: BTN_RIGHT
Fusuma::Plugin::Thumbsense provides experimental support for pointing stick devices. This functionality is currently limited to the HHKB Studio and utilizes HIDRAW. Please note that this feature is still in testing, and improvements may be made in future updates.
see: #4
To use the pointing stick touch support, you need to set up the following Udev rules to ensure that the HHKB Studio device is correctly recognized:
-
Create the Udev Rule File: Create a Udev rule file with the following command:
sudo nano /etc/udev/rules.d/60-udev-fusuma-thumbsense-hhkb-studio.rules
Add the following content to the file:
# HHKB Studio (USB) KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="04fe", ATTRS{idProduct}=="0016", MODE="0666" # HHKB Studio (Bluetooth) KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ENV{DEVPATH}=="/devices/virtual/misc/uhid/*:04FE:0016.*/hidraw*", MODE="0666"
-
Reload the Udev Rules: Execute the following command to reload the Udev rules:
sudo udevadm control --reload-rules && sudo udevadm trigger
-
ThumbSense
- Change remap layer while tapping
- Enable executing commands like
command:
andsendkey:
- Support pointing stick devices(#4)
- Now only HHKB Studio is supported using HIDRAW
-
Remap
- Remap to single key (e.g.,
remap: { J: BTN_LEFT }
) - Send mouse clicks with
remap: { I: BTN_MIDDLE }
- Remap multiple keys
- Support sending multiple keys with fusuma-plugin-sendkey(iberianpig/fusuma-plugin-sendkey#34)
remap: { T: { sendkey: [LEFTSHIFT+F10, T, ENTER, ESC] } }
- Support sending multiple keys with fusuma-plugin-sendkey(iberianpig/fusuma-plugin-sendkey#34)
- Remap POINTER_MOTION to POINTER_SCROLL_FINGER (e.g.,
remap: { S: POINTER_SCROLL_FINGER }
)
- Remap to single key (e.g.,
Bug reports and pull requests are welcome on GitHub at https://github.com/iberianpig/fusuma-plugin-thumbsense. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the Fusuma::Plugin::Thumbsense project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.