ma leggi gli input dei tasti come codici ascii o come?
Tramite api!
questa [ una risposta che mi ha dato lintuing su vipers
That has to do with your particular keyboard layout, as far as the mapping between Windows virtual key codes and OEM scan codes, as provided by the function MapVirtualKey.
Basically, your Windows keymapping for your particular international keyboard layout and input method, is saying to translate a Windows Keys.Insert -> OEM numpad0 scancode (probably when NumLock is down).
The sample code I posted is not internationalized -- if you need to specify a particular keyboard layout to use in the mapping, then you have to modify the SendKeyInput method in my sample code that I posted, so that it calls the MapVirtualKeyEx() Windows API function instead of the MapVirtualKey() function. That would also require having another
API declaration in the code to import the MapVirtualKey() function. That function requires an additional parameter where you pass in a handle to a specific keyboard layout, which you have to first retrieve from a call to the Windows API LoadKeyboardLayout() method, etc. I can probably post an internationalized version when I get some time. _________________
Non puoi inserire nuovi Topic in questo forum Non puoi rispondere ai Topic in questo forum Non puoi modificare i tuoi messaggi in questo forum Non puoi cancellare i tuoi messaggi in questo forum Non puoi votare nei sondaggi in questo forum