Hello together.
Im sorry for this kind of noob question, its not that i havent tried…
I want to prevent that the sim is registering input commands from keys pressed in an iframe.
Ive made this work in a html/JS environment via Flow (the app from paralell42) or by adding this lines of code (in some other cases i think with preventDefault() added to the element)
element.addEventListener("focus", OnInputFieldFocus);
element.addEventListener("blur", OnInputFieldUnfocus);
I know this would be the way to go.
But the issue is that in the toolbar project i dont have my own inputs in the document.
Im loading an iframe.
How can i disable input commands for the whole view instead of just an input field?
The user can enter icao codes into the form thats present on the included iframe. I have all that on a website already, so no real need to redevelop, in theory.
Thanks for help guys.
PS: this is what i tried last, unsuccessful
this.ingameUi.addEventListener("keydown", (e) => {
e.preventDefault();
});
this.ingameUi.addEventListener("focus", OnInputFieldFocus);
this.ingameUi.addEventListener("blur", OnInputFieldUnfocus);