Using the Same Keybord Layout of the Host in the Guest OS
Using the Same Keybord Layout of the Host in the Guest OS
I'm using Virtualbox 4.1.12 on Debian x64 and my host OS is Windows XP Professional 64-bit.
On Debian I'm using a custom keyboard layout that I set on system startup through setxkbmap.
I've already successfully installed the guest addictions.
I would like to use the same keyboard layout of the host in the guest OS.
How can I do?
On Debian I'm using a custom keyboard layout that I set on system startup through setxkbmap.
I've already successfully installed the guest addictions.
I would like to use the same keyboard layout of the host in the guest OS.
How can I do?
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: Using the Same Keybord Layout of the Host in the Guest O
That is not really a VirtualBox question, it's a question of correctly configuring Windows. You need to select the correct keyboard layout inside the guest. See the guests Control Panel, Keyboard. Other guests should have similar configuration features.
I am not promising that the correct keyboard layout is available, also note that creating custom keyboard layouts for Windows is beyond the scope of these forums.
I am not promising that the correct keyboard layout is available, also note that creating custom keyboard layouts for Windows is beyond the scope of these forums.
Re: Using the Same Keybord Layout of the Host in the Guest O
Are you saying that if I use a custom keyboard layout in the host is should appear somewhere in the guest configurations (Windows control panel in this case)? Or Do have I necessarily to recreate that layout on the guest?mpack wrote:You need to select the correct keyboard layout inside the guest. See the guests Control Panel, Keyboard. Other guests should have similar configuration features.
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: Using the Same Keybord Layout of the Host in the Guest O
I'm saying that the guest has its own (virtual) keyboard, and it's own mapping from scancodes --> characters. The mapping used by the host is not relevant to the guest, any more than it would be relevant to a second physical PC. Usually however the correct mapping is dictated by the markings on the keytops, so host and guest will normally use similar though independant mappings.
Re: Using the Same Keybord Layout of the Host in the Guest O
Ok, thanks for your help. So at the end I understand I have to recreate my custom layout in the guest OS... if I'm wrong correct me.
Re: Using the Same Keybord Layout of the Host in the Guest O
Today I've installed a Linux guest (another Debian x64) and I noticed that the guest immediately recognized and used my custom keyboard layout... so why on Windows guests it does not happen??? ...I think this is a VirtualBox question and not an OS one, since I have different behaviors with different guests and that's strange.
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: Using the Same Keybord Layout of the Host in the Guest O
Sorry, I don't know what you are seeing, but AFAIK, what I said above is accurate.
Re: Using the Same Keybord Layout of the Host in the Guest O
mpack, I wouldn't like to bother you, however I've also just tried the combination Debian x64 (host) and Fedora 17 (guest) and it worked as well... Fedora automatically detected my keyboard layout... I really don't get it, how can it be that it works fine for Linux guests and it doesn't for Windows?
Thanks for your patience.
Thanks for your patience.
-
michaln
- Oracle Corporation
- Posts: 2973
- Joined: 19. Dec 2007, 15:45
- Primary OS: MS Windows 7
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Any and all
- Contact:
Re: Using the Same Keybord Layout of the Host in the Guest O
Linux doesn't detect the keyboard layout. You tell it what it is. So when you first installed your Linux VM, which keyboard layout did you select?
Re: Using the Same Keybord Layout of the Host in the Guest O
michaln thanks for help.
In my host OS (Debian) I use a custom version of the UK Layout (I remapped the modifiers... for example I've the CapsLock key remapped to Escape).
When I install a new Linux guest I only select the UK layout.... however all my customizations to modifier keys are automatically detected as well, in fact if I test them with the xev command and I press for example CapsLock it is actually Escape.
In my host OS (Debian) I use a custom version of the UK Layout (I remapped the modifiers... for example I've the CapsLock key remapped to Escape).
When I install a new Linux guest I only select the UK layout.... however all my customizations to modifier keys are automatically detected as well, in fact if I test them with the xev command and I press for example CapsLock it is actually Escape.
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: Using the Same Keybord Layout of the Host in the Guest O
Is this special keyboard? If the keyboard scancodes were configurable in hardware then its possible that a guest would be affected by the configuration. But in that case the Windows guest would have seen the same scancodes.
Did you have Guest Additions installed in all the guests you are comparing?
Did you have Guest Additions installed in all the guests you are comparing?
-
michaln
- Oracle Corporation
- Posts: 2973
- Joined: 19. Dec 2007, 15:45
- Primary OS: MS Windows 7
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Any and all
- Contact:
Re: Using the Same Keybord Layout of the Host in the Guest O
Why would that make any difference? There's nothing the GAs do to keyboard input.mpack wrote:Did you have Guest Additions installed in all the guests you are comparing?
Re: Using the Same Keybord Layout of the Host in the Guest O
Thanks!!! I reinstalled the guest addictions on Windows XP and I seems like It automatically uses my layout now! Probably Something has gone wrong the first time I installed them.mpack wrote:Did you have Guest Additions installed in all the guests you are comparing?
Re: Using the Same Keybord Layout of the Host in the Guest O
I don't know what GA exactly do in... but reinstalling them worked for me.michaln wrote:Why would that make any difference? There's nothing the GAs do to keyboard input.mpack wrote:Did you have Guest Additions installed in all the guests you are comparing?
Anyway all this discussion made me doubt... if I didn't misunderstand you are saying that VirtualBox has nothing to do with keyboard layouts at all... but now my modifiers key are correctly detected on all my guests.
So is my current situation really abnormal? Or better: According to you if I press a remapped key is it not possible that now I've the same behavior in both my host and guest os? Because if so, I don't know if that's a VirtualBox bug or if it is a problem somewhere in my computer.