Trackpad Is Too Damn Big (TITDB) is a utility designed to customize trackpad behavior on Linux. TITDB creates a virtual trackpad device and forwards input events from the selected trackpad device to it while preventing other applications from receiving events from the original trackpad device and modifying the events to achieve the desired functionality. TITDB currently supports virtually reducing trackpad size in two different modes and one additional mode for printing input events without modifying them. TITDB has a very small memory and CPU footprint and is designed to be easily expandable for integrating new functionality in the future.
- Print: Print selected device properties and incoming events from the original device without modifying them.
- Strict: Completely disable designated areas of the trackpad based on specified percentages from the edges.
- Flex: Disable initial trackpad input from designated areas while allowing re-entry from valid areas and recognition of multitouch gestures. This ensures that the entire trackpad area remains usable and gestures are registered correctly without any restrictions.
Because TITDB prevents other applications from receiving events from the original device, applications that specifically monitor the original device will not work as intended while TITDB is running. This can be easily resolved by configuring the applications to monitor the virtual device that TITDB creates instead of the original device.
You can build TITDB with the following commands
git clone https://github.com/tascvh/trackpad-is-too-damn-big.git
cd trackpad-is-too-damn-big
git submodule init
git submodule update
mkdir build
cd build
cmake ..
makesudo titdb -d /dev/input/event0Replace /dev/input/event0 with your trackpad device filename if necessary
TITDB needs to be able to access the input and uinput subsystem to work. To run TITDB without sudo, your user needs to have permissions. To achieve this, take the following steps:
- Make sure the
uinputgroup exists
sudo groupadd --system uinputThe --system flag is needed for systemd.
For other init systems, you may try to create the uinput group without --system. If this does not work, you can delete uinput group with sudo groupdel uinput and recreate the group with the --system flag.
- Add your user to the
inputand theuinputgroup:
sudo usermod -aG input,uinput usernameMake sure that it's effective by running groups. You might have to logout and login.
In some cases a reboot may also be required.
- Make sure the uinput device file has the right permissions:
Add a udev rule (in either
/etc/udev/rules.dor/lib/udev/rules.d) with the following content:
KERNEL=="uinput", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput"You will need to restart udevd via
sudo systemctl restart systemd-udevd.serviceto get the new permissions.
- Make sure the
uinputdrivers are loaded. You will probably have to run this command whenever you start TITDB for the first time.
sudo modprobe uinputCredit: https://github.com/kmonad/kmonad/blob/master/doc/faq.md#linux