WebBrowser Input not catching keys



When using a WebBrowser dotnet control in a rollout and adding an Input element to the page, when typing in the input, it works only if the key is not mapped as a 3ds shortcut. If I type “f” for instance, the key won’t be displayed in the input and the viewport will be set to front view…

Is there some trick to catch the keys within the web browser or is it a dead end?



try to disable/enable accelerators ( enableAccelerators in mxs reference) on webbrowser focus event


Awesome it’s working like a charm, thanks!

I had to use this trick to get the rollout focused state : https://discourse.techart.online/t/maxscript-dialog-active-or-inactive/4734/2
Maybe there’s a better way?


did you try?

setFocus <rollout_ui_item>


Nope didn’t try that, but this method focuses the rollout, I need to know when the user is using the viewport to enable accelerators so he can use shortcuts, and when the rollout is focused so he can type in the inputs.

The method described in the link I posted works great, don’t know the performance cost of checking the focus state of the window every 100 ms though…


I think it is far cheaper and safer doing it this way than window subclassing (like used in windowshopper, see MessageSnooper class).