Page 1 of 1

International Keyboard problem under Linux Guest

Posted: 26. Oct 2009, 15:33
by jnifoo
Under Virtualbox 3.0.8, I have installed the last RC of Ubuntu Karmic Koala with a Snow Leopard Host under a Macbook Pro (jun 2009) and I encountered a compatibility problem with the keyboard layout.

Under Linux's Guest OS, I use for the Keyboard Model : "Apple" or "Apple Laptop", and the "France Apple-Macintosh" layout. This work perfectly with a special compatibility option activated under Hardy Heron (Ubuntu 8.04).
Unfortunately, since Ubuntu 9.04, the linux kernel have received some fixes and the option disappeared under the keyboards layout options.

This option, called "Swap keycodes of two keys when Mac keyboards are misdetected by kernel" correct the problem with the inverted keys "@#" and "<>".
Here is the info I find under Ubuntu Documentation :
https://help.ubuntu.com/community/AppleKeyboard
Correcting the two swapped keys for international (non-US) keyboards
This section describe how to fix the issue related to the swapped key when using international keyboard. (See #214786)
Ubuntu 9.04 (Jaunty Jakalope)
Need to confirm if the problem persist as there is modification done in the kernel to fix the problem.
Ubuntu 8.10 (Intrepid Ibex)
1. Open the 'System->Preferences->Keyboard' dialog 2. Choose the 'Layouts' tab 3. Press 'Layout Options...' 4. Navigate to 'Miscellaneous compatibility options' 5. Enable the option: Swap keycodes of two keys when Mac keyboards are misdetected by kernel.


followed by this information:
Mapping keys (Insert, Alt, Cmd, etc.)
Ubuntu 9.04 (Jaunty Jakalope)
Since Xmodmap have been replace by X Keyboard Extension, it's impossible to use Xmodmap to proceed with the mapping. Configuration can be done using the Keyboard preference tool.
Is there any chance that we could have a solution under the Guest Additions drivers to help correct this problem ?
Any solution to fix it under Virtualbox ?

Re: International Keyboard problem under Linux Guest

Posted: 26. Oct 2009, 16:13
by jnifoo
Finally, the xmodmap seems to work even in the Ubuntu 9.10 RC.
So swapping keys when the option "Swap keycodes of two keys when Mac keyboards are misdetected by kernel" I use under Ubuntu 8.04, has a solution.

For a French Keyboard Layout under a MacBook Pro with Snow Leopard as Host and Ubuntu Linux 9.10 RC, I use from the command line:

Code: Select all

xmodmap -e "keycode 94 = at numbersign"
xmodmap -e "keycode 49 = less greater less greater"


If needed, you can make an executable file, and ad it to your session application startup :

Code: Select all

#!/bin/sh -e
xmodmap -e "keycode 94 = at numbersign"
xmodmap -e "keycode 49 = less greater less greater"
exit 0

Re: International Keyboard problem under Linux Guest

Posted: 28. Jul 2010, 11:20
by bolet
Merci beaucoup ! It works great :)