Hi,
I'm looking for an automatic window maximization on Windows 7 using VBoxManage controlvm.
This operation can be done manually on the keyboard using key combination : LWin+Up
Nevertheless, it doesn't work with VBoxManage controlvm using the command : VBoxManage controlvm "Windows 7" keyboardputscancode 5B 48 C8 DB
where scan code :
5B is Left Windows key pressed
48 is Up key pressed
C8 is Up key released
DB is Left Windows key released
As a result, VBoxManage controlvm produces a simple Up key stroke in the VM.
I get the same result with Right Windows (5C DC) and Application Windows (5D DD) scan codes.
In other hand, a key combination like Shift+t is working with a similar command logic : VBoxManage controlvm "Windows 7" keyboardputscancode 2A 14 94 AA
where scan code :
2A is Shift key pressed
14 is t key pressed
94 is t key released
AA is Shift key released
As a result, VBoxManage controlvm produces a "T"
Other failed test : a simple LWin command (VBoxManage controlvm "Windows 7" keyboardputscancode 5B DB) doesn't produce any visible result,
whereas a manual LWin keystroke produces a Windows menu opening under the VM.
I missed something or is there an issue with VBoxManage controlvm for Windows keystroke sending ?
Thanks for your help !
[VirtualBox 6.1] Issue with VBoxManage controlvm sending Left Windows key combinations
-
fth0
- Volunteer
- Posts: 5690
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: [VirtualBox 6.1] Issue with VBoxManage controlvm sending Left Windows key combinations
... that the keyboard scan code for LWin is E0 5B.Ashtheone wrote:I missed ...
And for the Up key you should use E0 48 (48 is the KP-8 key).
Re: [VirtualBox 6.1] Issue with VBoxManage controlvm sending Left Windows key combinations
Damn god, you're right.
Thanks so much fth0 !
It works now like a charm.
To summarize, VBoxManage controlvm is able to trigger a window maximization, reproducing LWin+Up keystrokes combination as following :
VBoxManage controlvm "myVMName" keyboardputscancode E0 5B E0 48 E0 C8 E0 DB
where scan code :
E0 5B is Left Windows key pressed
E0 48 is Up key pressed
E0 C8 is Up key released
E0 DB is Left Windows key released
Thanks so much fth0 !
It works now like a charm.
To summarize, VBoxManage controlvm is able to trigger a window maximization, reproducing LWin+Up keystrokes combination as following :
VBoxManage controlvm "myVMName" keyboardputscancode E0 5B E0 48 E0 C8 E0 DB
where scan code :
E0 5B is Left Windows key pressed
E0 48 is Up key pressed
E0 C8 is Up key released
E0 DB is Left Windows key released