Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi,

I want to send keystrokes from my app to FS, and I think this is the offset I need, but I'm unsure how to use it?

Any VB/C# examples would be much appreciated!

Best regards,

Robin.

Posted

I want to send keystrokes from my app to FS, and I think this is the offset I need, but I'm unsure how to use it?

These assume you know how to send or process Keyboard messages in your Windows Procedure (wndproc) -- they just provide you with the choice of sending a WM_KEYDOWN or WM_KEYUP message, with parameters defining the key pressed and its properties. To work out what they are you need Windows programming reference documentation.

The far easier way is to send the FSUIPC control to ask it to send a keystroke, using offset 3110. The appropriate FSUIPC control is listed in the Advance User's Guide -- see numbers 1070, 1071 and 1072. The keycodes and shift codes you need are also listed in that document. You can test these controls out in FSUIPC's Buttons dialogue -- just try assigning a joystick button to them and see what they do.

If you are only sending keystrokes to operate FS's own facilities you would be better off using the FS controls instead, again via offset 3110. Sending a keystroke to FS makes it look it up in its keyboard tables to see what FS control the user has assigned, and then it sends that to itself. You might as well bypass all the first part. Of course, if you are sending keystrokes to an add-on which doesn't respond to controls, then maybe you've no option.

Regards

Pete

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.