Page 1 of 1
keybd_event_() and German umlauts
Posted: Sun Mar 15, 2009 1:40 pm
by milan1612
I can't find any information related to using keybd_event_() with German umlauts,
especially when not using the German keyboard layout (I got a UK keyboard yesterday).
(There are no virtual key codes for them)
There is the VK_PACKET constant, that allows to send unicode characters,
but I don't know how to use it and if it is appropriate for my problem...
Anybody?
Posted: Sun Mar 15, 2009 2:53 pm
by Kaeru Gaman
.... I would use GetAsyncKeystate and check for the "native" KeyValue ...
I think "[" and "]" are two of them...
Posted: Sun Mar 15, 2009 3:35 pm
by milan1612
Kaeru Gaman wrote:.... I would use GetAsyncKeystate and check for the "native" KeyValue ...
I think "[" and "]" are two of them...
keybd_event() is to send keyboard input, not to retrieve it
As I read that keybd_event is outdated, I tried with the alternative SendInput():
Code: Select all
Procedure SendKey(chr)
Protected Input.INPUT
#KEYEVENTF_UNICODE = 4
RtlZeroMemory_(@input, SizeOf(INPUT))
Input\type = #INPUT_KEYBOARD
Input\ki\wScan = chr
input\ki\dwFlags = #KEYEVENTF_UNICODE
SendInput_(1, @Input, SizeOf(INPUT))
Input\type = #INPUT_KEYBOARD
Input\ki\wScan = chr
Input\ki\dwFlags = #KEYEVENTF_UNICODE | #KEYEVENTF_KEYUP
SendInput_(1, @Input, SizeOf(INPUT))
EndProcedure
And this seems to work with Umlauts

Posted: Sun Mar 15, 2009 3:39 pm
by Kaeru Gaman
keybd_event() is to send keyboard input, not to retrieve it
Oy!

I'm tho thorry...