How to import the "KeyInterceptManager" class from the "msfssdk.js" file?

Does anyone know how to import the “KeyInterceptManager” class from the “msfssdk.js” file?

Hi Octaug,

The framework is designed to be used as a package from npm, and bundled with rollup or similar. You can see an example setup in the docs Setting Up Your Environment | MSFS Avionics Frameworks and Instruments.

Hi tracernz.
Thank you for your reply.

I have the environment setup, but still I cannot use KeyInterceptManager. What is the specific import that is needed so I can use KeyInterceptManager in my project.

It has been renamed to KeyEventManager in later versions of the framework. Should be

import { KeyEventManager } from '@microsoft/msfs-sdk';

It works.
Thank you very much!)

1 Like

Good to hear!. You can find documentation for all of the classes and interfaces in the framework as well Class: KeyEventManager | MSFS Avionics Frameworks and Instruments

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.