Some additional information... Here is the output of xev when keys are working (first is the Enter key, then 5 small Serbian letters): KeyPress event, serial 37, synthetic NO, window 0x5200001, root 0xbf, subw 0x0, time 155013091, (116,-55), root:(1651,998), state 0x10, keycode 36 (keysym 0xff0d, Return), same_screen YES, " XLookupString gives 1 bytes: (0d) " " XmbLookupString gives 1 bytes: (0d) " XFilterEvent returns: False KeyRelease event, serial 37, synthetic NO, window 0x5200001, root 0xbf, subw 0x0, time 155013187, (116,-55), root:(1651,998), state 0x10, keycode 36 (keysym 0xff0d, Return), same_screen YES, " XLookupString gives 1 bytes: (0d) " XFilterEvent returns: False MappingNotify event, serial 37, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 93, count 1 MappingNotify event, serial 37, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 93, count 1 MappingNotify event, serial 37, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 93, count 1 MappingNotify event, serial 37, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 93, count 1 MappingNotify event, serial 37, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 93, count 1 MappingNotify event, serial 37, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 93, count 1 MappingNotify event, serial 37, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 93, count 1 MappingNotify event, serial 37, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 93, count 1 MappingNotify event, serial 37, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 93, count 1 KeyPress event, serial 46, synthetic NO, window 0x5200001, root 0xbf, subw 0x0, time 155021453, (116,-55), root:(1651,998), state 0x10, keycode 93 (keysym 0x1b9, scaron), same_screen YES, XLookupString gives 2 bytes: (c5 a1) "š" XmbLookupString gives 2 bytes: (c5 a1) "š" XFilterEvent returns: False KeyRelease event, serial 46, synthetic NO, window 0x5200001, root 0xbf, subw 0x0, time 155021527, (116,-55), root:(1651,998), state 0x10, keycode 93 (keysym 0x1b9, scaron), same_screen YES, XLookupString gives 2 bytes: (c5 a1) "š" XFilterEvent returns: False MappingNotify event, serial 46, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 97, count 1 MappingNotify event, serial 46, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 97, count 1 MappingNotify event, serial 46, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 97, count 1 MappingNotify event, serial 46, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 97, count 1 MappingNotify event, serial 46, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 97, count 1 MappingNotify event, serial 46, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 97, count 1 MappingNotify event, serial 46, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 97, count 1 MappingNotify event, serial 46, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 97, count 1 MappingNotify event, serial 46, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 97, count 1 KeyPress event, serial 55, synthetic NO, window 0x5200001, root 0xbf, subw 0x0, time 155023242, (116,-55), root:(1651,998), state 0x10, keycode 97 (keysym 0x1f0, dstroke), same_screen YES, XLookupString gives 2 bytes: (c4 91) "đ" XmbLookupString gives 2 bytes: (c4 91) "đ" XFilterEvent returns: False KeyRelease event, serial 55, synthetic NO, window 0x5200001, root 0xbf, subw 0x0, time 155023309, (116,-55), root:(1651,998), state 0x10, keycode 97 (keysym 0x1f0, dstroke), same_screen YES, XLookupString gives 2 bytes: (c4 91) "đ" XFilterEvent returns: False MappingNotify event, serial 55, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 103, count 1 MappingNotify event, serial 55, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 103, count 1 MappingNotify event, serial 55, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 103, count 1 MappingNotify event, serial 55, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 103, count 1 MappingNotify event, serial 55, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 103, count 1 MappingNotify event, serial 55, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 103, count 1 MappingNotify event, serial 55, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 103, count 1 MappingNotify event, serial 55, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 103, count 1 MappingNotify event, serial 55, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 103, count 1 KeyPress event, serial 64, synthetic NO, window 0x5200001, root 0xbf, subw 0x0, time 155025180, (116,-55), root:(1651,998), state 0x10, keycode 103 (keysym 0x1be, zcaron), same_screen YES, XLookupString gives 2 bytes: (c5 be) "ž" XmbLookupString gives 2 bytes: (c5 be) "ž" XFilterEvent returns: False KeyRelease event, serial 64, synthetic NO, window 0x5200001, root 0xbf, subw 0x0, time 155025242, (116,-55), root:(1651,998), state 0x10, keycode 103 (keysym 0x1be, zcaron), same_screen YES, XLookupString gives 2 bytes: (c5 be) "ž" XFilterEvent returns: False MappingNotify event, serial 64, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 120, count 1 MappingNotify event, serial 64, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 120, count 1 MappingNotify event, serial 64, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 120, count 1 MappingNotify event, serial 64, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 120, count 1 MappingNotify event, serial 64, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 120, count 1 MappingNotify event, serial 64, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 120, count 1 MappingNotify event, serial 64, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 120, count 1 MappingNotify event, serial 64, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 120, count 1 MappingNotify event, serial 64, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 120, count 1 KeyPress event, serial 73, synthetic NO, window 0x5200001, root 0xbf, subw 0x0, time 155026373, (116,-55), root:(1651,998), state 0x10, keycode 120 (keysym 0x1e8, ccaron), same_screen YES, XLookupString gives 2 bytes: (c4 8d) "č" XmbLookupString gives 2 bytes: (c4 8d) "č" XFilterEvent returns: False KeyRelease event, serial 73, synthetic NO, window 0x5200001, root 0xbf, subw 0x0, time 155026434, (116,-55), root:(1651,998), state 0x10, keycode 120 (keysym 0x1e8, ccaron), same_screen YES, XLookupString gives 2 bytes: (c4 8d) "č" XFilterEvent returns: False MappingNotify event, serial 73, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 132, count 1 MappingNotify event, serial 73, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 132, count 1 MappingNotify event, serial 73, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 132, count 1 MappingNotify event, serial 73, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 132, count 1 MappingNotify event, serial 73, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 132, count 1 MappingNotify event, serial 73, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 132, count 1 MappingNotify event, serial 73, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 132, count 1 MappingNotify event, serial 73, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 132, count 1 MappingNotify event, serial 73, synthetic NO, window 0x0, request MappingKeyboard, first_keycode 132, count 1 KeyPress event, serial 82, synthetic NO, window 0x5200001, root 0xbf, subw 0x0, time 155027528, (116,-55), root:(1651,998), state 0x10, keycode 132 (keysym 0x1e6, cacute), same_screen YES, XLookupString gives 2 bytes: (c4 87) "ć" XmbLookupString gives 2 bytes: (c4 87) "ć" XFilterEvent returns: False KeyRelease event, serial 82, synthetic NO, window 0x5200001, root 0xbf, subw 0x0, time 155027591, (116,-55), root:(1651,998), state 0x10, keycode 132 (keysym 0x1e6, cacute), same_screen YES, XLookupString gives 2 bytes: (c4 87) "ć" XFilterEvent returns: False