Main Page | 最近更改 | 編輯本頁 | 頁面歷史

可列印版 | 免責聲明 | 隱私政策

未登入
登入 | 幫助
 

MouseSetup

出自DebianWiki

目錄

[編輯] PS/2 Mouse

[編輯] PS/2 Mouse in XFree86:

首先,先將/etc/X11/XF86Config-4中的InputDevice部份改動如下

Section "InputDevice"
        Identifier      "Configured Mouse"
        Driver          "mouse"
        Option          "CorePointer"
        Option          "Device"                "/dev/psaux"
        Option          "Protocol"              "ImPS/2"
        Option          "Emulate3Buttons"       "false"
        Option          "ZAxisMapping"          "4 5"
        Option          "Buttons"               "5"
        #Option          "Resolution"            "4000"
        #Option          "SampleRate"            "60"
        #Option          "BaudRate"              "1200"
EndSection

"#"符號表示註解。

"Device" 表示你的滑鼠在哪個位置,/dev/psaux表示在PS/2連接埠,/dev/mouse表示是gpm的連結(gpm參見下節),/dev/input/mice表示是USB連接埠。

"Protocol"表示你滑鼠的通訊協定。

"Buttons"表示你滑鼠總共的按鈕(滾輪表示中鍵,上滾,下滾共三鍵),左鍵(1)+右鍵(1)+中鍵及滾輪(3)=5(如我的的Genius NetScroll Optical在左腹還有兩個按鈕,所以還要再加2。)。

"ZaxisMapping"表示上滾輪及下滾輪對映的按鈕,通常是4和5。若無滾輪則將它註解掉即可。

"Resolution"一欄表示滑鼠的靈敏度,如果進入X後覺得滑鼠速度太快或太慢,就改動此欄數值即可。

"SampleRate"及"BaudRate"一般不用設定。這兒所設的是Genius的FAQ網頁上推薦的設定。

接下來是困擾我個人許久的設定:

Section "ServerLayout"
        Identifier      "Default Layout"
        Screen          "Default Screen"
        InputDevice     "Generic Keyboard"
        InputDevice     "Configured Mouse"
        #InputDevice    "Generic Mouse"
EndSection

請註解掉 InputDevice "Generic Mouse" 這一行。

因為若設定此行,表示X抓兩次滑鼠,一次是抓"Configured Mouse",一次是抓"Generic Mouse",會造成許多應用程式異常-比如firefox常常中鍵不聽使喚,滾輪一滾就滾過頭…等等。解決方案就是讓X只去抓一次滑鼠就好,也就是你在前一段"Configured"過的"Configured Mouse"。

[編輯] gpm 設定

有時在Console下也會想用滑鼠剪剪貼貼,這時就要用到gpm了。

請用root帳號下達:

#apt-get install gpm
#gpmconfig

下達gpmconfig後設定畫面如下:

Configuring gpm (mouse event server):

Current configuration: -m /dev/psaux -t imps2
Device: /dev/psaux
Type: imps2
Do you want to change anything (Y/n)? 
Where is your mouse [/dev/psaux]? 
> 
What type is your mouse (or help) [imps2]? 
> 
Set the responsiveness (normally not needed) []? 
> 
Repeat protocol (enter 'none' to turn repeating off) []? 
> 
Do you want to add any additional arguments []? 
> 
Do you want to test this configuration (y/N)? 

Current configuration: -m /dev/psaux -t imps2
Device: /dev/psaux
Type: imps2
Do you want to change anything (Y/n)? n
Stopping mouse interface server: gpm.
Starting mouse interface server: gpm.

設定好gpm後(一般是imps2或auto, repeater 設定成raw),改動/etc/X11/XF86Config-4如下:

Section "InputDevice"
...
Device "/dev/mouse"
...
EndSection

如果你使用ls -l /dev/mouse 看,會發現/dev/mouse 其實是指到/dev/gpmdata。

[編輯] USB Mouse

[編輯] 在 console mode 下使用 usb mouse

  1. 先確定 kernel 有支援及載入 usb module.
  2. 安裝 hotplug ( apt-get install hotplug ) 自動偵測 usb device, 且 usb mouse 會被放在 /dev/input/mice .
  3. 安裝 gpm ( apt-get install gpm ), usb mouse type 為 imps2

[編輯] X 下的 USB mouse

參見USBMouse

[編輯] 滑鼠滾輪細項設定

請參見 MouseWheel

[編輯] 參考資料

如有參考資料請不吝修改

取自"http://wiki.debian.org.tw/index.php/MouseSetup"

本頁面已經被瀏覽8,791次。 這頁的最後修訂在 2004年12月16日 (星期四) 22:33。 本站的全部文本內容在GNU Free Documentation License 1.2之條款下提供。


[Main Page]
Main Page
社區
近期活動
最近更改
隨機頁面
幫助
贊助

編輯本頁
討論本頁
頁面歷史
鏈入頁面
鏈出更改

特殊頁面
錯誤報告