aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlaster4385 <[email protected]>2026-11-22 12:54:16 +0530
committerBlaster4385 <[email protected]>2026-11-22 13:56:46 +0530
commit4ef0fee95ddec404aee2bacae5f0b7b937fbc313 (patch)
treec3d6c407b8662b51fe29754c58bd61bad0f63aa2
parent03004a812c0662111595797fb1a8530128d9cc91 (diff)
document compositor force binding
-rw-r--r--README.md24
1 files changed, 20 insertions, 4 deletions
diff --git a/README.md b/README.md
index c6f95d4..010d8e0 100644
--- a/README.md
+++ b/README.md
@@ -17,10 +17,12 @@ When `force_click` is on, the driver takes over clicking with feature report
- `165` adds the second stage, `125` drops back to the normal click
- transitions need to hold for 15 ms
-The normal click is `BTN_MOUSE` / `BTN_LEFT`. The second stage adds
-`BTN_TRIGGER_HAPPY1`, with `MSC_RAW` values `1`, `2`, and `0` for click, force,
-and release. Firmware clicks are ignored only while host-click mode is active;
-the force key is still emitted if that setup fails.
+The normal click is `BTN_MOUSE` / `BTN_LEFT`. The second stage emits
+`BTN_TRIGGER_HAPPY1` on a small `Apple Force Touch Button` input device; the
+touchpad keeps the `MSC_RAW` values `1`, `2`, and `0` for click, force, and
+release. libinput drops unknown buttons on touchpad devices, so compositors see
+the force stage from the separate device. The force key is still emitted if
+host-click setup fails.
The haptic tick fires on a fresh contact and is rate-limited to 120 ms. It uses
output report `0x53`, with no trailing release report. On USB-C trackpads the
@@ -30,6 +32,20 @@ output report.
`INPUT_PROP_BUTTONPAD` is left as-is. `INPUT_PROP_PRESSUREPAD` is not set,
because the pressure axis is not useful for libinput touch detection.
+## Compositors
+
+Bind the force stage to `mouse:704`. In Hyprland that is a normal mouse bind:
+
+```lua
+hl.bind("mouse:704", hl.dsp.exec_cmd("notify-send 'force-touch'"))
+```
+
+KWin may report the same button as `ExtraButton24`, depending on the version.
+
+To check the raw event, pick `Apple Force Touch Button` in `sudo evtest`. The
+force device is separate from the touchpad because libinput ignores buttons it
+does not know about on clickpad devices.
+
## Build
The Makefile uses whatever kernel build tree you point it at. It reads