/*! * Copyright 2021-2023 Cognite AS */ declare const EVENT_CODES: readonly ["MetaLeft", "MetaRight", "ShiftLeft", "ShiftRight", "ControlLeft", "ControlRight", "AltLeft", "AltRight", "Escape", "Space", "ArrowLeft", "ArrowUp", "ArrowRight", "ArrowDown", "KeyA", "KeyB", "KeyC", "KeyD", "KeyE", "KeyF", "KeyQ", "KeyS", "KeyW"]; type EventCode = (typeof EVENT_CODES)[number]; export default class Keyboard { private readonly _keys; private _isEnabled; get isEnabled(): boolean; set isEnabled(value: boolean); isPressed(key: EventCode): boolean; isShiftPressed(): boolean; isShiftPressedOnly(): boolean; isCtrlPressed(): boolean; isCtrlPressedOnly(): boolean; isAltPressed(): boolean; isMetaPressed(): boolean; /** * Given two keys representing positive and negative directions (e.g., left and right, or up and down), * this method returns 1 for the positive key, -1 for the negative key, or 0 if neither or both is pressed. * * @param positiveKey - Key representing the positive movement direction. * @param negativeKey - Key representing the negative movement direction. * @returns A value indicating the direction of movement: 1 (positive), -1 (negative), or 0 (none). */ getKeyboardMovementValue(positiveKey: EventCode, negativeKey: EventCode): number; addEventListeners(domElement: HTMLElement): void; removeEventListeners(domElement: HTMLElement): void; private readonly onKeyDown; private readonly onKeyUp; onKey(event: KeyboardEvent, down: boolean): void; readonly clearPressedKeys: () => void; } export {};