summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2020-03-30 14:43:56 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2020-03-30 14:45:19 +1000
commit101cbe16c3f54b129dc6ac49305705c168196bf3 (patch)
tree98f23d05a5d07ae9ebf54a4d080232af7bd54f1f /tools
parentef5204fda7a0b2a3205b063ea70ad1859e42a339 (diff)
downloadlibinput-101cbe16c3f54b129dc6ac49305705c168196bf3.tar.gz
tools: make the thumb threshold configurable while measuring pressure
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'tools')
-rw-r--r--tools/libinput-measure-touchpad-pressure.man5
-rwxr-xr-xtools/libinput-measure-touchpad-pressure.py7
2 files changed, 12 insertions, 0 deletions
diff --git a/tools/libinput-measure-touchpad-pressure.man b/tools/libinput-measure-touchpad-pressure.man
index f985b87b..5983e28e 100644
--- a/tools/libinput-measure-touchpad-pressure.man
+++ b/tools/libinput-measure-touchpad-pressure.man
@@ -53,6 +53,11 @@ device-specific pressure values and it is required that
Assume a palm threshold of
.I N.
The threshold has to be in device-specific pressure values.
+.TP 8
+.B \-\-thumb\-threshold=\fIN\fR
+Assume a thumb threshold of
+.I N.
+The threshold has to be in device-specific pressure values.
.PP
If the touch-thresholds or the palm-threshold are not provided,
this tool uses the thresholds provided by the device quirks (if any) or the
diff --git a/tools/libinput-measure-touchpad-pressure.py b/tools/libinput-measure-touchpad-pressure.py
index a6cabe02..a55bad0c 100755
--- a/tools/libinput-measure-touchpad-pressure.py
+++ b/tools/libinput-measure-touchpad-pressure.py
@@ -346,6 +346,10 @@ def main(args):
'--palm-threshold', metavar='t', type=int,
help='Threshold when a touch is a palm'
)
+ parser.add_argument(
+ '--thumb-threshold', metavar='t', type=int,
+ help='Threshold when a touch is a thumb'
+ )
args = parser.parse_args()
try:
@@ -357,6 +361,9 @@ def main(args):
if args.palm_threshold is not None:
device.palm = args.palm_threshold
+ if args.thumb_threshold is not None:
+ device.thumb = args.thumb_threshold
+
loop(device)
except KeyboardInterrupt:
print('\r\033[2K{}'.format(fmt.separator()))