Jump to content
The simFlight Network Forums

Seeking help with some common event ID's


Recommended Posts

Pete, I'm hoping you can help me.  I've been making some new XML gauges and have looked at many different event lists including the big one provided in the Modules folder for FSUIPC offsets.   I'm stuck on finding the events for the common Alt+Enter (toggle full screen off /on) and for Alt (toggle main menu off / on) keyboard commands.  

Secondly, I'm trying to create gauges for a second instance of "opening doors / exits" (TOGGLE_AIRCRAFT_EXIT) as some large aircraft have a secondary exits function as well several engine starts too.   There is obvioulsy the default engine start (ENGINE_AUTO_START) event for any single engine but I'm wanting to code start ups for the number 2, 3, and 4 engines.  As is, I think they are all "shift +" types of commands so I'm wondering how I might create a workaround to make each of these into a single mouse click gauge.   I've also posted in FSDeveloper but have not gotten a firm answer from anyone yet.    With all of the toggle types the end goal is to use two bitmaps so you can tell when the toggle is active (on) or inactive (off). 

I've also noticed many events are toggles even though they do not actually say toggle like the pause and parking brake events.  I've made gauges for those successfully using FS9 XML and they work great but with others I've gleaned that I need to have a different <value> parameter so any added help or advice on this would also be appreciated.

Thanks for the help and support.

Jeff.

Edited by TheGreyGoose
Link to comment
Share on other sites

2 hours ago, TheGreyGoose said:

have looked at many different event lists including the big one provided in the Modules folder for FSUIPC offsets.

Events and Offsets are two completely different things. FSUIPC calls events "controls" (as they used to be called in older versions of FS). The events list I publish is called "List of FSX and P3D Controls" (or similar for FS9). My documents are in the FSUIPC Documents subfolder of the Modules folder.. The offsets list is a list of address-based variables which can be read or written through FSUIPC. They are neither "controls" nor "events", which are transitory things, messages passed to FS to ask it to do something.

2 hours ago, TheGreyGoose said:

I'm stuck on finding the events for the common Alt+Enter (toggle full screen off /on) and for Alt (toggle main menu off / on) keyboard commands. 

I don't think there are any such events.

2 hours ago, TheGreyGoose said:

Secondly, I'm trying to create gauges for a second instance of "opening doors / exits" (TOGGLE_AIRCRAFT_EXIT) as some large aircraft have a secondary exits function as well several engine starts too.   There is obvioulsy the default engine start (ENGINE_AUTO_START) event for any single engine but I'm wanting to code start ups for the number 2, 3, and 4 engines.

Try putting the number as the parameter for the control.

2 hours ago, TheGreyGoose said:

With all of the toggle types the end goal is to use two bitmaps so you can tell when the toggle is active (on) or inactive (off).

If you want toggles to act like separate on and off switches, best to use the FSUIPC offsets to control them. You can assign buttons and switches to FSUIPC-added controls called "Offset <type of value> Set" to do this. However, you cannot access these from XML.

2 hours ago, TheGreyGoose said:

I've also noticed many events are toggles even though they do not actually say toggle like the pause and parking brake events.

You do need to refer to the list more carefully. There re 4 pause controls -- PAUSE OFF, PAUSE ON, PAUSE TOGGLE and PAUSE SET (the last would take a parameter -- 1 for ON, 0 for OFF).

Parking brakes are better dealt with via the offsets controls I mentioned, though again, not from XML.

Pete

 

Link to comment
Share on other sites

Pete, that was indeed the list I was referring to (List of FSX and P3D Controls)   I was calling events as controls or vice versa I guess.  I call them events because that is what they are called in the code, i.e.   "Click Event =     "  for example.     I assume your list are the same exact ones that are built into FSX and Prepar3D by default except of course where noted with an asterisk which are the Prepar3D v2.0 and higher additions.    Again, I've used many of these controls / events to create some gauges operable via mouse-click rather than just a key press.   As one example below, I made a parking brake toggle and similarly a pause toggle each with two bitmaps.  One indicates when its off and one indicates when it's toggled on.  It works perfectly.   I've made many in the same fashion.

So again, I'm just trying to nail down a few final events and am mainly stuck with the Alt+Enter  / Alt functions.   Surely they have to correspond to something in the list.  The Alt+Enter is a keystroke toggle which takes the sim from windowed mode to full screen and pressing Alt makes the top menu bar appear or disappear so they are both obviously making a single internal command, control, or event in the simulator and therefore should have a corresponding event name in the list.  Regardless, these two are easily some of the most common and most basic functions of the simulator, just like pressing the "P" key on your keyboard toggles the pause function.  I've successfully made over 50 gauges so far using this list and am just stuck on these last few because the naming scheme is not obvious for the Alt+Enter / Alt commands.  I've tried FULL_WINDOW_TOGGLE  which is in the list and I assumed should be the corresponding event for the Alt+Enter key combo but it's not working so far.  I have no idea which one is the Alt (menu toggle) but  SIMUI_WINDOW_HIDESHOW  is the one I tried for that as it seems to be the most likely one.  (and is it SIMU-eye or SIMU-el ? I assume eye as in User Interface)    Below is an example of my Parking Brake toggle. 

 

<Gauge Name="ParkingBrake" Version="1.0">
   <Element>
      <Select>
         <Value>(A:Brake parking position, percent) 50 &gt; </Value>
         <Case Value="0">
            <Image Name="PBRAKEoff_Icon.bmp" ImageSizes="50,50"/>
         </Case>
         <Case Value="1">
            <Image Name="PBRAKEon_Icon.bmp" ImageSizes="50,50"/>
         </Case>
      </Select>
   </Element>
   <Mouse>     
      <Tooltip ID="TOOLTIPTEXT_PARKING_BRAKE"/>
      <Cursor Type="Hand"/>
      <Click Event="PARKING_BRAKES"/>
   </Mouse>
</Gauge>

 

 

Edited by TheGreyGoose
Link to comment
Share on other sites

1 hour ago, TheGreyGoose said:

I assume your list are the same exact ones that are built into FSX and Prepar3D by default except of course where noted with an asterisk which are the Prepar3D v2.0 and higher additions.

In FSUIPC itself, in the drop-down assignment lists, the FS/P3D entries are almost all obtained at run-time directy from the tables in CONTROLS.DLL, a module of FS/P3D. Some older ones are added to the list, as also are a large number of FSUIPC-specific controls (of which there's a list in the FSUIPC Advanced User's guide) and entries for any Macros and Lua files present.

The published list in document form is a static rendition of the list from CONTROLS.DLL and may not reflect the current versions of FSX and P3D at all times -- especially not P3D of course, which is still being developed. I try to remember to update it if I notice any significant additions.

Not all controls are guaranteed to work or even do what they say. I remember some were even named in reverse, wrongly (small vs large increments, for instance), and some date back to FS98 or FS2000 and code for them got dropped in later versions but the controls not deleted from the internal tables -- maybe because their poisitions in the table had numerica significance.

1 hour ago, TheGreyGoose said:

So again, I'm just trying to nail down a few final events and am mainly stuck with the Alt+Enter  / Alt functions.   Surely they have to correspond to something in the list.  The Alt+Enter is a keystroke toggle which takes the sim from windowed mode to full screen and pressing Alt makes the top menu bar appear or disappear so they are both obviously making a single internal command, control, or event in the simulator and therefore should have a corresponding event name in the list

Sorry, but that is an assumption which isn't necessarily true. The ALT key is probably detected directly, not via code detecting it and looking it up in a table then sending the relevant event.  Don't forget it is a standard Windows Menu function for ALT+ some letter to automatically select a menu item with that letter designated as its shortcut. This applies in FS just as much as in other programs featuring a standard Windows menu setup.

1 hour ago, TheGreyGoose said:

I've tried FULL_WINDOW_TOGGLE  which is in the list and I assumed should be the corresponding event for the Alt+Enter key combo but it's not working so far.

Yes, it doesn't appear to do anything. Maybe they were thinking about making it assignable, but that idea fell by the wayside.

1 hour ago, TheGreyGoose said:

Below is an example of my Parking Brake toggle. 

Right. Using A:values in the XML is similar to using offsets in FSUIPC. Can you not write to them also? If so you could implement a Parking Brake On and Parking Brake Off, as you can with FSUIPC offsets.

Pete

 

Link to comment
Share on other sites

Ok thanks.  In addition to exploring the A:value options do you maybe have any other suggestions or options I might try to go about making those two common keystrokes of Alt+Enter and Alt into gauges which effect their functions of toggling the sim from window mode to fullscreen and toggling off and on the main menu?  I assume if this could be done via FSUIPC or via keystroke then there has to be some way to do it via mouse-click too.  I'm also wondering if there's a way to make a mouse-click follow a keystroke command rather than the event.  Maybe that's a potential workaround?

Also, any suggestions on the engine start question?  I wasn't sure what exactly you meant by "Try putting the number as the parameter for the control. "

Edited by TheGreyGoose
Link to comment
Share on other sites

8 hours ago, TheGreyGoose said:

do you maybe have any other suggestions or options I might try to go about making those two common keystrokes of Alt+Enter and Alt into gauges which effect their functions of toggling the sim from window mode to fullscreen and toggling off and on the main menu?

Sending the keystrokes from a separately running thread or process works, but using ALT in any FSUIPC assignments doesn't work consistently well. As soon as ALT is sent the keyboard input transfers to Windows' menu system. The only really wworable way of doing it with FSUIPC is to send the keystrokes from a Lua plug-in. They run in their own threads so can continue when the keyboard focus disappears from the main foreground thread.

I do not know of any way of doing it whilst withing the main FS thread, sorry. You'd need a Lua plug-in or a separate process outside of FS, even to interpret mouse clicks and send as ALT combinations.

8 hours ago, TheGreyGoose said:

Also, any suggestions on the engine start question?  I wasn't sure what exactly you meant by "Try putting the number as the parameter for the control. "

Many of the "events" take a parameter. To start with, all of those named with "SET" at the end -- those SET the parameter as the value identified. This is how Axis events work, for example, for aileron, elevator, rudder, brakes, throttle, mixture and prop pitch. In the case of an event such as the aircraft exits and engine selection the parameter would identify which one.

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.