Skip to content

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.

IsWebFocused([frame])
Parameter Type
frame string the frame’s name; leave it out to ask about every frame (optional)

boolean - true when the frame (or any frame) has the keyboard or the cursor

function OnKey(key, pressed)
if key == "f5" and pressed then
if IsWebFocused("menu") then
SetWebFocus("menu", false, false)
else
SetWebFocus("menu", true, true)
end
end
end

SetWebFocus · SetWebFocusKeepInput · the Web interface group of the index