Jump to content
The simFlight Network Forums

Keystrokes...


Recommended Posts

I tryed to use FSUIPC facility to send WM_KEYUP/WM_KEYDOWN messages. Unfortunally, I didn't find how to use control keys like "Alt" or "Ctrl" alone or with other keys...

You have to emulate what actually happens with those messages when the real keys are pressed. You send a sequence of KEYDOWNs, then a series of KEYUPs. If you have a message Spy program like the Spy++ which comes with MSVC++ then watch the Keyboard messages arriving in any program which you press combinations.

Pete

Link to comment
Share on other sites

I can't assign a button to bring up the Flight Planner while in flight. This is now necessary to get a clearance while in the air.

I tried assigning Alt+F on keypress and P on release and that didn't work if assigned to one of the PFC Avionic PAnel buttons. It pauses FS and shows the first dropdown menu but no further.

Is there a way to bring up the flight planner without pausing the flight also?

Link to comment
Share on other sites

I tried assigning Alt+F on keypress and P on release and that didn't work if assigned to one of the PFC Avionic Panel buttons. It pauses FS and shows the first dropdown menu but no further.

That's because by the time the key is released both PFC and FSUIPC aren't running -- opening a menu basically suspends everything else.

Once you get into the Planning menu don't you need to use the keyboard in any case? If so, then surely pressing "P" first wouldn't be so bad.

If you want to get the button to do it you'll have to program multiple key operations on the Press, not separate them with Press and Release. That should ensure they keystrokes all get sent before the menu is opened. To do that you have to edit the FSUIPC.INI file, as discussed in the FSUIPC Advanced Users Guide.

Is there a way to bring up the flight planner without pausing the flight also?

If it's a menu-accessible dialogue then, no, I shouldn't think so. All of FS's dialogue windows are modal. Even the map, which is daft when you think about it.

Regards,

Pete

Link to comment
Share on other sites

I need to send ALT key down message (to open FS menu). It is a WM_SYSKEYDOWN message and the documentation only talk about WM_KEYDOWN and WM_KEYUP.

I tryed to replace WM_KEYDOWN by WM_SYSKEYDOWN and set the key code and key mask but it doesn't work...

Link to comment
Share on other sites

I need to send ALT key down message (to open FS menu). It is a WM_SYSKEYDOWN message and the documentation only talk about WM_KEYDOWN and WM_KEYUP.

I tryed to replace WM_KEYDOWN by WM_SYSKEYDOWN and set the key code and key mask but it doesn't work...

I'm sorry, the FSUIPC implementation doesn't provide support for the SYSKEYDOWN message. Did you try sending a WM_KEYDOWN with the VK_MENU virtual key code?

I don't actually send WM_ messages at all internaly -- that doesn't actually work properly, it doesn't generate correct sequences that are recognised by applications. I use the "SendInput" API in Windows, which only provides KEYDOWN and KEYUP emulation.

Can you tell me a bit more about what you are trying to do? You do realize I suppose that once the menu is opened FSUIPC is no longer able to do very much? Why would you want to open an FS menu from another program?

In Version 3.07 of FSUIPC, which I am hoping to release tomorrow, I provide new facilties for "imaginary" joystick buttons to be operated through the FSUIPC interface. These aren't buttons to be seen by FS, but to be programmed in FSUIPC's buttons pages. Maybe something there will be more suitable? I can provide details, in advance of the SDK, if this is of interest.

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.