isUiOwned
isUiOwned(
event):boolean
Defined in: packages/engine/src/platform/input.ts:160
Whether the focused element owns the key. A control that takes typing owns every one, where an arrow moves a caret rather than walking the hero. A button, a link or a row of a list owns Space and Enter, which press it, so the debugger’s Space presses the focused speed or row rather than pausing. With ⌘ or Ctrl held, only a link owns them, since ⌘↵ opens it in a new tab; on another control the chord is a shortcut’s. A control that cancelled the key has handled it, as a slider does its arrows. Nothing the game draws takes typing, so this stands for the first control that does.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
event |
KeyboardEvent |
Returns
Section titled “Returns”boolean