2016-03-15 36 views
1

我使用羅技的Trackman大理石鼠標。 http://support.logitech.com/en_us/product/trackman-marble如何使用Autohotkey捕獲Logitech trackman特殊按鈕?

這是一個偉大的鼠標,但缺乏滾動輪。儘管如此,這是相當不錯的鼠標。

我想捕獲此鼠標上的特殊按鈕。

以下工程適用於所有其他鼠標,但不適用於ror Trackman ... ;並非真正幫助TrackMan Marble。

XButton1 :: WheelDown

XButton2 :: WheelUp

我試圖捕捉鼠標點擊針對使用 「鑰匙歷史和腳本信息」,但沒有給出任何特殊按鈕..

還有什麼可以做的嗎?

感謝

普拉

回答

1
$XButton1:: 
    Loop { 
     if not GetKeyState("XButton1", "P") { 
      break 
     } 
     Send {WheelDown} 
     Sleep, 100 
    } 
return 

$XButton2:: 
    Loop { 
     if not GetKeyState("XButton2", "P") { 
      break 
     } 
     Send {WheelUp} 
     Sleep, 100 
    } 
return 

測試和Windows 10下爲我工作了。在Windows 7和8上也一直使用它。

您可能想要修改睡眠毫秒時間以適應您的口味。

乾杯。

0

如果您在使用Ubuntu,你可以創建或再打開/usr/share/X11/50-marblemouse.conf具有以下配置填寫:

Section "InputClass" 
Identifier  "Marble Mouse" 
MatchProduct "Logitech USB Trackball" 
MatchIsPointer "on" 
MatchDevicePath "/dev/input/event*" 
Driver   "evdev" 
Option   "SendCoreEvents" "true" 

# Physical buttons come from the mouse as: 
#  Big: 1 3 
#  Small: 8 9 
# 
# This makes left small button (8) into the middle, and puts 
# scrolling on the right small button (9). 
# 
# comment as hand not comfort 
#Option "Buttons"   "9" 
#Option "ButtonMapping"  "1 8 3 4 5 6 7 2 9" 
#Option "EmulateWheel"  "true" 
#Option "EmulateWheelButton" "9" 
# reverse above small buttons(not as expected) 
Option "Buttons"   "8" 
Option "ButtonMapping"  "1 9 3 4 5 6 7 2 8" 
Option "EmulateWheel"  "true" 
Option "EmulateWheelButton" "8" 

Option "YAxisMapping"  "4 5" 
Option "XAxisMapping"  "6 7" 


# left hand 
#Option "Buttons"   "9" 
#Option "ButtonMapping"  "3 8 1 4 5 6 7 2 9" 
#Option "EmulateWheel"  "true" 
#Option "EmulateWheelButton" "9" 

#Option "YAxisMapping"  "4 5" 
#Option "XAxisMapping"  "6 7" 
EndSection 

更多詳細信息,您可以參考https://help.ubuntu.com/community/Logitech_Marblemouse_USB