如何在 Ubuntu 客户机、Windows 7 主机上的 virtualbox 中禁用水平滚动?
这篇文章重复 来自 superuser.com,但由于我没有答案,我开始怀疑这是一个用户问题,也许更多的是一个编程问题(因为配置文件),所以这里是:
我使用 Windows 7 作为主机, Ubuntu Karmic 作为安装了访客工具的访客操作系统,从主机切换到访客计算机时,我遇到了一个恼人的故障:垂直滚动切换到水平! (使用鼠标滚轮)。由于我并不真正关心水平滚动,我该如何禁用它?
我检查了网络,我发现的唯一的事情是在 xorg.conf 文件中播放并在“InputDevice”部分中添加
选项“ZAxisMapping”“4 5”,
这将仅启用垂直滚动。问题是,我的配置文件中没有该部分,所以我猜想我需要添加
Section "InputDevice"
Identifier "VBoxMouse"
Driver "vboxmouse"
Option "ZAxisMapping" "4 5"
EndSection
但这在重新启动 xserver 后似乎不起作用。
有什么解决方法吗?
This post is a duplicate from superuser.com, but since I had no answers, I started to doubt it was a user question and maybe more of a programming question (because of the configuration files), so here it is:
I am using Windows 7 as Host, Ubuntu Karmic as guest OS with guest tools installed and I get an annoying glitch when switching from host to the guest machine: vertical scrolling switches to horizontal! (using the mouse wheel). Since I don't really care about horizontal scrolling, how can I disable this?
I have checked the web and the only thing I found was to play in the xorg.conf file and adding in the section "InputDevice"
Option "ZAxisMapping" "4 5"
which would enable vertical scrolling only. The thing is, I don't have that section in my config file so I guessed that I would need to add
Section "InputDevice"
Identifier "VBoxMouse"
Driver "vboxmouse"
Option "ZAxisMapping" "4 5"
EndSection
But that does not seem to work after restarting xserver.
Any workaround for this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧,既然 ZAxisMapping 应该已经在我的问题中禁用水平滚动,但当然似乎仍然不起作用,我发现它实际上是一个 virtualbox bug 与 ALT 键修饰符有关。基本上,如果在进入虚拟框窗口的同时按下 ALT 键,滚动将从垂直切换为水平。我遇到这种情况是因为我在Win7中使用dexpot并使用alt键进行桌面切换功能。
在错误得到纠正之前,解决方法是进入 vbox 窗口并注意到滚动切换为水平后,您需要按主机键,再次按 ALT,然后手动单击 vbox 窗口返回到它,而不需要触摸替代按钮。目前,我不使用 alt 键切换桌面,一切都恢复正常。
Well since the the ZAxisMapping should already disable the horizontal scrolling in my question, but of course did still not seem to work, I have found that it was actually a virtualbox bug that has something to do with the ALT key modifier. Basically the scrolling will switch from vertical to horizontal if the ALT key is pressed at the same time as falling into the virtualbox window. This happened to me because I was using dexpot in Win7 with the desktop switching feature using the alt key.
Until the bug is corrected, the workaround is after getting into the vbox window and noticing that scrolling was switched to horizontal, you need to hit the host key, hit ALT again, then manually click the vbox window to return to it, without touching the alt button. For now, I do not use the alt key for switching desktops, and everything works fine again.
我遇到了同样的问题 - 直到我安装了 VirtualBox Guest Additions。
I had the same issue - until I installed the VirtualBox Guest Additions.