dinput: the DIK_ keycode is not the same as the scancode.
wine-devel at kievinfo.com
Mon Jul 28 21:11:50 CDT 2008
Aric Stewart wrote:
> It is mapped with the keyboard mapping to the resulting character. so
> the key 'A' is DIK_A nomatter what its scancode or vkey would be. This
> is relevent to Japanese keymapping where the '@' key is in the '['
> location the scancode for both is 0x22 but dinput generates DIK_AT in
> japanese and DIK_LBRACKET in us_qwerty
> reworked to remove the giant case statement and hopefully be more clear.
> remove japan specific stuff as with the proper keyboard scancodes it
> works out.
I'm still not clear why do you need to translate the v_key into char? This
involves a round trip to the X server for each key press.
Besides this will depend on the state of the num-lock, shift, etc. Which
should not be the case for dinput. It should always return the same code for
the key regardless of anything else.
More information about the wine-devel