1
Hello, I’m having trouble sending the keystroke in a game,
I’m using Delphi, I tested functions like:
SendMessage(hdle_do_game, WM_KEYDOWN , ord('a'), 0);
keybd_event(65,0,0,0);
SendMessage(hdle_do_game, WM_CHAR, ord('a'), 0);
and the game simply does not recognize in its interface, only in chatbox areas, however, the windows virtual keyboard works throughout the game
any suggestions? Grateful!
Good afternoon Daniel, try using keybd_event('Ord'), 0, KEYEVENTF_UNICODE, 0);
– Pablo Harger
Thanks for the comment Pablo, I am using version 7 of Delphi, here was not declared the constant KEYEVENTF_UNICODE, but I noticed in internet routines that is equivalent to 4. So I started testing these parameters, to my surprise, I made a loop from 0 to 255, sending the instruction like this: keybd_event(1,i,1,0); the result was that the game reconhceu the keys I need, but it does not correspond to ASCII, it even makes sense since the game was developed in Coreia, I’ll try to find the Keys I need now...thanks for solving my problem
– Daniel