plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

Save the date ! On February the 9th, at 10:30am, we will be happy to meet you again for a live SDK Q&A ! You can already ask all your questions here on the forum.

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.

Please take a moment to read the platform’s guidelines before you get started!


question

virtuali avatar image
virtuali asked virtuali answered

SimConnect_SetInputGroupPriority not working ?

This is more like a possible bug report, rather than a suggestion.

The SimConnect_SetInputGroupPriority API call is currently reported as "No error", instead of "Working" and in fact, after a couple of tests, it seems it doesn't do anything, no errors but also no effect.

The goal is to be able to temporarily map a key or a joy button, and prevent it from reaching the sim, if the priority is set to SIMCONNECT_GROUP_PRIORITY_HIGHEST_MASKABLE and the client events has been added to the input group with the bMaskable flag enabled.


simconnect
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

some1 avatar image
some1 answered

I confirm, the joystick events created with SimConnect_MapInputEventToClientEvent cannot be masked.

10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

FlyingRaccoon avatar image
FlyingRaccoon answered

Hello,

This is a known issue and our developers will have a look at it.

Regards,
Sylvain

10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

FlyingRaccoon avatar image
FlyingRaccoon answered virtuali commented

Hello @virtuali
Our dev is looking at this but it's a bit more tricky as we're not sure we want to allow people to override all possible inputs and we also have to consider potential conflicts between several third party products.
I'll let you know when I have more info.

Regards,
Sylvain

1 comment
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

I think event masking should be possible, for the following reasons:


- It was fully supported in FSX and P3D Simconnect, so developers had years to get accustomed to it, and nothing bad happened, provided they give the ability to redefine their own keys/buttons to prevent conflict between add-on, which almost everybody did.

- If it's not available through Simconnect, developers that really need it WILL jump through every kind of strange and potentially dangerous hoops, like API hooking, to do it anyway, each one using its own methods, which WILL in fact cause far worse problems in the end, that's why it's far better to have one officially documented way to do this, so nobody would have an excuse to do dirty hacks.

1 Like 1 ·
virtuali avatar image
virtuali answered FlyingRaccoon commented

I checked the latest SDK and, while the release notes say


It doesn't seeem to be the case, since the relevant page says:

The SimConnect_SetNotificationGroupPriority function is written by the developer of the SimConnect client, as a callback function to handle all the communications with the server.

Which doesn't seem to be right, since that's not what that function does, the explanation seems to be just copied/pasted from the Dispatch explanation:

The DispatchProc function is written by the developer of the SimConnect client, as a callback function to handle all the communications with the server.

Even the sample syntax and the parameters list for SimConnect_SetNotificationGroupPriority is copied from the DispatchProc

The C++ Header file, of course, has the function declared correctly:

SimConnect_SetNotificationGroupPriority(HANDLE hSimConnect, SIMCONNECT_NOTIFICATION_GROUP_ID GroupID, DWORD uPriority);


Now, I would like to use this post to repost my last question about the Priority not working correctly, meaning it's not possible to mask an event to prevent it from reaching it the sim.

This feature worked well since FSX, and many developers relied on it. Without it, it would be extremely trick to achieve some things, which will invariably end in developers that really need it, to rever to strange hacks, hooking, and other questionable methods.

An example how this could be used:

An add-on simulating data input in the FMC might want to momentarily switch into a "keyboard input" mode, allowing the user to use the keyboard to enter text faster. Some hi-quality airplane add-on had this feature but, while for a traditional FMC it might just be optional, think about something as complex as an A350/A380, which has a REAL full size keyboard in front of the pilot so, what's best than just enabling the PC keyboard the user has to easily simulate the real thing in that specific input mode ?

So, please, try to reconsider your doubts about adding back the not-working Event Masking from FSX. This, together to the other big missing feature ( Simconnect_text text lines and Simconnect_text menus ) are basically everything still lacking in Simconnect to create some kind of custom UI interaction required by lots of add-ons which were successfull in FSX.

1 comment
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

FlyingRaccoon avatar image
FlyingRaccoon answered FlyingRaccoon edited

Hello @virtuali

Allow me to give a more complete answer on this.
First, we agree that third party developers should be able to define their own events and bindings. The examples you provided with the FMC is a good one, we can also think of very specific actions that don't exist yet and that third party developers would want to add.
But when this topic was discussed internally, we also agreed that we didn't want to do it the way it was possible in FSX and this for user experience reasons:
- what's the point of creating a control menu where you can modify the bindings and handle conflicts if any third party product can override these controls and potentially create conflict with each other.
- what if a third party product masking an input creates a bug, either involuntarily or because we add that input later on in the game?

That said, this subject is being worked on as we speak in a way that will allow that kind of features but integrated in a better way in the game. I can't give any more info than that.

Regards,
Asobo / Sylvain

10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

virtuali avatar image
virtuali answered

@FlyingRaccoon , I'm all for improvements and reliability so, as long what we need it's available, it's not a problem at all doing it differently than on FSX.

Something like allowing add-ons to "publish" their own custom events, so they will appear in the standard Controls UI and users possibly reassign them just like the "official" events, would be a big improvement, and won't require every add-on having to handle key assignments in a different UI.

10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 19.1 MiB each and 23.8 MiB total.