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

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!


Idea

ChrisSMS avatar image
ChrisSMS suggested ChrisSMS commented

Intercept all keystrokes via xml...!

Assuming that not all of us are high-level coders able to work directly with simconnect, wasm, etc., does the Asobo team foresee the possibility to simply get precise input information of a set of keystrokes via xml...? This was possible in FSX, and this information is important enough for "basic" developers, and even essential for the creation of some planes. I personally need to know when a user presses Ctrl+F1, or Alt+Tab+N... (for example...) to trigger some plane specific events, which are not included in the long list proposed by MSFS.

gauges
10 |10000

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

2 Comments

·
StevenPearce avatar image
StevenPearce commented Mr_LiamT edited

Hi Chris; it's not advisable (and I don't believe possible either without SimConnect/WASM/JS). For accessibility reasons or just personal preference users should be able to rebind all keys within the menu.

The suggested way is to override the behavior of an existing event.

https://docs.flightsimulator.com/html/index.htm#t=Content_Configuration%2FModels%2FModelBehaviors%2FModel_Behaviors.htm%23InputBindings

The limitation of this approach is that you will have to use an existing bindable event. It's not ideal if none of the events in the 'Control Options' match what you want to do. (Asobo, please fix!)

I will tell you this; if you can work with MSFS's RPN/XML combo you will have no problem dealing with SimConnect/WASM. I've been coding for 15 years and MSFS's XML/RPN is the least developer friendly system I have ever encountered.

2 comments
10 |10000

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

ChrisSMS avatar image ChrisSMS commented ·

Hi Steven,

What I meant is that I don't have the skills to code with C++ for Simconnect/Wasm, and I know I'm not the only developer in this case. In FSX, or P3D, and MSFS we can do this to intercept an event, and it works :
<Keys>
<On Event="ENGINE_AUTO_SHUTDOWN">
<!-- your code --!
</On>
</Keys>

For key combinations, in FSX and P3D we can do this..., but it doesn't work in MSFS :
<Keys>
<On Key="CTRL+SHIFT+F1">
!-- your code --!
</On>
</Keys>

Again, I am not a code specialist, but it seems to me that, if these two means are so close, why not make them both work...? Again, I am not a code specialist, but it seems to me that, if these two means are so close, why not make them both work...? It would be so much easier and more accessible for the developers...


0 Likes 0 ·
Mr_LiamT avatar image Mr_LiamT ChrisSMS commented ·

Maybe try:

<On Event="KEY_DEBUG_LCTRL">

or

<On Event="DEBUG_LCTRL">

I haven't coded for planes before, but i found some events that refer to specific keys and may work for your application.

0 Likes 0 ·
rhumbaflappy avatar image
rhumbaflappy commented
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.

ChrisSMS avatar image ChrisSMS commented ·

This is the first thing I tested when reading the SDK..., but it doesn't work because it is reserved for SimConnect!

1 Like 1 ·

Write a Comment

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

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.