tools: make the thumb threshold configurable while measuring pressure
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 30 Mar 2020 04:43:56 +0000 (14:43 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Mon, 30 Mar 2020 04:45:19 +0000 (14:45 +1000)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
tools/libinput-measure-touchpad-pressure.man
tools/libinput-measure-touchpad-pressure.py

index f985b87b1927baca7dfabac506b02f95542fbdf3..5983e28efcc6581fd699c17488563e933c113e6c 100644 (file)
@@ -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
index a6cabe0228e17c471bf69ec3a1dc3506e9ad9d90..a55bad0cd7bde59abf01f439bedf2870b0e2be38 100755 (executable)
@@ -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()))