DirectInput -> Keyboard -> GetDeviceState

Arjen Nienhuis arjen at BleHQ.org
Sun Feb 24 08:21:10 CST 2002


> Well, better. I still think it might be better to make MapVirtualKey
> handle codes above 0x80 itself, but I'm not sure.
> 

I don't think so. That is like extending the Windows API for our own 
use. Isn't that what Microsoft is hated for?

> By the way, the problems we have with MapVirtualKey not having an
> one-to-one mapping might be solved by implementing map mode 3 (see
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/keybinpt_0hfd.asp).
> 
I don't know what mode 3 returns, as I have only win9x, but the only 
difference in the documentation is "that distinguishes between left- and 
right-hand keys". I can't imagine that solves anything.

> 
>>+   MapVirtualKey returns the wrong values for the numpad,
>>+   so those are here also.
>>
> 
> This probably depends on the Num Lock state, or it's a Wine bug. But
> perhaps this might also be fixed if we used map mode 3?
Argh! It does depend on the Num Lock state. So, it can check for the Num 
Lock state, and use different VK_ values, or it should not use 
GetAsyncKeyState at all.

An other, minor problem is, that DIK_POWER & co. officialy have no VK at 
all, so they also can not be seen with GetAsyncKeyState.

Isn't there an easy way to see what physical buttons are pressed?






More information about the wine-devel mailing list