Touchpad tuning: disable touchpad while typing parameter

Questions about hardware and drivers
Forum rules
Before you post please read this

Touchpad tuning: disable touchpad while typing parameter

Postby AndyNZ on Wed Dec 25, 2013 10:39 pm

Kia ora,

I had the problem that one user was not happy with the default touchpad off while typing time.
Unfortunately is the touchpad off time hard coded in a library.
Compiling the library from source is way more effort than patching the binary.

Here is my solution. (Target group: advanced user/admin - if you not understand what this is about, please ask an advanced user/admin not me)

Code: Select all
#/bin/sh
#
if !( which sfk >/dev/null 2>&1 ) ; then
    echo "No sfk ('Swiss File Knife') installed. Download and install it i.e. in /usr/local/bin/sfk"
    exit 1
else
    echo
    echo "patching hard coded syndaemon parameter"
    echo "======================================="
    echo
    PATCHTARGET='/usr/lib/mate-settings-daemon/libmouse.so'
    #
    if [ -e $PATCHTARGET ] ; then
        # searchstring : 00 s y n d a e m o n  00 - i  00 0 . 5  00 - k  00
        # replacestring: 00 s y n d a e m o n  00 - i  00 1 . 5  00 - K  00
        #                00 73796E6461656D6F6E 00 2D69 00 302E35 00 2D6B 00"
        BINSEAR="0073796E6461656D6F6E002D6900302E35002D6B00"
        BINREPL="0073796E6461656D6F6E002D6900312E35002D4B00"
        echo "patching $PATCHTARGET: 0.5 delay -> 1.5 delay  and  -k -> -K"
        sfk rep $PATCHTARGET -nodump -quiet -binary /$BINSEAR/$BINREPL/ >/dev/null
        if [ $? -eq 1 ] ; then
            cp -a -f $PATCHTARGET /root/libmouse.so.orig
            sfk rep $PATCHTARGET -dump -binary /$BINSEAR/$BINREPL/ -yes
            echo "You have to re-login (or restart) to activate the new settings"
        else
            echo " already patched"
        fi
    fi
fi


The part that can adjusted is here:
BINREPL="0073796E6461656D6F6E002D6900312E35002D4B00"
This is $31 = 1 $2E = . $35 = 5 == 1.5 seconds off time after the last char is typed.

Feel free to play with it and give me some feedback.
cheers
/\ndy
AndyNZ
Level 1
Level 1
 
Posts: 3
Joined: Wed Sep 18, 2013 5:42 pm

Linux Mint is funded by ads and donations.
 

Re: Touchpad tuning: disable touchpad while typing parameter

Postby Monsta on Sat Dec 28, 2013 5:44 am

Nice hack :)
But I'd also file a feature request (asking to make this parameter configurable) on github. Who knows, maybe someday they'll implement it and the hack won't be needed.
Monsta
Level 8
Level 8
 
Posts: 2017
Joined: Fri Aug 19, 2011 3:46 am


Return to Hardware Support

Who is online

Users browsing this forum: No registered users and 2 guests