# 滑鼠設定 [toc] ## 使用 xinput 進行滑鼠設定 :::success xinput list | grep -E "slave.*pointer" | grep -v XTEST | sed -e 's/^.*id=//' -e 's/\s.*$//' ::: 在此系統內 會找出idnum值為11 使用xinput找出滑鼠的特定ID值 xinput get-button-map {idnum} 設定滑鼠鍵盤對應的ID值 xinput set-button-map {idnum} {order} ## 設定/etc/xorg.conf :::success Option "Buttons" "9" Option "ZAxisMapping" "4 5" Option "YAxisMappting" "6 7" Option "ButtonMapping" "1 2 3 4 5 6 7 8 9" ::: 其中關於滑鼠的鍵盤定義為 :::success leftclick = 1 middle click = 2 rightclick = 3 wheelup = 4 wheeldown = 5 wheelleft = 6 wheelright = 7 leftalt = 8 rightalt = 9 ::: ## 使用xinput得到device資訊 :::success xinput get-feedbacks <device name> xinput set-ptr-feedback <device name> <threshold> <num> <denom> xinput set-integer-feedback <device name> <feedback id> <value> xinput get-button-map <device name> xinput set-button-map <device name> <map button 1> [<map button 2> [...]] xinput set-pointer <device name> [<x index> <y index>] xinput set-mode <device name> ABSOLUTE|RELATIVE xinput list [--short || --long || --name-only || --id-only] [<device name>...] xinput query-state <device name> xinput test [-proximity] <device name> xinput create-master <id> [<sendCore (dflt:1)>] [<enable (dflt:1)>] xinput remove-master <id> [Floating|AttachToMaster (dflt:Floating)] [<returnPointer>] [<returnKeyboard>] xinput reattach <id> <master> xinput float <id> xinput set-cp <window> <device> xinput test-xi2 [--root] <device> xinput map-to-output <device> <output name> xinput list-props <device> [<device> ...] xinput set-int-prop <device> <property> <format (8, 16, 32)> <val> [<val> ...] xinput set-float-prop <device> <property> <val> [<val> ...] xinput set-atom-prop <device> <property> <val> [<val> ...] xinput watch-props <device> xinput delete-prop <device> <property> xinput set-prop <device> [--type=atom|float|int] [--format=8|16|32] <property> <val> [<val> ...] xinput disable <device> xinput enable <device> ::: ## 安裝xf86-input-libinput sudo libinput list-devices找出與滑鼠相關的設定 :::success Device: PixArt Lenovo USB Optical Mouse Kernel: /dev/input/event5 Nat.scrolling: disabled <=找出跟natural scroll相關 ::: ## 使用xinput 列出滑鼠相關的設定值 :::success [josh@archlinux ~]$ xinput list-props 11 Device 'PixArt Lenovo USB Optical Mouse': Device Enabled (153): 1 libinput Natural Scrolling Enabled (281): 1 libinput Natural Scrolling Enabled Default (282): 0 libinput Scroll Methods Available (283): 0, 0, 1 libinput Scroll Method Enabled (284): 0, 0, 0 ::: ## 使用set-prop設定滑鼠的scroll 變成mac自然捲動方式 :::success xinput set-prop 11 281 1 <= 運行自然捲動 xinput set-prop 11 282 1 <= 啟動自然捲動 寫入在.xinitrc啟動檔中 echo 'xinput set-prop 11 281 1'>>.xinitrc :::
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up