Linux でトラックポイントを使用するときにタッチパッドを無効にする方法を教えてください。

Linux でトラックポイントを使用するときにタッチパッドを無効にする方法を教えてください。

最近、ラップトップに Ubuntu (およびその派生版である Xubuntu と Kubuntu) をインストールしました。

私のコンピューターには、タッチパッドとトラックポイントの両方があります。Windows では、トラックポイントを使用するとタッチパッドが無効になります。

Linux でこれを再現する方法はありますか?

答え1

私はこの問題の解決策を Google で何度も検索し、自分のシステムに適した解決策を見つけました。

#!/bin/bash
#
#Change /dev/input/event13 to your trackstick event
    cat /dev/input/event13 > /tmp/mousemove &
#initialize counter to prevent garbage file from growing
    i="0";
    while true ; do 
        i=$[$i+1];
        #variables  
        oldchecksum=${newchecksum};
        newchecksum=`md5sum /tmp/mousemove | awk '{print $1}'`
        #see if trackpad is already disabled
        if [ "$trackpad" = "off" ]; then

            #compare previous checksum to current if they're same trackstick is not moving
            if [ "$oldchecksum" = "$newchecksum" ]; then
                #make sure trackpad is enabled
                xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 1;
                trackpad="on";
            fi

        else

            #compare previous checksum to current if they're different trackstick is moving
            if [ "$oldchecksum" != "$newchecksum" ]; then
                #disable trackpad
                xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 0;
                trackpad="off";
            fi

        fi

        #check for count to keep poll file smaller
        if [ "$i" = "300" ]; then
            echo '' > /tmp/mousemove;
            i="0";
            newchecksum=`md5sum /tmp/mousemove | awk '{print $1}'`
        fi
            #sleep for 1 second so we don't eat up resources
            #if the update speed is not fast enough for you a smaller number such as .75 may be better
            sleep 1;
    done

私はarchでfluxboxを実行しているので、スクリプト呼び出しを~/.fluxbox/apps

私が見つけた唯一の注意点は、マウス イベントにアクセスするためにこのスクリプトを root として実行する必要があるため、pkill cat を実行した場合、スクリプトが強制終了されるということです。同時に、スクリプトを強制終了しても cat を強制終了しない場合は、 のスペースがなくなるか/tmp、pkill cat を実行するか、システムを再起動するまでスクリプトは実行され続けます。

答え2

簡単なトリック(実際にはハック)があります:

xinput set-prop "DLL07B0:01 044E:120B" "Synaptics Finger" 100 1000 100

間違った圧力パラメータ(最小 > 最大)と、とんでもない指のサイズを設定します。

Synaptics Finger
    32 bit, 3 values, low, high, press. 

Option "FingerLow" "integer"
    When finger pressure drops below this value, the driver counts it as a release. Property: "Synaptics Finger"

Option "FingerHigh" "integer"
    When finger pressure goes above this value, the driver counts it as a touch. Property: "Synaptics Finger" 

したがって、圧力が 1000 を超え、圧力が 100 未満の場合もドライバーはプレスとしてカウントしますが、これは論理的には不可能です。

関連情報