impossible to remap keys on japanese keyboard

murdoch gabbay bellissimogiorno at gmail.com
Sun Oct 22 01:56:23 PDT 2006


Dear Xorg,

The following bug appears in Ubuntu 6.06 and 6.10 but not 5.10.  It
also appears in recent releases of Redhat, but not of SuSE.  I can
only suppose it's a problem to do with recent versions of xorg.

I'm using a japanese laptop with a japanese keyboard.  xmodmap seems
ineffective and does not properly remap some keys, though it is fine
with others.

For years I have mapped

Hiragana_Katakana keysym 0xff27 keycode 208
to Shift_R

and

backslash keysym 0x5c keycode 211 XKeysymToKeycode returns keycode 51
to
Pointer_Button1

Here are extracts from the relevant xmodmap file:

keycode 208 = Shift_R
! Hiragana_katakana Romanji
keycode 211 = Pointer_Button1
!backslash underscore kana_RO

This has worked fine in the past --- but suddenly with my upgrade to
more modern linux systems, it doesn't.  I push the keys --- nothing
happens.  For example if I hold down the key marked
'Hiragana_katakana' and press the key marked 'c', I get a lowercase c
where previously I got an uppercase C.

xev seems aware of the changes made by xmodmap even if I don't get the
results I want when I press keys.  Here is a copy of xev output before
an xmodmap:

KeyPress event, serial 31, synthetic NO, window 0x2800001,
    root 0x45, subw 0x0, time 1834185467, (121,49), root:(732,493),
    state 0x0, keycode 211 (keysym 0x5c, backslash), same_screen YES,
    XKeysymToKeycode returns keycode: 51
    XLookupString gives 1 bytes: (5c) "\"
    XmbLookupString gives 1 bytes: (5c) "\"
    XFilterEvent returns: False

KeyRelease event, serial 31, synthetic NO, window 0x2800001,
    root 0x45, subw 0x0, time 1834185467, (121,49), root:(732,493),
    state 0x0, keycode 211 (keysym 0x5c, backslash), same_screen YES,
    XKeysymToKeycode returns keycode: 51
    XLookupString gives 1 bytes: (5c) "\"
    XFilterEvent returns: False

KeyPress event, serial 31, synthetic NO, window 0x2800001,
    root 0x45, subw 0x0, time 1834186317, (121,49), root:(732,493),
    state 0x0, keycode 208 (keysym 0xff27, Hiragana_Katakana), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 31, synthetic NO, window 0x2800001,
    root 0x45, subw 0x0, time 1834186317, (121,49), root:(732,493),
    state 0x0, keycode 208 (keysym 0xff27, Hiragana_Katakana), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 31, synthetic NO, window 0x2800001,
    root 0x45, subw 0x0, time 1834209536, (121,49), root:(732,493),
    state 0x0, keycode 208 (keysym 0xff27, Hiragana_Katakana), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 31, synthetic NO, window 0x2800001,
    root 0x45, subw 0x0, time 1834209536, (121,49), root:(732,493),
    state 0x0, keycode 208 (keysym 0xff27, Hiragana_Katakana), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 31, synthetic NO, window 0x2800001,
    root 0x45, subw 0x0, time 1834210110, (121,49), root:(732,493),
    state 0x0, keycode 211 (keysym 0x5c, backslash), same_screen YES,
    XKeysymToKeycode returns keycode: 51
    XLookupString gives 1 bytes: (5c) "\"
    XmbLookupString gives 1 bytes: (5c) "\"
    XFilterEvent returns: False

KeyRelease event, serial 31, synthetic NO, window 0x2800001,
    root 0x45, subw 0x0, time 1834210110, (121,49), root:(732,493),
    state 0x0, keycode 211 (keysym 0x5c, backslash), same_screen YES,
    XKeysymToKeycode returns keycode: 51
    XLookupString gives 1 bytes: (5c) "\"
    XFilterEvent returns: False

**********************************************************************************************

Here is a copy of xev output after an xmodmap:

KeyPress event, serial 28, synthetic NO, window 0x2800001,
    root 0x45, subw 0x0, time 1834365954, (156,112), root:(767,556),
    state 0x0, keycode 211 (keysym 0xfee9, Pointer_Button1), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x2800001,
    root 0x45, subw 0x0, time 1834365954, (156,112), root:(767,556),
    state 0x0, keycode 211 (keysym 0xfee9, Pointer_Button1), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 31, synthetic NO, window 0x2800001,
    root 0x45, subw 0x0, time 1834366343, (156,112), root:(767,556),
    state 0x0, keycode 208 (keysym 0xffe2, Shift_R), same_screen YES,
    XKeysymToKeycode returns keycode: 116
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 31, synthetic NO, window 0x2800001,
    root 0x45, subw 0x0, time 1834366343, (156,112), root:(767,556),
    state 0x1, keycode 208 (keysym 0xffe2, Shift_R), same_screen YES,
    XKeysymToKeycode returns keycode: 116
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

**************************************************************************************

I note that both keys have keyboard autorepeat enabled.  Attempts to
switch that off with

xset -r 208
xset -r 211

fail.  Other keys that work fine, such as

Shift_L bound to keycode 64 and button 3 bound to keycode 62

and they do not autorepeat.

Does anybody have any idea what's going on, and what I can do about it?

Bellissimogiorno.



More information about the xorg mailing list