xorgファイルを使用したタッチパッドのボタンマッピングの設定

xorgファイルを使用したタッチパッドのボタンマッピングの設定

2本の指タブが中央クリックし、3本指タブが右クリックになるようにタッチパッド(Linux Mint 16 MATEバージョンのeee-pc)マッピングを変更したいと思います。

これを行うには、ButtonMapping次のオプションを追加しました/usr/share/X11/xorg.conf.d/50-synaptics.conf

Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"
# This option is recommend on all Linux systems using evdev, but cannot be
# enabled by default. See the following link for details:
# http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
      MatchDevicePath "/dev/input/event*"
        Option "ButtonMapping" "1 3 2 4 5"
EndSection

しかし、役に立たない。

このコマンドは機能しますが、リセット時に失われます(そして私が試した他の初期化スクリプトでは機能しませんxinput)。~/.xinitrc

xinput set-button-map "ETPS/2 Elantech Touchpad" 1 3 2 4 5

修正する:xclipは物理キーも変更するので、実際に私が望むものではありません。ただし、MATE起動アプリケーションでは機能します。以下はそうではありませんが、手動で実行するときに必要なタスクを実行します。

#!/bin/sh
synclient TapButton2=2
synclient TapButton3=3

ベストアンサー1

アイデア#1 - GNOMEセッション属性

この問題をどのように解決するかによって、「動作」する必要がある1つの方法を考えることができます。ログイン時に実行されるアプリケーションを作成し、この特定のコマンドを実行するリストにシェルスクリプトを追加します。ログインするたびに強制的に実行されます。

#!/bin/bash

xinput set-button-map "ETPS/2 Elantech Touchpad" 1 3 2 4 5

次に、このスクリプトをGNOMEの[Launch Application Preferences]ダイアログボックスに追加します。

$ gnome-session-properties

                       SS#1

このダイアログボックスにエントリを追加した後、ログイン中に実行することを選択したことを確認してください。

アイデア#2 - 50-synaptics.confにオプションを追加

Synaptic タッチパッドを扱っているので、「Xorg.conf.d」ディレクトリに以下を追加できます。これはsynapticマニュアルページからのものです。これは追加できるルールのサンプルですInputDevice

   Section "InputDevice"
     Identifier "devname"
     Driver "synaptics"
     Option "Device"   "devpath"
     Option "Path"     "path"
     ...
   EndSection

マニュアルページでは、利用可能な次のオプションも提供しています。

   Option "TapButton2" "integer"
          Which mouse button is reported on a non-corner two-finger tap.  Set 
          to 0 to disable. Property: "Synaptics Tap Action"

   Option "TapButton3" "integer"
          Which mouse button is reported on a non-corner three-finger tap.  
          Set to 0 to disable. Property: "Synaptics Tap Action"

したがって、これらを1つにまとめると、ファイルとして次のことができます/usr/share/X11/xorg.conf.d/50-synaptics.conf。 ::

Section "InputClass"
        Identifier "Switch key mappings"
        MatchDriver "synaptic"
        Option "TapButton2" "2"
        Option "TapButton3" "3"
EndSection

また、私はこのセクションを独自のファイルに追加すると思います/etc/X11/xorg.conf.d/50-synaptics.conf。このディレクトリは、他のカスタム設定を上書きまたは追加するために使用されます。これにより、システムアップデートを実行するときに以下のファイルをタッチしても/usr/share/X11変更は影響を受けません。

おすすめ記事