web-dev-qa-db-ja.com

マウスポインターの動きが速すぎる、xinputは一時的に問題を解決する

すべてのUbuntuシステムで、マウスポインターの速度を最も遅く設定しますが、それでも速すぎます。 (今はUbuntu 16.04を使用しています。)いくつかの調査を行ったところ、このコマンドで問題が解決することがわかりました。

xinput --set-prop "Logitech USB Laser Mouse" "Device Accel Constant Deceleration" 1.75

しかし、マウスを取り外して再び接続すると、その速度はシステムの設定に戻ります。そのため、このコマンドを常に実行する必要があります。私は何をすべきか?

2
Graduate

1 /ショートバージョン:(Ubuntu 16.04でチェック)

$ -HOMEディレクトリの。xinputrcファイルを更新し、xinputコマンドを(1行ずつ)入れます。セッションを開くたびに読み取られます。存在しない場合は、作成します:(im-configによって生成されたはずです)

私の :

# im-config(8) generated on Wed, 15 Feb 2017 19:29:43 +0100
run_im ibus
# im-config signature: 90bece1e5f840b27085989abd900276a  -

#BYME# Put your xinput commands here
#BYME#With DRI2 : Device Accel Constant Deceleration (267)
xinput --set-prop 11 267 2
#BYME#With DRI3 : Device Accel Constant Deceleration (264)
xinput --set-prop 11 264 2

この.xinputrcは両方の場合に機能します(DRI3が有効になっているかどうか)

ちなみに、私は複数の画面(4Kと昔ながらの16:9画面を混合)を使用しており、Device Accel Constant Deceleration2に設定するだけで快適だと感じています。この(または他の)値を自由に変更してください。

2 /間違った方法:

(しないでください).bashrcまたは別のプロファイル固有のファイルに追加します(これは何度も読むことができ、実際にマウスの動作が実際に適用されているものの誤解につながる可能性があります)

3 /ロングバージョン:(xinputコマンドをサポートするディストリビューションでの作業)

使用するオプションを決定するには:

$ xinput --list --short

Ubuntuホスト(KVMを使用してコンピューターを切り替える)では、以下が返されます。

Virtual core pointer                        id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ No brand Combo Free KVM                   id=11   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ Sleep Button                              id=9    [slave  keyboard (3)]
    ↳ No brand Combo Free KVM                   id=10   [slave  keyboard (3)]

したがって、文字列をいじる(および入力中にエラーを起こす)のではなく、(短い)数値識別子を使用することを好みます(文字列とその意味を見つける方法がわかりました)。

私の場合、私のマウスはVirtual core pointerの下にあり、No brand Combo Free KVMとして識別され、数値識別子11が付けられています。前に説明したように、対応する文字列の代わりにこの数値識別子を使用しますが、必要に応じて実行できます(両方とも)。

マウスで使用できるプロパティ/機能を知るには、次のように入力する必要があります:(前のコマンドの結果にこのコマンドを適用、独自の識別子は異なる必要があります)

$ xinput --list-props 11

Device 'No brand Combo Free KVM':
    Device Enabled (136):   1
    Coordinate Transformation Matrix (138): 1.000000, 0.000000, 0.000000, 0.000000, 
1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    Device Accel Profile (266): 0
    Device Accel Constant Deceleration (267):   1.000000
    Device Accel Adaptive Deceleration (268):   1.000000
    Device Accel Velocity Scaling (269):    10.000000
    Device Product ID (257):    4309, 20480
    Device Node (258):  "/dev/input/event16"
    Evdev Axis Inversion (270): 0, 0
    Evdev Axes Swap (272):  0
    Axis Labels (273):  "Rel X" (146), "Rel Y" (147), "Rel Horiz Wheel" (264), "
Rel Vert Wheel" (265)
    Button Labels (274):    "Button Left" (139), "Button Middle" (140), "Button Righ
t" (141), "Button Wheel Up" (142), "Button Wheel Down" (143), "Button Horiz Wheel Left" 
(144), "Button Horiz Wheel Right" (145), "Button Side" (262), "Button Extra" (263), "But
ton Unknown" (260), "Button Unknown" (260), "Button Unknown" (260), "Button Unknown" (26
0)
    Evdev Scrolling Distance (275): 1, 1, 1
    Evdev Middle Button Emulation (276):    0
    Evdev Middle Button Timeout (277):  50
    Evdev Third Button Emulation (278): 0
    Evdev Third Button Emulation Timeout (279): 1000
    Evdev Third Button Emulation Button (280):  3
    Evdev Third Button Emulation Threshold (281):   20
    Evdev Wheel Emulation (282):    0
    Evdev Wheel Emulation Axes (283):   0, 0, 4, 5
    Evdev Wheel Emulation Inertia (284):    10
    Evdev Wheel Emulation Timeout (285):    200
    Evdev Wheel Emulation Button (286): 4
    Evdev Drag Lock Buttons (287):  0

これにより、どのプロパティを変更する必要があるかを特定できます。

Accel Constant Deceleration(数値識別子:267)は私にとって非常にうまく機能しています。他のプロパティを自由に「再生」して、自分のマウスに適した動作を見つけてください。

そのため、次の行を。xinputrcに追加し、値を1.000000から2に変更しました(フロートを指定する必要はありません)減速を増やすとマウスの速度が遅くなります)

xinput --set-prop 11 267 2

4 /警告:DRI3をアクティブにした場合、この識別子は変更される可能性があります

DRI2のみ、デフォルトではUbuntu 16.04の下で(ただし、スムーズなマルチウィンドウをサポートするためにDRI3を必要とするChromeの最新バージョンのように問題を引き起こす可能性があります)

DRI3を有効にしている場合、識別子は次のようになります。

Device 'No brand Combo Free KVM':
    Device Enabled (133):   1
    Coordinate Transformation Matrix (135): 1.000000, 0.000000, 0.000000, 0.000000, 
1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    Device Accel Profile (263): 0
    Device Accel Constant Deceleration (264):   1.000000
    Device Accel Adaptive Deceleration (265):   1.000000
    Device Accel Velocity Scaling (266):    10.000000
    Device Product ID (254):    4309, 20480
    Device Node (255):  "/dev/input/event9"
    Evdev Axis Inversion (267): 0, 0
    Evdev Axes Swap (269):  0
    Axis Labels (270):  "Rel X" (143), "Rel Y" (144), "Rel Horiz Wheel" (261), "
Rel Vert Wheel" (262)
    Button Labels (271):    "Button Left" (136), "Button Middle" (137), "Button Righ
t" (138), "Button Wheel Up" (139), "Button Wheel Down" (140), "Button Horiz Wheel Left" 
(141), "Button Horiz Wheel Right" (142), "Button Side" (259), "Button Extra" (260), "But
ton Unknown" (257), "Button Unknown" (257), "Button Unknown" (257), "Button Unknown" (25
7)
    Evdev Scrolling Distance (272): 1, 1, 1
    Evdev Middle Button Emulation (273):    0
    Evdev Middle Button Timeout (274):  50
    Evdev Third Button Emulation (275): 0
    Evdev Third Button Emulation Timeout (276): 1000
    Evdev Third Button Emulation Button (277):  3
    Evdev Third Button Emulation Threshold (278):   20
    Evdev Wheel Emulation (279):    0
    Evdev Wheel Emulation Axes (280):   0, 0, 4, 5
    Evdev Wheel Emulation Inertia (281):    10
    Evdev Wheel Emulation Timeout (282):    200
    Evdev Wheel Emulation Button (283): 4
    Evdev Drag Lock Buttons (284):  0

Accel Constant Deceleration264で識別されるようになりました。 。xinputrcにも(DRI3が有効かどうかに関係なく同じ動作をする)を追加した理由です。

xinput --set-prop 11 264 2

それがあなたを助けることを願っています。

2