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!


Simbol avatar image
Simbol asked Simbol edited

Mousewheel events for html / js instruments

Dear Asobo,

Is there any way to add an event listener to the muse wheel for BaseInstuments extensions? I have tried everything and it never fires.. all the other events do (mouseup, mousedown, etc.) but the wheel, onwheel, mousewheel, etc. never fires at all..

I am missing something?

Best Regards.

10 |10000

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

Boris_ avatar image Boris_ ♦ commented ·

Hi Raul,

For some reason, mousewheel for baseinstruments in js has never been implemented.
I can't give an ETA on this but it's a subject we will discuss internally.
I will let you know when I know more,


1 Like 1 ·
Simbol avatar image Simbol Boris_ ♦ commented ·

Hi Boris,

Thanks for the response, as a feedback this would be a very welcome feature. Example of usage is not only maps but the displaying of navigational data such as airport charts, navigation charts, pictures with information, etc. In addition we could use this to scale up / down hmtl content allowing users to read more easily certain parts of out elements, for example a table with text information, etc.

While we can put buttons to Zoom in / Zoom out on these html elements most users find it difficult to click these during flight when turbulence is having an effect, causing miss clicks, etc. and the mousewheel of course is the default behaviour for zoom in html so having this enable would be the best experience.

In addition if I might ask, could I create a html element using a different class (not map) that implements the mouse wheel event? I have seen reference to his inside some .JS files for the AS3000 using the extent navsystems, however not sure if it would work or how to implement to be honest.

Thanks for the help.


0 Likes 0 ·

1 Answer

runshotgun avatar image
runshotgun answered Simbol commented
document.addEventListener("mousewheel", <event>);
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.

Simbol avatar image Simbol commented ·

Thanks Kev,

I used that.. it doesn't work on JS Instruments.. apparently only on panels (Working title advise to me).

In hence I am asking Asobo, how we do it for JS Instruments?


0 Likes 0 ·

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.