VirtualBox

Ticket #13238 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

shift and ctl keys stop working after view mode switch in linux guest -> fixed in 4.2 series and later releases after 4 August 2014

Reported by: zeny entropy Owned by:
Priority: minor Component: GUI
Version: VirtualBox 4.3.14 Keywords: keyboard modifiers fail change view mode
Cc: Guest type: Linux
Host type: Linux

Description

Host Arch Linux x86_64 3.15.5-2 SMP PREEMPT (LXDE desktop) Guest Arch Linux x86 - Guest boots in full screen mode OK (2 screens). Goes to LXDE destkop OK. Switch to seamless or scaled mode, and back to full screen, then shift-key or ctrl-keys (modifiers) have no effect ie shift-a == ctrl-a == 'a' Shift to seamless again, and shift-a == 'A'. but still 'a' in full screen mode. Annoyance makes view mode switch inadvisable.

Attachments

VBox.log Download (136.1 KB) - added by zeny entropy 3 years ago.
VBox.log of session with view mode switch
VBox.2.log Download (80.6 KB) - added by dbxt 3 years ago.

Change History

Changed 3 years ago by zeny entropy

VBox.log of session with view mode switch

comment:1 Changed 3 years ago by michael

As expected, I can't quickly reproduce this, so I will try asking you a few questions to get an idea of what is going on.

1) Is this reproducible? Always, sometimes?

2) If you run "xev" in the guest, what does it show when you press and release "Control" and "Shift" while experiencing this problem?

3) Can you reproduce the problem, execute (on the host) the command "VBoxManage debugvm <machine name> log --release gui.e.l3", press and release "Control" and "Shift" and one other key (say "a"), then execute "VBoxManage debugvm <machine name> log --release -gui.e.l3"? Check that the machine log file now contains a few lines like

05:35:51.471377 VBoxKeyboard: converting keycode 36 to scancode 0x1c

and attach the log file to this ticket.

Thanks.

Changed 3 years ago by dbxt

comment:2 Changed 3 years ago by dbxt

I'm having the same issue with Manjaro XFCE 64-bit (Host) with a variety of guests. It's certainly not a showstopper, but it's a pretty significant issue when I jump into full screen mode for development, and can't use the modifier keys. I have a dual monitor setup and this behavior is consistent when I place any guest in full screen over both monitors.

If I set the guest to use a single monitor, then put it into full screen mode, Shift and Ctrl work as expected.

If I set the guest display to any other mode (scaled/seamless) Shift and Ctrl work as expected.

If I set the guest to use all available monitors (2), then put it into full screen, Shift and Ctrl no longer function.

Host: Manjaro XFCE 64-bit
Tested Guests: Xubuntu 14.04, Windows 7 x64, Windows 8 x64, Manjaro XFCE 64-bit

1) 100% Reproducible.
2) Output of "xev"
Left CTRL Down

KeyPress event, serial 132, synthetic NO, window 0x4200001,
    root 0x176, subw 0x0, time 1037434, (-551,366), root:(291,694),
    state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

Left CTRL Release

KeyRelease event, serial 132, synthetic NO, window 0x4200001,
    root 0x176, subw 0x0, time 1037806, (-551,366), root:(291,694),
    state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

Left SHIFT Down

KeyPress event, serial 132, synthetic NO, window 0x4200001,
    root 0x176, subw 0x0, time 1096775, (-455,322), root:(387,650),
    state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

Left SHIFT Release

KeyRelease event, serial 132, synthetic NO, window 0x4200001,
    root 0x176, subw 0x0, time 1097734, (-453,320), root:(389,648),
    state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

3) Executed the steps as I understand them and attached the log file. I didn't see any entries like the example, but hopefully there's something in there of use.

Last edited 3 years ago by dbxt (previous) (diff)

comment:3 Changed 3 years ago by michael

dbxt: Can you enter the exact "VBoxManage" commands you entered? Not saying you did it wrong, I have certainly been known to give wrong instructions, but to clear it up. And is that "xev" output really from a guest? I am slightly surprised, as it shows that the system sees the shift and control key presses and correctly sets its shift and control states in response.

comment:4 Changed 3 years ago by dbxt

No worries on double checking the command. I didn't think it went through as expected since I didn't see the keyboard entries.

VBoxManage debugvm CLI-XUB log --release gui.e.l3
VBoxManage debugvm CLI-XUB log --release -gui.e.l3

The 'xev' output is from the same Xubuntu guest from which I pulled the log. I was a little shocked to see the keys logged properly as well, but for whatever reason, they're not translating to an action on the guest. I just tried it again, and SHIFT shows up in the "xev" console properly, but then I switch directly to an open text editor (scite) and SHIFT+A results in a a lowercase 'a'.

This is a bit of a nuisance issue for me, so anything I can do to help chase down the cause, I'm happy to help.

comment:5 Changed 3 years ago by michael

Just a thought - you can use "xev" to view the events sent to another window, so you if you can find out which of the editor's windows is receiving the key events you could try monitoring them.

I would say that the log entries in the machine log file are not that important if we can see the events in "xev".

comment:6 Changed 3 years ago by dbxt

So I played around with "xev" a little more today and I started to notice something peculiar. On the same guest, I typed SHIFT+F in normal mode, and then again in full screen mode. Here's the output from the XEV window

Non-fullscreen

KeyPress event, serial 107, synthetic NO, window 0x5200001,
    root 0x177, subw 0x0, time 10740275, (214,-144), root:(1085,283),
    state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 107, synthetic NO, window 0x5200001,
    root 0x177, subw 0x0, time 10743267, (214,-144), root:(1085,283),
    state 0x1, keycode 41 (keysym 0x46, F), same_screen YES,
    XLookupString gives 1 bytes: (46) "F"
    XmbLookupString gives 1 bytes: (46) "F"
    XFilterEvent returns: False

KeyRelease event, serial 107, synthetic NO, window 0x5200001,
    root 0x177, subw 0x0, time 10743415, (214,-144), root:(1085,283),
    state 0x1, keycode 41 (keysym 0x46, F), same_screen YES,
    XLookupString gives 1 bytes: (46) "F"
    XFilterEvent returns: False

KeyRelease event, serial 107, synthetic NO, window 0x5200001,
    root 0x177, subw 0x0, time 10745298, (214,-144), root:(1085,283),
    state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

Fullscreen

KeyPress event, serial 121, synthetic NO, window 0x5200001,
    root 0x177, subw 0x0, time 10807066, (32,-246), root:(903,181),
    state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 121, synthetic NO, window 0x5200001,
    root 0x177, subw 0x0, time 10807066, (32,-246), root:(903,181),
    state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 121, synthetic NO, window 0x5200001,
    root 0x177, subw 0x0, time 10809126, (32,-246), root:(903,181),
    state 0x0, keycode 41 (keysym 0x66, f), same_screen YES,
    XLookupString gives 1 bytes: (66) "f"
    XmbLookupString gives 1 bytes: (66) "f"
    XFilterEvent returns: False

KeyRelease event, serial 121, synthetic NO, window 0x5200001,
    root 0x177, subw 0x0, time 10809126, (32,-246), root:(903,181),
    state 0x0, keycode 41 (keysym 0x66, f), same_screen YES,
    XLookupString gives 1 bytes: (66) "f"
    XFilterEvent returns: False

In fullscreen, it appears to register the SHIFT press, but then immediately returns a "release". This explains why I see the keypress, but don't get the combination.

comment:7 Changed 3 years ago by michael

For your information I have been able to reproduce this (with logging). We seem to be injecting lots of bogus scan codes. I will investigate.

comment:8 Changed 3 years ago by dbxt

Excellent! Let me know if I can be of any further assistance.

comment:9 Changed 3 years ago by michael

You might like to give this build a try. It contains a fix which makes the problem go away for me.

https://www.virtualbox.org/download/testcase/VirtualBox-4.3.15-95317-Linux_amd64.run

It is a shell-script-based installer, so you will want to remove your existing .deb package before you install it.

comment:10 Changed 3 years ago by dbxt

@michael you're a champion!

Downloaded and tried to run this on my Manjaro host and the script errored out. Fine with me because I planned on ditching Manjaro to go back to Xubuntu anyway. Unfortunately, I didn't think to grab the installer error message before I reformatted. Now I'm running on an Xubuntu host and the the modifier keys in my Xubuntu and Windows guests work beautifully! I've just done some spot checking tonight, but I'll spend the tomorrow using the VM for development in full screen mode. Will report back if I notice any inconsistencies or issues.

Thanks for being awesome!

Last edited 3 years ago by dbxt (previous) (diff)

comment:11 Changed 3 years ago by dbxt

After spending about 10 hours working with this version today, I can say the reported issue has been resolved. There's still a bit of intermittent funkiness when switching between fullscreen and non-fullscreen, but that's something that should probably be reported in another ticket.

Thanks again for your help. This makes development in VMs much easier.

comment:12 Changed 3 years ago by michael

  • Summary changed from shift and ctl keys stop working after view mode switch in linux guest to shift and ctl keys stop working after view mode switch in linux guest -> fixed in 4.2 series and later releases after 4 August 2014

I made some changes to the fix. In case you do want to check that it is still working as it should, here is a build:

https://www.virtualbox.org/download/testcase/VirtualBox-4.3.15-95367-Linux_amd64.run

comment:13 Changed 3 years ago by frank

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

Fix is part of VBox 4.3.16.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use