[systemd-devel] [PATCH v2 2/4] udev: Update pointingstick rules to allow setting ibm trackpoint sensitivity
Peter Hutterer
peter.hutterer at who-t.net
Mon Apr 6 22:06:13 PDT 2015
On Fri, Apr 03, 2015 at 04:11:58PM +0200, Hans de Goede wrote:
> The IBM / Lenovo trackpoints are special, they allow specifying a sensitivity
s/are special, they//
> setting through a ps/2 command, which changes the range of the deltas send when
s/send/sent/
> using the trackpoint. One some models with normal usage one only deltas
s/One/On/, the second "one" is superfluous
> of 1 or 2 are send, resulting in there only being 2 mouse cursor movement
> speeds, rather then the expected fluid scale.
s/then/than/
>
> Changing the sensitivity to a higher level then the bootup default fixes this,
s/then/than/
> the rule additions in this commit allows specifying a new sensitivity default
> through hwdb giving a better ootb experience.
> ---
> hwdb/70-pointingstick.hwdb | 11 +++++++++++
> rules/70-pointingstick.rules | 9 +++++++--
> 2 files changed, 18 insertions(+), 2 deletions(-)
>
> diff --git a/hwdb/70-pointingstick.hwdb b/hwdb/70-pointingstick.hwdb
> index a893da6..d92434e 100644
> --- a/hwdb/70-pointingstick.hwdb
> +++ b/hwdb/70-pointingstick.hwdb
> @@ -42,6 +42,7 @@
> #
> # Allowed properties are:
> # POINTINGSTICK_CONST_ACCEL
> +# POINTINGSTICK_SENSITIVITY
> #
> #########################################
> # POINTINGSTICK_CONST_ACCEL #
> @@ -54,6 +55,16 @@
> # by how much to multiply deltas generated by the pointingstick to get
> # normalized deltas.
> #
> +#########################################
> +# POINTINGSTICK_SENSITIVITY #
> +#########################################
> +#
> +# TPPS/2 IBM TrackPoint driver sensitivity sysfs setting
> +# POINTINGSTICK_SENSITIVITY=<sensitivity>
> +#
> +# Where <sensitivity> is a number between 0 and 255, note this property
> +# only applies to TPPS/2 IBM TrackPoint devices.
maybe add a comment here that to the kernel driver file for reference?
> +#
>
> #
> # Sort by by brand, model
> diff --git a/rules/70-pointingstick.rules b/rules/70-pointingstick.rules
> index 5a853f3..15e34a0 100644
> --- a/rules/70-pointingstick.rules
> +++ b/rules/70-pointingstick.rules
> @@ -6,11 +6,16 @@ ENV{ID_INPUT_POINTINGSTICK}=="", GOTO="pointingstick_end"
>
> # skip later rules when we find something for this input device
> IMPORT{builtin}="hwdb --subsystem=input --lookup-prefix=pointingstick:", \
> - GOTO="pointingstick_end"
> + GOTO="pointingstick_apply_settings"
>
> # device matching the input device name and the machine's DMI data
> KERNELS=="input*", \
> IMPORT{builtin}="hwdb 'pointingstick:name:$attr{device/name}:$attr{[dmi/id]modalias}'", \
> - GOTO="pointingstick_end"
> + GOTO="pointingstick_apply_settings"
> +
> +LABEL="pointingstick_apply_settings"
> +
> +TEST=="../../../sensitivity", ENV{POINTINGSTICK_SENSITIVITY}!="", \
> + ATTR{../../../sensitivity}="$env{POINTINGSTICK_SENSITIVITY}"
>
> LABEL="pointingstick_end"
hmm, not the nicest rule but I couldn't find anything simpler. Kay, any idea
how do do this with fewer relative path specs?
Cheers,
Peter
More information about the systemd-devel
mailing list