配置多个鼠标设置

配置多个鼠标设置

我是一名左撇子 ThinkPad 用户,习惯于使用默认右手配置的 TrackPoint。但是,当我使用蓝牙鼠标时,我希望按钮采用左手布局。在 11.04 (Natty) 中,我可以使用以下方法手动配置新输入,但我希望在鼠标连接时自动应用它。我按照 xorg 文档创建/etc/X11/xorg.conf/99-ms500mouse.conf并将以下内容放入其中:

Section "InputClass"
    Identifier "Microsoft Bluetooth Mouse 5000 button remap"
    MatchProduct "Microsoft Bluetooth Notebook Mouse 5000"
    MatchDevicePath "/dev/input/event*"
    Option "ButtonMapping"      "3 2 1 4 5 0 0 0 0 0 0 0"
EndSection

这最初似乎有效(GDM 似乎正确使用了它),但是当我登录并启动我的 X 会话时,按钮神秘地恢复了:

$ xinput get-button-map "微软蓝牙笔记本鼠标 5000"

1 2 3 4 5 6 7 8 9 10 11 12

以下是我的/var/log/Xorg.0.log

[   276.648] (II) config/udev: Adding input device Microsoft Bluetooth Notebook Mouse 5000 (/dev/input/mouse1)
[   276.648] (II) No input driver/identifier specified (ignoring)
[   276.649] (II) config/udev: Adding input device Microsoft Bluetooth Notebook Mouse 5000 (/dev/input/event14)
[   276.649] (**) Microsoft Bluetooth Notebook Mouse 5000: Applying InputClass "evdev pointer catchall"
[   276.649] (**) Microsoft Bluetooth Notebook Mouse 5000: Applying InputClass "Microsoft Bluetooth Mouse 5000 button remap"
[   276.649] (II) Using input driver 'evdev' for 'Microsoft Bluetooth Notebook Mouse 5000'
[   276.649] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so
[   276.649] (**) Microsoft Bluetooth Notebook Mouse 5000: always reports core events
[   276.649] (**) Microsoft Bluetooth Notebook Mouse 5000: Device: "/dev/input/event14"
[   276.670] (**) Microsoft Bluetooth Notebook Mouse 5000: ButtonMapping '3 2 1 4 5 0 0 0 0 0 0 0'
[   276.670] (--) Microsoft Bluetooth Notebook Mouse 5000: Found 8 mouse buttons
[   276.670] (--) Microsoft Bluetooth Notebook Mouse 5000: Found scroll wheel(s)
[   276.670] (--) Microsoft Bluetooth Notebook Mouse 5000: Found relative axes
[   276.670] (--) Microsoft Bluetooth Notebook Mouse 5000: Found x and y relative axes
[   276.670] (--) Microsoft Bluetooth Notebook Mouse 5000: Found absolute axes
[   276.670] (II) evdev-grail: failed to open grail, no gesture support
[   276.670] (II) Microsoft Bluetooth Notebook Mouse 5000: Configuring as mouse
[   276.670] (II) Microsoft Bluetooth Notebook Mouse 5000: Adding scrollwheel support
[   276.670] (**) Microsoft Bluetooth Notebook Mouse 5000: YAxisMapping: buttons 4 and 5
[   276.670] (**) Microsoft Bluetooth Notebook Mouse 5000: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
[   276.670] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1a.1/usb4/4-2/4-2:1.0/bluetooth/hci0/hci0:11/input14/event14"
[   276.670] (II) XINPUT: Adding extended input device "Microsoft Bluetooth Notebook Mouse 5000" (type: MOUSE)
[   276.670] (II) Microsoft Bluetooth Notebook Mouse 5000: initialized for relative axes.
[   276.670] (WW) Microsoft Bluetooth Notebook Mouse 5000: ignoring absolute axes.
[   276.670] (**) Microsoft Bluetooth Notebook Mouse 5000: (accel) keeping acceleration scheme 1
[   276.670] (**) Microsoft Bluetooth Notebook Mouse 5000: (accel) acceleration profile 0
[   276.671] (**) Microsoft Bluetooth Notebook Mouse 5000: (accel) acceleration factor: 2.000
[   276.671] (**) Microsoft Bluetooth Notebook Mouse 5000: (accel) acceleration threshold: 4

如您所见,它似乎应用了我想要的按钮映射(即交换按钮 3 和 1 并禁用所有其他按钮),但会话启动后,这个映射就消失了。我如何确保这些设置保持不变?

多谢!

答案1

找到问题了。gnome-settings-daemon 正在用系统范围的设置(设置为右手)覆盖我为鼠标提供的设置。避免此行为的唯一方法是启动gconf-编辑器并找到钥匙:

/apps/gnome_settings_daemon/plugins/mouse/active

并取消设置。这将阻止它覆盖 xorg.conf(或 etc/X11/xorg.conf.d/ 中的片段文件)中指定的设置。

相关内容