如何在 Ubuntu 客户机、Windows 7 主机上的 virtualbox 中禁用水平滚动?

发布于 2024-08-27 01:24:17 字数 675 浏览 5 评论 0原文

这篇文章重复 来自 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

池予 2024-09-03 01:24:17

好吧,既然 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.

痴情换悲伤 2024-09-03 01:24:17

我遇到了同样的问题 - 直到我安装了 VirtualBox Guest Additions。

I had the same issue - until I installed the VirtualBox Guest Additions.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文