Dav*_*vis 5 mouse xorg vmware logitech
Windows 10 主机正在运行 VMWare Workstation Pro 15.1.0。来宾操作系统运行 X11。指针硬件是Logitech Marble Mouse,在 Ubuntu 社区站点上有配置信息。在 Windows 上,通过按住右侧小按钮进行滚动可与TrackballScroll配合使用配合使用。下图显示了 xorg 如何引用 Logitech 的按钮:
\n\n\n\n虚拟机软件.vmx
文件具有以下配置设置,允许超过 3 个不同的按钮在来宾操作系统中触发鼠标事件:
usb.generic.allowHID = "TRUE"\nmouse.vusb.enable = "TRUE"\nmouse.vusb.useBasicMouse = "FALSE"\n
Run Code Online (Sandbox Code Playgroud)\n\n有了这些线路鼠标按钮事件都会发送到来宾操作系统。
\n\n输出来自xinput list
来宾操作系统
xinput list \n\xe2\x8e\xa1 Virtual core pointer id=2 [master pointer (3)]\n\xe2\x8e\x9c \xe2\x86\xb3 Virtual core XTEST pointer id=4 [slave pointer (2)]\n\xe2\x8e\x9c \xe2\x86\xb3 VMware VMware Virtual USB Mouse id=7 [slave pointer (2)]\n\xe2\x8e\x9c \xe2\x86\xb3 VMware VMware Virtual USB Mouse id=8 [slave pointer (2)]\n\xe2\x8e\x9c \xe2\x86\xb3 VirtualPS/2 VMware VMMouse id=10 [slave pointer (2)]\n\xe2\x8e\x9c \xe2\x86\xb3 VirtualPS/2 VMware VMMouse id=11 [slave pointer (2)]\n
Run Code Online (Sandbox Code Playgroud)\n\nxinput test-xi2 --root
所有四个按钮1
、8
、9
和的运行详细信息事件3
详细信息事件(来自上图):
EVENT type 5 (ButtonRelease)\n device: 8 (8)\n detail: 1\nEVENT type 5 (ButtonRelease)\n device: 8 (8)\n detail: 8\nEVENT type 5 (ButtonRelease)\n device: 8 (8)\n detail: 9\nEVENT type 5 (ButtonRelease)\n device: 8 (8)\n detail: 3\n
Run Code Online (Sandbox Code Playgroud)\n\n这表明按钮单击事件正在使用设备 8 成功从主机传递到来宾。需要稍微担心的是,有两个鼠标分配了相同的名称,但具有不同的 id:
\n\n\xe2\x8e\x9c \xe2\x86\xb3 VMware VMware Virtual USB Mouse id=7 [slave pointer (2)]\n\xe2\x8e\x9c \xe2\x86\xb3 VMware VMware Virtual USB Mouse id=8 [slave pointer (2)]\n
Run Code Online (Sandbox Code Playgroud)\n\n9
移动轨迹球时按住右侧小按钮 ( ) 进行滚动失败。跑步xinput test-xi2 --root
显示失败:
EVENT type 4 (ButtonPress)\n device: 8 (8)\n detail: 9\nEVENT type 1 (DeviceChanged)\n device: 2 (7)\n reason: SlaveSwitch\n Reporting 7 classes:\n Class originated from: 7. Type: XIButtonClass\n Buttons supported: 11\nX Error of failed request: BadAtom (invalid Atom parameter)\n Major opcode of failed request: 17 (X_GetAtomName)\n Atom id in failed request: 0x282\n Serial number of failed request: 34\n Current serial number in output stream: 34\n Button labels: "Button Left" "Button Middle" "Button Right"\n
Run Code Online (Sandbox Code Playgroud)\n\n文件.../xorg.conf.d/50-trackball.conf
对X11的配置如下:
Section "InputClass"\n Identifier "Logitech Marble Mouse"\n MatchIsPointer "true"\n #MatchProduct "Mouse"\n #MatchVendor "VMWare"\n Driver "libinput"\n Option "ScrollMethod" "button"\n Option "ScrollButton" "9"\n Option "MiddleEmulation" "true"\n Option "HorizontalScrolling" "false"\n Option "ButtonMapping" "1 2 3 4 5 6 7 9 8"\nEndSection\n
Run Code Online (Sandbox Code Playgroud)\n\n输出来自xinput list-props 7
:
Device \'VMware VMware Virtual USB Mouse\':\n Device Enabled (124): 1\n Coordinate Transformation Matrix (126): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000\n libinput Calibration Matrix (261): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000\n libinput Calibration Matrix Default (262): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000\n libinput Natural Scrolling Enabled (263): 0\n libinput Natural Scrolling Enabled Default (264): 0\n libinput Send Events Modes Available (244): 1, 0\n libinput Send Events Mode Enabled (245): 0, 0\n libinput Send Events Mode Enabled Default (246): 0, 0\n libinput Left Handed Enabled (265): 0\n libinput Left Handed Enabled Default (266): 0\n libinput Scroll Methods Available (267): 0, 0, 1\n libinput Scroll Method Enabled (268): 0, 0, 1\n libinput Scroll Method Enabled Default (269): 0, 0, 1\n libinput Button Scrolling Button (270): 9\n libinput Button Scrolling Button Default (271): 2\n libinput Middle Emulation Enabled (272): 0\n libinput Middle Emulation Enabled Default (273): 0\n Device Node (247): "/dev/input/event5"\n Device Product ID (248): 3599, 3\n libinput Drag Lock Buttons (274): <no items>\n libinput Horizontal Scroll Enabled (275): 1\n
Run Code Online (Sandbox Code Playgroud)\n\nX 配置文件中需要更改的内容中进行哪些更改,以便按住右侧小按钮时可以在 VMWare 内运行的 X11 会话中使用轨迹球进行垂直滚动?
\n\n相关链接包括:
\n\n有关解决问题的尝试以及可行但不太理想的方法的一些额外信息。
\n\n请注意,可以使用“连接”选项断开鼠标与主机操作系统的连接,然后允许根据需要滚动。缺点是,这使得来宾系统和主机系统之间的切换有点尴尬,因为在系统之间切换需要几个步骤。理想情况下,客户操作系统将使用一次鼠标单击来获得焦点,滚动将“正常工作”,然后Ctrl+Alt将控制权释放回主机操作系统。
\n\n\n\n将驱动程序从 更改为libinput
不起作用evdev
,例如:
Driver "evdev"\n
Run Code Online (Sandbox Code Playgroud)\n\n尽管 VMWare 列出了 USB 鼠标的两个条目,但id=8
似乎没有任何效果;然而,id=7
可以使用以下方法禁用:
xinput set-prop 7 124 0\n
Run Code Online (Sandbox Code Playgroud)\n\n其中7
是鼠标 ID,124
是Device Enabled
设置,0
表示false
。这会完全禁用指针;更改0
以1
重新启用指针。
从命令行配置轨迹球是一种可接受的解决方案,但50-trackball.conf
最好进行更改。
首先,当条目重复时,xinput
用户似乎对删除重复项不感兴趣。xinput
他们似乎更感兴趣的是使用这样的脚本将配置更改应用于第一个条目和重复条目。尽管您仅更改设备 ID 7,但对设备 ID 8 进行相同的更改可能会有所帮助。
badatom 错误消息似乎与 SSH 有关:
我找到了以下 VMWare 的研究链接。没有人提供明确的答案,但问题和答案可能提供线索: