Page 1 of 1

Keyboard and Mouse Glitches

PostPosted: 1. Aug 2008, 10:34
by Michael Grinberg
VB 1.6.2 (EDIT: same for VB 1.6.4)
Host: Mac OS X 10.5.4
Guest: Ubuntu 8.04 i1 w Guest additions

Hi everybody,

I'm using VB to run some linux-only apps on a MacBook. There are two important issues with the guest machine and both of them are keyboard/mouse related.
  • Scrolling with the scroll wheel won't work as expected. If I scroll down just a little, everything's OK. But if I try to scroll continuously (give the mouse wheel several turns), the scrolling process stops very soon. I have to wait several seconds and only then scroll again.
  • What is even worse, I need to run a touchtyping tutor in the guest machine. It usually displays keyboard layout on screen, i.e. draws an image with all the keys. This function doesn't work now, so, as I guess, the app cannot identify my keyboard model. I've tried to go to Preferences --> Keyboard --> Layouts --> Keyboard model in Ubuntu. When I chose "Macbook/Macbook Pro", it changed nothing. On the contrary, I started receiving the "Error activating XKB configuration"
Is there a way to fix these issues?

As I understand, one way is to somehow connect the Guest with my peripherals directly. But when I open the USB menu the corresponding items are always grayed out ("Apple Computer Apple Internal Keyboard / Trackpad [0007]" and "Microsoft Basic Optical Mouse v2.0 [0199]"). I tried to connect two external mice to the host, but both of them were grayed out as well. Is there a way to activate those entries? Is there any other method to improve mouse/keyboard support besides from connecting USB devices to the guest directly?

Any piece of advice or observation will be very much appreciated.

Michael

PostPosted: 1. Aug 2008, 12:32
by TerryE
I assume that you have the 1.6.2 PUEL Guest Additions installed (though 1.6.4 is now out). If not, then install them.

A USB device can only be allocated to the host or the VM. Even is you got the driver issues sorted you would need 2 x Keybd+mouse to do this.

Same with 1.6.4

PostPosted: 4. Aug 2008, 07:52
by Michael Grinberg
Thank you for reply, TerryE!

Unfortunately, updating VB and Guest Additions to 1.6.4 doesn't change anything.

I would be very thankful if someone helps me with this stuff a bit...

Even is you got the driver issues sorted you would need 2 x Keybd+mouse to do this.

Every time I connect a second mouse to my host, it is grayed out in the USB menu, in fact, this is the problem. Will a second keyboard change anything?

How to cope with the grayed-out usb devices?

PostPosted: 6. Aug 2008, 09:54
by Michael Grinberg
Hi there,

It looks as if I were posting for myself only... Is there anything wrong with my english?

In the meantime, I was able to narrow the problem a little bit.

I've installed OpenSolaris "Indiana" as guest, altogether with the additions. Everything worked just fine – no bugs with scrolling. Then I've installed another linux guest, WITHOUT the additions. Again, everything worked fine.
However, after I installed the additions, the glitches reappeared. So, I guess we have a linux-additions-related bug that we need to reproduce and file. Will anybody help?

Secondly, I repeat my question: Is there a way to cope with the grayed-out usb devices? I still cannot connect a (second) mouse to the guest machine.

Lots of thanks to someone who knows the answer and posts it here.

Michael

Confirm

PostPosted: 18. Aug 2008, 17:20
by gcarrillo
I can confirm the issue with the mouse scroll wheel failing to scroll a page when rolled too quickly. It seems to be related to how fast I roll the scroll wheel; If I roll it above a certain rate, the input seems to stop having an effect, and scrolling stops. If I roll it more slowly, it continues to function.

I am running Mac OS X 10.5.4 + Virtual Box 1.6.4. I have created a VM and installed Ubuntu 8.04, and I have installed VBoxAdditions 6.4_33808.

My mouse is an optical mouse connected via USB to the MacBook Pro.

Thanks for any commentary...

new info

PostPosted: 18. Aug 2008, 21:41
by gcarrillo
To elaborate on my previous post: It appears that when I roll the scroll wheel at too high a rate, the vertical scrolling on a window becomes horizontal scrolling. I.e., it must be a problem with handling the horizontal scrolling, because using a horizontal two-fingered swipe on the touchpad does not result in horizontal window scrolling in the VM either, as it does with Mac OS X itself. Could this be some driver miscommunication?

PostPosted: 21. Aug 2008, 12:22
by dwt
Yeah, same problem here - Mouse scrolling flips to horizontal scrolling when done too fast and the keyboard isn't recognized propperly.

For example < and ^ are swapped, and at least on my german keyboard (Intel Macbook Pro) most of the special keys [,], {,} etc. are not available.

Which is quite.. unhandy for development.

PostPosted: 21. Aug 2008, 12:50
by Michael Grinberg
This is what I have figured out so far. This problem consists of at least two parts:
1) VB provides the guest OS with two virtual devices – a keyboard and a mouse. These devices (a) are sometimes glitchy (and this clearly needs to be fixed) and (b) they have no alternatives, so that whatever keyboard the host machine has, the guest will only see a generic 105-key PC keyboard; the situation may become better as some alternative virtual devices appear (if that's feasible).
2) We could have worked around this issue if VB gave a possibility to directly connect a physical keyboard and mouse to the guest. So far I see only one obvious way to do so, by using USB devices. However, VB would not let me do so, by disabling access to any external mouse I connect (=graying out the corresponding menu items). Is anybody able to reproduce that, especially with an external usb keyboard (which I do not possess)?

Anyway, is my non-techie-mind analysis correct?

Michael

PostPosted: 21. Aug 2008, 14:16
by TerryE
Michael, it sounds as if this is a common issue. Can I suggest that you scan the open tickets. See http://www.virtualbox.org/report and scan the MacOS + USB ones. If there is one add your input if you feel it appropriate. If not then why not raise an issue? The Forum FAQ tells you how.

PostPosted: 22. Aug 2008, 17:45
by sburnett
I have been experiencing the scrolling issue as well. I found a workaround, but is probably not optimal. In the mouse "InputDevice" section of your xorg.conf file, find the line:

ZAxisMapping "4 5 6 7"

and replace it with

ZAxisMapping "4 5"

If you don't have a ZAxisMapping line, I guess just add the one I have provided. This change will disable horizontal scrolling, but I never use that so it really wasn't much of a problem.

Hope this is of some help.

PostPosted: 28. Jan 2009, 18:15
by Disorder
Following a recipe for VMWare I found that this solution works fine for VirtualBox 2.1.2 and Uuntu 8.04:

Open your xorg.conf file
Go to the section "Input Device"
After
Code: Select all   Expand viewCollapse view
Option "CorePointer"


Add the lines
Code: Select all   Expand viewCollapse view
Option "Device" "/dev/input/mice"
Option "Buttons" "5"
Option "ZAxisMapping" "4 5"


The line
Option "ZAxisMapping" "4 5"
as described in another post above did not help in my case (OS X 10.5.5, Logitech optical cordless mouse)