Jump to content
The simFlight Network Forums

Launching Events like "Gear Up", etc.


Recommended Posts

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

post-11621-128689150144_thumb.gif

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.