VirtualBox

Ticket #4983 (closed defect: wontfix)

Opened 5 years ago

Last modified 4 years ago

keyboard input does not work correctly with control key

Reported by: schily Owned by:
Priority: major Component: other
Version: VirtualBox 3.0.6 Keywords:
Cc: Guest type: other
Host type: Solaris

Description

It seems that the problem is related to the keyboard type. The problem does not occur on a machine, where the primary keyboard is a USB keyboard.

Running a remote X session where the X-server is on a machine where the problem exists (this machine has a primary PS/2 keyboard) also triggers the problem even if the "VirtualBox" program is run on a machine that works correctly when VirtualBox is run locally.

The Problem is independent from the guest OS.

Seen problems:

  • right control does not "un-catch" the cursor typing left-control + right-control + alt together works
  • typing control + C almost never works
  • typing C (holding it down) then typine left-control sometimes works
  • typing left-control + right-control + alt + C together in most cases works

Attachments

VBox.log Download (32.4 KB) - added by schily 5 years ago.
Log file for non-working standard PS/2 (de) keyboard

Change History

comment:1 Changed 5 years ago by michael

Could you please attach a log file from a "problem" session of VirtualBox in case it contains anything of interest? Thanks.

Changed 5 years ago by schily

Log file for non-working standard PS/2 (de) keyboard

comment:2 Changed 5 years ago by schily

The keyboard is a standard German PS/2 keyboard

kbd -l type=6 layout=9 (0x09) delay(ms)=500 rate(ms)=40

that should definitely be correctly supported out ov the box by virtualbox.

comment:3 Changed 5 years ago by michael

Does it make a difference if you switch to a standard US keyboard layout before starting VirtualBox? If it does, could you please send a log from that session too? Thanks.

comment:4 Changed 5 years ago by michael

In fact, a log from that session would probably be of interest even if it doesn't make a difference...

comment:5 Changed 5 years ago by schily

What do you understand by "switch to a standard US keyboard"?

comment:6 Changed 5 years ago by michael

Change your Xkb keyboard layout.

comment:7 Changed 5 years ago by schily

How can I do this?

Do I need to change the physical kbd? DO I need to restart X?

comment:8 Changed 5 years ago by michael

See for example setxkbmap. No and no, to your questions.

comment:9 Changed 5 years ago by michael

E.g.

setxkbmap us

to switch to a US layout and

setxkbmap de

to switch back. (I also have an entry in my Gnome taskbar for this). Sorry if my last answer was a little short, I had a train to catch :)

comment:10 Changed 5 years ago by schily

This does not help.

The only effect from switching to the us layout is that the warning in the vbox log file disappears.

There is no other visible result.

comment:11 Changed 5 years ago by michael

Hm, so far I am rather clueless. Does xev(3) show any difference in the events coming from the USB keyboard which works with VirtualBox and the PS/2 one which does not?

comment:12 Changed 5 years ago by michael

Any updates here?

comment:13 follow-up: ↓ 14 Changed 4 years ago by caughranjim@…

I'm having a similar problem with VB 3.1.2 on a laptop. I'm running Ubuntu 9.10 (32bit), with Windows 7 in a virtual box. In the guest OS, neither control key works at all. "ctrl+o" in a Windows application doesn't open a file, it types an "o". There is no ps/2 or serial port on the computer, and I don't have a USB keyboard, so I can't check other keyboards. Keyboard works fine when I get back to linux.

WHOOPS! Solved it. I thought I'd check a couple of things before sending this off, and discovered that "Mouse Preferences/General/Locate Pointer/ Show position of pointer when control is pressed" must be turned off. If on, the guest Windows OS control key shows the pointer with it turned on, but does not act as control key or Host key. I hope this is useful to someone.

comment:14 in reply to: ↑ 13 Changed 4 years ago by schily

Replying to caughranjim@gmail.com:

I'm having a similar problem with VB 3.1.2 on a laptop. I'm running Ubuntu 9.10 (32bit), with

...

WHOOPS! Solved it. I thought I'd check a couple of things before sending this off, and discovered that "Mouse Preferences/General/Locate Pointer/ Show position of pointer when control is pressed" must be turned off. If on, the guest Windows OS control key shows the pointer with it turned on, but does not act as control key or Host key. I hope this is useful to someone.

Thank you!

You found the reason for the problem. Switching off mouse location with control key solves my problem and this even works while VirtualBox is already running.

My impression is that this is still a bug in VirtualBox as VirtualBox should catch the keyboard input at a low enough level to be not affected by such setup.

Is there a way to change VirtualBox to be no longer affected by this problem?

comment:15 Changed 4 years ago by michael

  • Status changed from new to closed
  • Resolution set to wontfix

It might be possible to hack around this particular issue, but on the whole, we have always taken the point of view that if the user is running something that captures host keypresses then those keypresses will not be available to the guest. If both the guest and the host were to react to certain hotkey combinations it could cause some confusion.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use