I was having a mysterious problem with my Japanese 106 keyboard in World of Warcraft. The keyboard worked just fine when logging into the game or typing messages in game, etc. However, using the macro keys for the quickbar (1 2 3 ... 0) each of the keys was off by one. The keys were mapped as:
1 = 1 2 = 1 3 = 2 4 = 3 5 = 4 ...
Notice that the 1 and 2 key both mapped to one, and every key after that maps to the previous key. This only occured for the top keyboard row and text input fields all worked correctly (which was the mysterious part).
Anyways, I tracked down the problem to the keyboard layout for jp106 in the x11drv/keyboard.c. For Japanese keyboards, the first printable character on the keyboard is '1' (as the shown in the main_key_JA_jp106[MAIN_LEN][4] array). However, the jp106 keyboard is defined to use the regular qwerty scan and vkey maps, which seem to define the first key as OEM, not '1'. I believe this was causing my off-by-one key problem, so created a new jp106 qwerty scan and vkey map to fix the problem. I have tested the patch with World of Warcraft, and indeed my keys are now all mapped correctly. I am not familiar with the keyboard stuff too much, so let me know if there are any problems with the patch, otherwise please commit it.
I also created a bug for this, and attached the patch there as well: http://bugs.winehq.org/show_bug.cgi?id=2832