• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Gauge "soft" keys access

Messages
71
Country
norway
Hi,


I am trying to access "soft" keys on a gauge for an user aircraft.

The gauge has no Lvars for the "soft" keys. I can access the "soft" keys by hoovering over the "soft" key and make a left click on the mouse. This is the built in way of accessing these "soft" keys.

I am about to make a dll that needs to access these "soft" keys.

AS the airpcraft gauge do not have any Lvars for the "soft" keys, I am wondering if there are other methods to access them?

XLM? gauge indexing? Any other ideas? Or is it impossible?
 

ddawson

Resource contributor
Messages
862
Country
canada
Register a GAUGE_KEY_EVENT_HANDLER function in your dll. You will be able to detect the soft keys events that way.
 
Messages
71
Country
norway
Thanks for reply.

But, isn't using the GAUGE_KEY_EVENT_HANDLER function to detect eventIDs, the same as can be achieved with FSUIPC's Mouse Macro function?

I have used it to try to detect the eventID in order to "click" them via C++ code.
The Mouse Macro funtion in FSUIPC detected all cockpit buttons,switches etc, but the "soft" keys in the specific gauge were not detected.

So my question is: Will they be detected by the GAUGE_KEY_EVENT_HANDLER function.

I have tried to implement it in the dll code, but haven't been able to detect any "soft" keys.

I just wonder, is it possible at all?
 
Messages
2,077
Country
us-ohio
Just because you can see a button does mean it's something that triggers anything.
 
Messages
71
Country
norway
To clarify a little more:

With "soft" key I mean a clickable spot/symbol on the gauge screen. The gauge has several clickable spots/symbols.

I know that that the "soft" key I am trying to find the ID for is something that is clickable and will trigger an action.

I know that because when I click it with my mouse pointer it trigger the action.

My challenge it to find an ID within that gauge so I can use that ID to make the clicking with C++ code in my dll.
 
Messages
71
Country
norway
It triggers an action locally in the gauge. The action gives another "child" screen in the gauge.
 
Messages
2,077
Country
us-ohio
There is nothing about what you're seeing that indicates it must be generating a sim event. It could be changing the value of an internal variable.
 
Messages
71
Country
norway
I never said it was generating a sim event. As I can't detect any with FSUIPC's Mouse Macro or the suggested GAUGE_KEY_EVENT_HANDLER function,

See my opening mesage. This bring back my first question in this thread , is it impossible?

I believe now, that it is impossible.
 

taguilo

Resource contributor
Messages
1,585
Country
argentina
How can I know? I guess it is a C++ gauge

How can't you?
Just check on panel.cfg the name of the gauge. Then do a search in panel subfolders/gauges folders. If gauge extension is .xml, enough said; if it is .cab then is an xml gauge as well; if it is .dll/gau is a C/C++ gauge.

If the gauge is written in C/C++ is is likely that action is an update of an internal variable, as Ed (WarpD) suggested. You can't do anything if that's the case.

Tom
 

JB3DG

Resource contributor
Messages
1,325
Country
southafrica
The reason I asked about C++ gauges is because C++ gauges have the option of creating a mouse function callback for a clickspot instead of a mouse event for that clickspot. If it is the former then you will find it a lot tougher. There is a way to access the mouse rectangle of a C++ gauge using the export table but that is rather complicated and I haven't had much success with it.
 
Top