LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 798|回复: 3

我的FreeBSD 5.1鼠标老是搞不定,求助。

[复制链接]
发表于 2004-5-1 09:56:04 | 显示全部楼层 |阅读模式
ps/2 普通滚轮机械鼠,在 linux下用 wheel mouse  或microsoft intellimouse都可以的那种。

在FBSD5.1 下动不了鼠标指针,选了 ps/2鼠标也不行。郁闷。
发表于 2004-5-1 10:31:57 | 显示全部楼层
killall moused
moused -z 4 -p YOU_PORT
发表于 2004-5-1 18:26:34 | 显示全部楼层
在4.8上有,5.1应该也有
file:/usr/share/doc/zh/books/faq/x.html#X-AND-WHEEL


1.4. 我的滑鼠有個很炫的?L輪。我能在 X 裡面使用嗎?


可以。不過你需要設定 X 用戶端程式。 請參考 Colas Nahaboo 的網頁 (http://www.inria.fr/koala/colas/mouse-wheel-scroll/) .


如果你要使用 imwheel 程式, 只要跟著下列步驟作即可。


轉換?L輪 event Translate the Wheel Events


imwheel 程式的運作原理, 是將滑鼠的第四鍵與第五鍵轉換成按鍵 event。因為如此,所以 你必須讓滑鼠驅動程式將滑輪事件轉換成第四鍵與第五鍵 event。 有兩種方法可以達到目的,一是讓 moused(8) 作轉換,二是 讓 X 本身去作 event 轉換。


a.使用 moused(8) ?磙D換?L輪 Event


要讓 moused(8) ?碜 event 轉換,只要在 執行 moused(8) 的命令列中加上 -z 4 即可。舉個例子,如果你一般都是以 moused -p /dev/psm0 ?砥饎 moused(8) 的話,只要改成 moused -p /dev/psm0 -z 4 即可。如果你是在開機過程中利用 /etc/rc.conf ?砥饎 moused(8), 你可以在 /etc/rc.conf 中將 moused_flags 上加 -z 4 即可。


你現在需要讓 X 知道你的滑鼠有五個按鍵,只要在 /etc/XF86Config 中的 ``Pointer'' 區塊中加上 Buttons 5 這一行即可。例如, 你可能在 /etc/XF86Config 中有 以下的 ``Pointer'' 區塊:



Example 11-1. 在 XFree86 3.3.x 系列的 XF86Config 設定檔的 ``Pointer'' 區塊中,以 moused 作轉換 的?L輪鼠的設定範例


    Section "ointer"
       Protocol        "SysMouse"
       Device          "/dev/sysmouse"
       Buttons         5
    EndSection



Example 11-2. 在 XFree86 4.x 系列的 XF86Config 設定檔的 ``InputDevice'' 區塊中,以 X Server 作轉換 的?L輪鼠的設定範例


    Section "InputDevice"
       Identifier      "Mouse1"
       Driver          "mouse"
       Option          "rotocol" "auto"
       Option          "Device" "/dev/sysmouse"
       Option          "Buttons" "5"
    EndSection



Example 11-3. 在 ``.emacs'' 中,設定?L輪鼠的原生 頁面?L動支援範例


    ;; wheel mouse
    (global-set-key [mouse-4] 'scroll-down)
    (global-set-key [mouse-5] 'scroll-up)



b.利用你的 X Server ?碜?L輪 Event 轉換


如果你沒有執行 moused(8),或是你不想利用 moused(8) 去作?L輪 event 轉換,你可以改用 X server ?碜鬟@樣的 event 轉換。你得在 /etc/XF86Config 檔案中作幾個更動。第一, 你要為你的滑鼠選擇適當的通?協定。大多數的?L輪鼠都 使用 ``IntelliMouse'' 協定,不過 XFree86 也支援其它的通?協定,例如羅技的 MouseMan+ 滑鼠所用的 ``MouseManPlusPS/2''。當你選好之後,只要 加進一行 ``Pointer'' 區塊的 Protocol 變數即可。


第二,你要告訴 X server 將捲動事件重新對映至滑鼠的 第四和第五鍵。這可以利用 ZAxisMapping 選項辦到。


舉個例子,如果你沒有使用 moused(8),而你有一個 IntelliMouse 安裝在 PS/2 滑鼠埠的話,你可以在 /etc/XF86Config 裡使用以下的設定。



Example 11-4. 在 XF86Config 設定檔的 ``Pointer'' 區塊中,以 X Server 作轉換的?L輪鼠的設定範例


    Section "ointer"
       Protocol        "IntelliMouse"
       Device          "/dev/psm0"
       ZAxisMapping    4 5
    EndSection



Example 11-5. 在 XFree86 4.x 系列的 XF86Config 設定檔的 ``InputDevice'' 區塊中,以 X Server 作轉換 的?L輪鼠的設定範例


    Section "InputDevice"
       Identifier      "Mouse1"
       Driver          "mouse"
       Option          "rotocol" "auto"
       Option          "Device" "/dev/psm0"
       Option          "ZAxisMapping" "4 5"
    EndSection



Example 11-6. 在 ``.emacs'' 中,設定?L輪鼠的原生 頁面?L動支援範例


    ;; wheel mouse
    (global-set-key [mouse-4] 'scroll-down)
    (global-set-key [mouse-5] 'scroll-up)
发表于 2004-5-1 18:39:44 | 显示全部楼层
我一直都是按照Hangbook的方法的。

XFree86 -configure
XFree86 -xf86config /root/XF86Config.new
ee /root/XF86Config.new
添加你的显示器的垂直和水平刷新率
Section "Monitor"
  Identifier "Monitor0"
  VendorName "Monitor Vendor"
  ModelName  "Monitor Model"
  Horizsync   68.9 ##########这两行是添加的########
  VertRefresh  85  ##########显示器刷新率。########
EndSection

选择默认的分辨率和颜色深度
Section "Screen"
   Identifier  "Card0"
   Monitor   "Monitor"
   DefaultColorDepth 24 #######添加这行######
   SubSection "Display"
   ……………………
  ……………………
   SubSection "Display"
     Depth 24
     Modes   "1024x768"
   EndSubSection

让你点鼠标滑轮可以用。

Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "rotocol" "auto"
Option "Device" "/dev/psm0"
Option "ZAxisMapping" "4 5"  ###添加这一行#####
EndSection
保存退出。

然后重复用
XFree86 -xf86config /root/XF86Config.new
测试。

测试没问题之后就:
cp /root/XF86Config.new /etc/X11/XF86Config


that is ok
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表