IsWebFocused
Whether a frame - or any frame - of the web interface has the keyboard or the mouse cursor.
With a frame name: true when that frame holds the keyboard, the cursor or both. Without one: true when any frame
does. It says what came of a SetWebFocus, which only hands the request over. false when there is no web layer.
Syntax
Section titled “Syntax”IsWebFocused([frame])| Parameter | Type | |
|---|---|---|
frame |
string | the frame’s name; leave it out to ask about every frame (optional) |
Returns
Section titled “Returns”boolean - true when the frame (or any frame) has the keyboard or the cursor
Example
Section titled “Example”function OnKey(key, pressed) if key == "f5" and pressed then if IsWebFocused("menu") then SetWebFocus("menu", false, false) else SetWebFocus("menu", true, true) end endendSee also
Section titled “See also”SetWebFocus · SetWebFocusKeepInput · the Web interface group of the index
