X11上的多按钮鼠标:如何配置多个按钮作为中间按钮?


2

我知道如何让另一个按钮充当中间按钮但是如何将几个鼠标按钮映射到中间按钮?

xmodmap如果我在pointer选项中重复按钮号,则会抱怨。

Answers:


2

我想你可以配置Option "ButtonMapping"你的鼠标Section "InputDevice"xorg.conf。在那里你应该将物理按钮设置为逻辑按钮2

例如:

Section "InputDevice"
  Identifier     "Mouse0"
  Driver         "mouse"
  Option         "Protocol" "auto"
  Option         "Device" "/dev/psaux"
  Option         "Emulate3Buttons" "no"
  Option         "ZAxisMapping" "4 5"
  Option         "ButtonMapping" "1 2 3 4 5 2"
EndSection

1

要将左右按钮作为中间按钮按下时,需要激活3按钮仿真。在较旧的Xorg版本中,请Option "Emulate3Buttons" "yes"InputDevicexorg.conf 的相应部分中进行设置。

在Xorg 1.4到1.7中,添加一个HAL配置fdi文件,例如:

<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
  <device>
    <!--
         Default X.org input configuration is defined in:
             /etc/hal/fdi/policy/30user/10-x11-input.fdi
         Settings here modify or override the default configuration.
         See comment in the file above for more information.

         To see the currently active hal X.org input configuration
         run lshal or hal-device(1m) and search for "input.x11*" keys.

         Hal and X must be restarted for changes here to take any effect
    -->
    <match key="info.capabilities" contains="input.mouse">
      <merge key="input.x11_options.Emulate3Buttons" type="string">on</merge>
    </match>
  </device>
</deviceinfo>

在Xorg 1.8及更高版本中,在xorg.conf.d目录中添加一个文件,例如:

Section "InputClass"
    Identifier "middle button emulation class"
    MatchIsPointer "on"
    Option "Emulate3Buttons" "on"
EndSection

我的鼠标有18个按钮......至少X这样说。我只能找到7.
Aaron Digulla 2011年
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.