peix Posted May 18, 2005 Report Posted May 18, 2005 Hi, I need to launch the FS event "Gear Up (or Down)" via WideClient (like pressing G Key in FS). The best solution I found is configure in WideClient.ini the options SendKeyPresses=yes and Buttons simulating Joystick. The problem is that my delphi application (that controls own hardware) needs to simulate the key press. I tryed to send a windows message to WideClient [i.e.: SendMessage(WideClientHandle,WM_KEYDOWN,VK_G,0)] but didn't work., only works pressing the real keyboard. Anybody knows how to solve this problem? or another solution. Thanks a lot. Peix
Pete Dowson Posted May 19, 2005 Report Posted May 19, 2005 I need to launch the FS event "Gear Up (or Down)" via WideClient (like pressing G Key in FS). The best solution I found is configure in WideClient.ini the options SendKeyPresses=yes and Buttons simulating Joystick. The problem is that my delphi application (that controls own hardware) needs to simulate the key press. From a program all you need to do is send the appropriate FS control via FSUIPC offset 3110. Don't use keystrokes. If you really want to send keystrokes to FS use FSUIPC offset 3200, but it is rarely needed -- controls are more reliable and more efficient. Simulating proper keystrokes in Windows needs more details than merely sending WM_KEYDOWN messages. You have to include other information in the messages and you have to have a following KEYUP or risk stuck keys. It really isn't worth the hassle and it is not needed. Try the facilities provided. If you really must use keystrokes, then program them fully and use the "ButtonKeys" facility to operate one of the free virtual buttons in FSUIPC, then program that button, in the FSUIPC buttons option, to action your control. This is designed for those using Hagstrom keyboard encoders, not someone writing an interface program, so it is a rather roundabout method in any case. Regards, Pete
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now