From 942d758731f9458e160f0abe2c7aae84286facff Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Thu, 1 Jan 2015 22:03:44 +0100 Subject: [PATCH] input: use an arithmetic expression for better documentation --- bin/input-event | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/bin/input-event b/bin/input-event index 459f4d1..47c9444 100755 --- a/bin/input-event +++ b/bin/input-event @@ -51,7 +51,17 @@ case "$use,$(uname -n),$name" in # The following is 60% 0 0 0 40% 60% 0 0 # The logic is explained here: # http://who-t.blogspot.de/2013/12/lenovo-t440-touchpad-button.html - xinput set-prop $device 'Synaptics Soft Button Areas' 3656 0 0 0 2928 3656 0 0 + xstart=1472 + xend=5112 + xinput set-prop $device 'Synaptics Soft Button Areas' \ + $(( ($xend - $xstart) * 60 / 100 + $xstart )) \ + 0 \ + 0 \ + 0 \ + $(( ($xend - $xstart) * 40 / 100 + $xstart )) \ + $(( ($xend - $xstart) * 60 / 100 + $xstart )) \ + 0 \ + 0 xinput set-prop $device 'Synaptics Off' 1 ;; XISlavePointer,zoro,"ELAN Touchscreen")