Can HtmlDialog yield focus to SketchUp view?

I was in the same situation when working on my Eneroth Railroad System many years ago. In my example I did capture key presses in the dialog window and then called onKeyPress of my custom Ruby tool, but that did not support native SketchUp shortcuts, which introduced an inconsistency that could be more confusing than doing nothing at all.

If the is (platform specific) API for changing focus to the Sketchup window, it can be quite frustrating when a window loses focus seemingly arbitrarily. In older SU versions some windows lost focus when moving the cursor out of them, meaning if you wanted to focus on some text without having the cursor in front of it, the title bar changed color and stuff happened around breaking that focus.

Ideally, pressing a key inside a dialog window, while not having an input focused and not having the keypress being used inside that window, should send the key press up to SketchUp, but if it can’t be achieved flawlessly, I’d say it’s better to do nothing at all and just get used to activating the SU window.