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.
I confirm, the joystick events created with
SimConnect_MapInputEventToClientEvent cannot be masked.
Hello, This is a known issue and our developers will have a look at it.
Regards, Sylvain
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
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.
I checked the latest SDK and, while the release notes say
[SimConnect_SetNotificationGroupPriority](mk%3A@MSITStore%3AC%3A%5CMSFS%20SDK%5CDocumentation%5CMSFS_SDK_Docs.chm%3A%3A/Programming_Tools/SimConnect/API_Reference/General/SimConnect_SetNotificationGroupPriority.htm)
has been updated with the correct information
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.
@Nocturne FYI
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
@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.
Hello, just wondering if anything has changed in this - our internal testing
is finding that setting the bMaskable flag is still not respected and events
that are masked out in all other platforms (FSX, ESP and all P3D versions),
are still propagated to the sim. We’d really like this functionality fixed as
masking events from the sim is imperative for us so that they are correctly
handled.
We need this too. An update on the status of this feature would be
appreciated.
Yes please, the current documentation seems to suggest masking is possible, so
it’s very confusing for us, and it’s difficult to explain users that something
doesn’t work as it should because the SDK prevents to mask events, yet they
check the docs and see it is. And, considering masking is allowed from JS,
there’s no point of not allowing it from Simconnect, since bad-behaving app
can be written in JS too.
bump - is there a possibility for an answer on this one, perhaps? Thank you in advance!
@FlyingRaccoon I understand you must be
incredibly busy at this time with the upcoming SU10 release, but an answer on
this topic will be incredibly helpful so that we can plan ahead - as
@virtuali explained, this functionality is already
allowed through JS so there is no point in not allowing it through Simconnect,
just for bad-behaving app reasons… Thank you for the consideration,
Shall I keep bumping threads, so they don’t get lost? Planning for 3rd party
add-ons is quite important for the ecosystem, was what Asobo/MS have always
claimed. An answer here would be most appreciated.
@FlyingRaccoon we really appreciate your
answer to our other post regarding “use_legacy_fm” being added to SU11 - would
you kindly give some consideration to fixing this one too for SU11 please?
It’s quite important that we can get this functionality fixed as well! Many
thanks!
Dear Asobo developers - @FlyingRaccoon ,
@EPellissier et. al - There are a few threads
where you guys provide very fast answers to and one in particular (about
additional virtual camera support) that was answered today by Eric where he
stated that his role is to provide support to 3rd party developers. As a 3rd
party developer, I have been nothing but very polite and kind in my requests
and communications through devsupport, but so far, even tho I’ve bumped this
thread several times, I have been ignored totally in my plight for an answer.
I am not interested in (or looking for) a debate or a heated argument, I don’t
do those - instead, I am concerned that a lack of answer means we cannot
properly plan ahead on how we can attack the issue at hand which is that input
events cannot currently be masked, as promised by the SDK. I consider this a
serious issue and that is why I keep bumping it. As
@virtuali said, the JS side already has that
capability so I am very curious why it cannot simply be fixed as the bug it
really is. An answer would really be appreciated here.
Hi @simfan, And apologies for the delay in
replying. Unfortunately the system
@FlyingRaccoon mentioned almost a year ago is
not ready yet so there is no news to give regarding the bMaskable argument of
SimConnect_MapInputEventToClientEvent. Correct me if I am wrong but the only
thing JS allows you to do today is to temporarily steal the alphanumeric
keyboard focus for the sole purpose of typing into character fields, which is
a bit different (less generic) from what @virtuali
initially asked (e.g. “temporarily map a key or a joy button, and prevent it
from reaching the sim”). That being said, it is true that there’s a lack of
feature parity here, which is actually due to a totally different pipeline (JS
and SimConnect are not “linked” to the sim in the same way). We will let you
know when progress has been made on this topic. Best regards, Eric / Asobo
Hi @EPellissier and thank you for the reply,
just to clarify on your answer: Do you expect that this broken bMaskable
functionality will be fixed? If so, would it be too forward of me to ask if
that could happen within SU11 as it would mean we could forge ahead with our
product development timelines? Best regards
@simfan, I am not sure yet if the functionality
itself will be fixed or if we will provide a different system to achieve a
similar result. Unfortunately the only thing I can confirm at this point is
that SU11 will not include a solution or workaround. Best regards, Eric /
Asobo