Enabling tap to click on i3wm involves identifying your touchpad device and its tapping property, then setting this property to active upon i3 startup.
Tap to click significantly enhances touchpad usability by allowing a single tap to register as a left mouse click, eliminating the need to physically press the touchpad button. For users of i3wm, a tiling window manager, this functionality is configured using the xinput
utility and integrated into your i3 configuration file for persistence.
Step-by-Step Guide to Enable Tap to Click
This guide will walk you through finding your touchpad's settings and integrating the tap-to-click functionality into your i3wm setup.
1. Identify Your Touchpad Device
First, you need to find the specific identifier for your touchpad. Open a terminal and run the following command:
xinput list
This command will output a list of all input devices connected to your system. Look for an entry that clearly identifies your touchpad. Common names include "Touchpad", "Synaptics TouchPad", "ELAN Touchpad", or similar. Note down the id=
value associated with your touchpad.
Example Output:
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ ELAN0637:00 04F3:30D6 Touchpad id=14 [slave pointer (2)]
⎜ ↳ Logitech USB Receiver id=10 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
...
In this example, the touchpad is ELAN0637:00 04F3:30D6 Touchpad
with id=14
. You will use this ID in the next steps.
2. Find the "Tapping Enabled" Property ID
Once you have your touchpad's device ID, you need to find the specific property that controls "tap to click," often labeled "Tapping Enabled." Use the xinput list-props
command with your device ID:
xinput list-props <your_device_id>
Replace <your_device_id>
with the ID you found in the previous step (e.g., xinput list-props 14
).
Example Output (excerpt):
Device 'ELAN0637:00 04F3:30D6 Touchpad':
Device Enabled (160): 1
Coordinate Transformation Matrix (162): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Libinput Tapping Enabled (305): 0
Libinput Tapping Enabled Default (306): 0
Libinput Tapping Drag Enabled (307): 1
Libinput Tapping Drag Enabled Default (308): 1
Libinput Tapping Drag Lock Enabled (309): 0
...
Look for a property named "Tapping Enabled" or "Libinput Tapping Enabled". Note the numerical ID in parentheses next to it. In the example above, Libinput Tapping Enabled
has the property ID 305
. The value 0
indicates it's currently disabled.
3. Test Enabling Tap to Click Temporarily
Before making the change permanent, you can test if enabling tap to click works. Use the xinput set-prop
command:
xinput set-prop <your_device_id> <your_property_id> 1
Replace <your_device_id>
and <your_property_id>
with the values you found (e.g., xinput set-prop 14 305 1
).
After executing this command, try tapping your touchpad. It should now register as a click. This change is temporary and will revert if you restart your X session or reboot your computer.
4. Make Tap to Click Persistent in i3wm
To ensure tap to click is enabled every time you start i3wm, you need to add the xinput set-prop
command to your i3 configuration file.
-
Open your i3 configuration file:
The default location is~/.config/i3/config
. You can edit it with your preferred text editor (e.g.,nvim
,vim
,nano
):nvim ~/.config/i3/config
-
Add the
exec
command:
Scroll to a section in your config where you define other startup commands (often at the end or in a dedicated "startup" section). Add the following line, replacing the placeholders with your device and property IDs:# Enable tap to click for touchpad exec --no-startup-id xinput set-prop <your_device_id> <your_property_id> 1
Using the example IDs:
exec --no-startup-id xinput set-prop 14 305 1
The
--no-startup-id
flag prevents i3 from treating this command as a graphical application that needs a startup notification. -
Save and Reload i3:
Save the changes to your~/.config/i3/config
file. Then, reload your i3 configuration to apply the changes without restarting your entire session. The default keybinding for this is typically$mod+Shift+r
(where$mod
is usually the Alt or Windows key).After reloading, tap to click should be permanently enabled.
By following these steps, you will successfully enable tap to click, enhancing your navigation experience on i3wm.