Registriert seit: 10. Mai 2004
223 Beiträge
|
Re: VkKeyScan
23. Mär 2005, 13:15
so das ist der gesamte code. Ich möchte alle werte welche sich in "Keys" befinden über den tastatur buffer ausgeben.
Delphi-Quellcode:
For I := 0 To Length( Keys ) Do
Begin
lCapitalKeyState := GetKeyState(VK_CAPITAL);
If (( lCapitalKeyState = 1) And (IsCapslockEnabled = False)) Then
Begin
keybd_event( VK_CAPITAL,0, 0, 0 );
keybd_event( VK_CAPITAL,0, KEYEVENTF_KEYUP, 0 );
IsCapslockEnabled := True;
End;
If ( Ord( Keys[I] ) in [65..90] ) Then
Begin
keybd_event( VK_SHIFT,0 , 0, 0 );
End;
lKey := lo( VkKeyScan (Keys[I]) );
keybd_event( lKey, 0, 0, 0 );
Sleep( 5 );
keybd_event( lKey, 0, KEYEVENTF_KEYUP, 0 );
If ( Ord( Keys[I] ) in [65..90] ) Then
Begin
keybd_event( VK_SHIFT,0, KEYEVENTF_KEYUP, 0 );
Application.ProcessMessages;
End;
End;
If (( GetKeyState(VK_CAPITAL) = 0 ) And ( IsCapslockEnabled )) Then
Begin
keybd_event( VK_CAPITAL,0, 0, 0 );
keybd_event( VK_CAPITAL,0, KEYEVENTF_KEYUP, 0 );
End;
|
|
Zitat
|