AltGr key no working with Virtualbox 4.2.x

Must READ:

 

Virtualbox defect

Virtualbox Ticket #2613 (reopened defect)

Host key (ctrl) sometimes gets stuck down in Windows guest

Problem description

  •  Virtualbox  ( Host Windows 7, Guest: OEL 6.3/6.4) the AltGr key is not working.
  • With  xev   2 key codes:  keycode 37 and keycode 108 are returned.

Fix

  • Reboot/restart  Virtualbox

 

Debugging with xev

KeyPress event, serial 33, synthetic NO, window 0x4a00001,
    root 0x107, subw 0x0, time 78168356, (123,62), root:(125,804),
    state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4a00001,
    root 0x107, subw 0x0, time 78168356, (123,62), root:(125,804),
    state 0x4, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XKeysymToKeycode returns keycode: 64
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4a00001,
    root 0x107, subw 0x0, time 78168491, (123,62), root:(125,804),
    state 0x84, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4a00001,
    root 0x107, subw 0x0, time 78168500, (123,62), root:(125,804),
    state 0x80, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XKeysymToKeycode returns keycode: 64
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

Fix 1:
System -> Preferences -> Keyboard -> Keyboard Preferences -> Layout Options -> Key to choose 3.rd level
Select : 
  -> Any Alt Key
  -> Right Alt 

Fix 2: 
 Restart your Virtualbox 

Fix 3 ( not suggested as <ctrl>C is not working  ) :   
# xmodmap -e "remove control = Control_L" 

Check current keyboard layout:
#  cat /etc/sysconfig/keyboard
KEYTABLE="de-latin1"
MODEL="pc105"
LAYOUT="de"
KEYBOARDTYPE="pc"

 

Reference

Leave a Reply

Your email address will not be published. Required fields are marked *