libinput: Add tappingButtonMap option (#189612)

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
David Morgan
2022-10-03 21:13:43 +02:00
committed by GitHub
co-authored by Sandro
parent 0c8ac7b519
commit bd62717fd3
@@ -156,6 +156,14 @@ let cfg = config.services.xserver.libinput;
'';
};
tappingButtonMap = mkOption {
type = types.nullOr (types.enum [ "lrm" "lmr" ]);
default = null;
description = lib.mdDoc ''
Set the button mapping for 1/2/3-finger taps to left/right/middle or left/middle/right, respectively.
'';
};
tappingDragLock = mkOption {
type = types.bool;
default = true;
@@ -220,6 +228,7 @@ let cfg = config.services.xserver.libinput;
Option "HorizontalScrolling" "${xorgBool cfg.${deviceType}.horizontalScrolling}"
Option "SendEventsMode" "${cfg.${deviceType}.sendEventsMode}"
Option "Tapping" "${xorgBool cfg.${deviceType}.tapping}"
${optionalString (cfg.${deviceType}.tappingButtonMap != null) ''Option "TappingButtonMap" "${cfg.${deviceType}.tappingButtonMap}"''}
Option "TappingDragLock" "${xorgBool cfg.${deviceType}.tappingDragLock}"
Option "DisableWhileTyping" "${xorgBool cfg.${deviceType}.disableWhileTyping}"
${cfg.${deviceType}.additionalOptions}
@@ -241,6 +250,7 @@ in {
"horizontalScrolling"
"sendEventsMode"
"tapping"
"tappingButtonMap"
"tappingDragLock"
"transformationMatrix"
"disableWhileTyping"