
何らかの理由でトラックボールLogitech(別名Logicool)Marble Mouse(別名Trackman Marble)を逆さまに使いたいです。ハードウェアを変更せずにソフトウェアを介して左右のスクロールと上下のスクロールを別々に逆にする方法はありますか?私は/etc/X11/xorg.conf.g/
次の設定ファイルを作成してこれを試しました。
Section "InputClass"
Identifier "Marble Mouse"
MatchProduct "Logitech USB Trackball"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "8"
Option "XAxisMapping" "6 7"
Option "Emulate3Buttons" "true"
Option "ButtonMapping" "1 2 3 5 4 7 6 2 2"
EndSection
重要な部分は4番と5番、6番と7番のキーを変えて次のようにしたということです。
Option "ButtonMapping" "1 2 3 4 5 6 7 2 2"
私は持っています:
Option "ButtonMapping" "1 2 3 5 4 7 6 2 2"
ただし、これは機能せず、スクロールホイールシミュレーションモードでのみ機能できます。逆スクロールする方法は?
答え1
ゲームではこれを「リバースマウス」と呼びます。
Option "InvX" "boolean"
Invert the X axis. Default: off.
Option "InvY" "boolean"
Invert the Y axis. Default: off.
答え2
xinput
次のように使用すると、逆スクロールが可能です。
xinput set-button-map "Logitech USB Trackball" 1 2 3 4 5 6 7 8 9
xinput set-int-prop "Logitech USB Trackball" "Evdev Wheel Emulation Button" 8 8
xinput set-int-prop "Logitech USB Trackball" "Evdev Wheel Emulation" 8 1
xinput set-int-prop "Logitech USB Trackball" "Evdev Wheel Emulation Axes" 8 6 7 4 5
xinput set-int-prop "Logitech USB Trackball" "Evdev Wheel Emulation X Axis" 8 6
xinput set-int-prop "Logitech USB Trackball" "Evdev Drag Lock Buttons" 8 9
答え3
パーティーに遅れましたが、正しい解決策を見つけました。私はKensington Orbitトラックボールを持っているので、それに応じて "sed"文字列を調整してください。
## Invert mouse axels, two button trackball
for id in $(xinput --list | sed -n '/Kensington USB\/PS2 Orbit/s/.*=\([0-9]\+\).*/\1/p')
do
# Shift left-right mousebutton 3 _ 1 disable all other 0 0 0 0
xinput set-button-map $id 3 0 1 0 0 0 0
# Invert mouse axels. see https://wiki.ubuntu.com/X/InputCoordinateTransformation
xinput set-prop $id 'Coordinate Transformation Matrix' -1 0 1 0 -1 1 0 0 1
done