export class KeyboardDevice {
    current = new Set();
    previous = new Set();
    keyDown(event) {
        if (!event.repeat) {
            this.current.add(event.code);
        }
    }
    keyUp(event) {
        this.current.delete(event.code);
    }
    blur() {
        this.current.clear();
    }
    snapshotSets() {
        return { keys: new Set(this.current), previousKeys: new Set(this.previous) };
    }
    endFrame() {
        this.previous = new Set(this.current);
    }
}
//# sourceMappingURL=KeyboardDevice.js.map