[sldev] Browser in Secondlife Viewer

Tofu Linden tofu.linden at lindenlab.com
Mon Nov 19 08:16:13 PST 2007


Callum Prentice wrote:
>> Actually in fact I am not getting any keyboard input, so that makes
>> testing difficult. I'm testing in ubrowser ATM and that is passing keys
>> on to LLMozLib but nothings happening
> 
> ISTR there were some keyboard issues on Linux but I'm afraid I don't 
> have any details - perhaps in this list's archive?

Keyboard in win32 works (mostly) at the llmozlib level due to a
platform-specific focus-stealing hack.  OSX and Linux have to
feed-in simulated keypress events (like we do for all mouse events)
from the application level.  In the case of uBrowser the application
level key events come from the GLUI widget library, so a GLUI->DOM
key event translation layer would have to be implemented.

I think, for the purposes of uBrowser, no-one has considered it
a priority, but if you want to see the SL Viewer version of such
a translation layer, see LLWebBrowserCtrl::handleKey() and
LLWebBrowserCtrl::handleUnicodeChar().  It's not hard (assuming
that GLUI's keyboard handling is reasonably designed - I haven't
checked!), just a bit fiddly.

-Tofu



More information about the SLDev mailing list