macOS works in two different ways, you can either have it accept focus only on text fields or you can choose to have focus move between all controls. For example checkboxes and radio buttons. If you don’t have it set to all controls it may be doesn’t accept focus on the HTMLViewer, which would mean the keyboard events wouldn’t be directed to it.
As for Xojo if you select your HTMLViewer and then show the inspector tab. Select the cog wheel tab and look at the ‘Allow Tab Stop’ setting. If that is off then it can’t accept focus and thus no keyboard events. It would also be worth checking that you haven’t defined a keydown event on the control, which is changing standard behavour.