export class KeyboardManager {
    constructor(scrollingText) {
        this.scrollingText = scrollingText;
    }
    init() {
        this.scrollingText
            .getContainer()
            .addEventListener('keydown', (event) => this.handler(event));
    }
    release() {
        this.scrollingText
            .getContainer()
            .removeEventListener('keydown', (event) => this.handler(event));
    }
    handler(event) {
        switch (event.key) {
            case 'Enter':
                event.preventDefault();
                this.scrollingText.getCurrentLine().getAdvanceButton().click();
                break;
            default:
                break;
        }
    }
}
