19 lines
558 B
TypeScript
19 lines
558 B
TypeScript
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>;
|
|
}
|