assassin-bug/framework/input/inputs/keyboard.d.ts

19 lines
558 B
TypeScript
Raw Permalink Normal View History

2022-11-26 01:22:02 +00:00
import { BaseInput } from './base-input';
export declare class Keyboard extends BaseInput {
private keysDown;
private keysJustPressed;
private keysJustReleased;
private preventDefault;
constructor(element: HTMLElement);
capture(preventDefault: boolean): void;
release(): void;
getState(): IKeyboard;
private handleKeyDown;
private handleKeyUp;
}
export interface IKeyboard {
keysDown: Map<number, boolean>;
keysJustPressed: Map<number, boolean>;
keysJustReleased: Map<number, boolean>;
}