KeyboardLock beta
Class of @v12-engine/client
export declare class KeyboardLockThe keys the game uses, asked of the browser in full screen (client.keyboardLock), so that Esc is the game's and not the browser's way out of full screen (held down, it still is), and F keys, Ctrl with a digit and the others the game is on reach it. Only where the browser has it (Chromium) and only in full screen, which is where a browser grants it; elsewhere nothing changes
Members
constructor
constructor(client: KeysHost);Constructs a new instance of the KeyboardLock class
codes
codes(): string[];The keys asked for, by where they are (KeyboardEvent.code): Esc, and every key an action is on
dispose
dispose(): void;Lets go of the keyboard lock and its listeners
enabled
get enabled(): boolean;
set enabled(on: boolean);Whether it asks for the keys in full screen: yes unless the game says otherwise (GameView.input.lockKeys, or in code)
locked
readonly locked: Accessor<boolean>;Whether the keys are asked for now. A signal
refresh
refresh(): void;Asks for the keys, or gives them back, as full screen and enabled say: again after the keys changed