[Solved] Set keyboard layout BEFORE starting VM

This is for discussing general topics about how to use VirtualBox.
Post Reply
jlgarnier
Posts: 3
Joined: 25. Mar 2021, 18:03

[Solved] Set keyboard layout BEFORE starting VM

Post by jlgarnier »

Hi Community,

I'm new to Virtualbox and stumbled rapidly on my first issue. The app is running on my Win10 machine, which has a French keyboard layout. I've created my first VM (Kali Linux) and started it, reached the login prompt and found out that the keyboard layout used by the VM is English. Obviously difficult to enter any password with the wrong layout...

My question is: is there any way to set the keyboard layout up before starting the VM, so I can use my French keyboard with confidence? I mean: select layout=FR as the VM default config, not in the guest OS once it's started... I haven't find any setting for this nor in the forum posts.

Thanks in advance for any help!
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Set keyboard layout BEFORE starting VM

Post by scottgus1 »

jlgarnier wrote:is there any way to set the keyboard layout up before starting the VM
No, Virtualbox doesn't have control over the keyboard layout, it only passes key codes, which are the same regardless of chosen layout.

The keyboard layout is controlled by the OS installed in the VM. Most modern OS's have a page during installation where the keyboard layout can be picked for that OS.
jlgarnier
Posts: 3
Joined: 25. Mar 2021, 18:03

Re: Set keyboard layout BEFORE starting VM

Post by jlgarnier »

Thanks for the quick answer@scottgus1! I'm then left with running the VM for the first time once with a weird layout then change the locale to get my French layout back...
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: [Solved] Set keyboard layout BEFORE starting VM

Post by fth0 »

Just in case you don't know: The default kali password could be kqli in your case. ;)
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: [Solved] Set keyboard layout BEFORE starting VM

Post by scottgus1 »

jlgarnier wrote:I'm then left with running the VM for the first time once with a weird layout then change the locale to get my French layout back...
If you change the layout during the installation of the OS when it asks (if Kali asks...*), then you might be able to navigate with the mouse or arrow keys & Tab and Enter, which might be the same in all language keyboard layouts.

This issue will arise when installing a certain language's OS with another language's keyboard on any PC, not just Virtualbox. Windows 10 has the same issue and the same solution: use the keyboard layout page during installation to set the OS to the existing keyboard type. Only arrow keys, Enter, and mouse are needed to do this.

( * if Kali does not ask, then that sounds like a shortsighted situation on their part, not programming for an international audience. The you would have to complete the installation and edit the keyboard layout after the OS is installed. Again, this is not something Virtualbox can control.)
jlgarnier
Posts: 3
Joined: 25. Mar 2021, 18:03

Re: [Solved] Set keyboard layout BEFORE starting VM

Post by jlgarnier »

Thanks for the details, this is just what I thought! Thanks for helping!
Post Reply