natiny.view.get_focus
natiny.view.get_focus() -> view
Returns the view that currently holds the program-wide input focus.
Returns
| Type | Description |
|---|---|
number |
Focused view handle, or 0 when no view has focus |
Example
if natiny.view.get_focus() == 0 then
natiny.view.set_focus(first_field)
end