[sldev] Browser in Secondlife Viewer
Tateru Nino
tateru.nino at gmail.com
Mon Nov 19 18:13:08 PST 2007
Tofu Linden wrote:
> 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.
Windows keyboard focus-stealing is actually a bit bugged (I can't
remember the issue number off the top of my head). There are a number of
media embeds and such that cause it to steal keyboard focus from the
rest of the UI until the the browser window is closed (even if the
browser window is not uppermost). This is fairly easy to demonstrate
with web-profiles.
--
Tateru Nino
http://dwellonit.blogspot.com/
More information about the SLDev
mailing list