VirtualBox

Ticket #12859 (closed defect: wontfix)

Opened 17 months ago

Last modified 10 months ago

ACPI keystrokes not sent to guest

Reported by: hugh2 Owned by:
Priority: minor Component: other
Version: VirtualBox 4.3.8 Keywords:
Cc: Guest type: all
Host type: Windows

Description

I'm talking about the ACPI Power, ACPI Sleep and ACPI Wake keys on some keyboards. The guest doesn't receive them. My keyboard also has a "mystery" key (not labeled; I tried to look up the scancode and it might be "Help") which doesn't reach the guest.

I'd say the rule should be, if you don't recognize the scancode, give it the benefit of the doubt and pass it to the guest.

Host: XP SP3 32-bit. Guest: same. (I also tried Android, though I'm not sure what effect ACPI keys should have there and I don't have a key test program for Android)

Tip for testing your ACPI keys on a Windows host: set them to do nothing in the Power Options control panel applet. (they still generate keystrokes though)

Change History

comment:1 Changed 17 months ago by frank

Such special keys will not be sent directly to the guest just because VirtualBox as normal user application is not able to prevent the host from handling it himself. To pass the ACPI sleep / power off event, use VBoxMange (VBoxManage controlvm, works for power off and sleep) or use the GUI (only implemented for the power off event).

comment:2 Changed 16 months ago by frank

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

comment:3 Changed 16 months ago by hugh2

  • Status changed from closed to reopened
  • Resolution wontfix deleted

"VirtualBox as normal user application is not able to prevent the host from handling it himself"

If that is true, could you elaborate? Here's why I'm doubtful:

The power management keys send WM_KEYDOWN and WM_KEYUP events to the focused window so there's no problem reading them. Moreover, Virtualbox is able to intercept and block the host from reacting to the "system hotkeys" registered by Winlogon (except Ctrl+Alt+Del) - which normal applications can't interfere with.

The ones I've tested under Windows XP:

  • Ctrl+Shift+Esc (Task Manager)
  • Win (Start Menu - yes, this is registered even when Explorer isn't running)
  • Win+L (lock console)
  • Win+U (open Utility Manager)

The ones I haven't tested (I don't know what they do but I think it is related to debugging):

  • F12
  • Shift+F12

Virtualbox also intercepts Printscreen and Alt+Printscreen. I'm not sure what part of the system handles these but they're not normal hotkeys.

comment:4 Changed 16 months ago by frank

  • Status changed from reopened to closed
  • Resolution set to duplicate

Ok, if Windows is sending key down/up events for the particular keys to applications then VirtualBox would indeed be able to passthrough these keys to guests. In that case your request is probably a duplicate of #10179.

comment:5 Changed 16 months ago by hugh2

  • Status changed from closed to reopened
  • Resolution duplicate deleted

Actually #10179 is the opposite of this - the reporter there wants the ability to have some keys ignored by the guest, whereas I want some keys processed by the guest that are currently not. (and really, all keys should be seen by the guest when is has keyboard capture, except for the host key and maybe Ctrl+Alt+Del)

BTW if you're interested in a use case for the ACPI keys, how about long-pressing the power button in Android? (Android-x86 works in Virtualbox)

comment:6 Changed 10 months ago by frank

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

I still don't think that we will change anything here. If long-pressing the power button means to switch the guest then this is usually done by powering off the VM. The short power button press can already be sent to the guest as well as the sleep button event.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use