diff --git a/demo/client/components/window/optionsWindow.ts b/demo/client/components/window/optionsWindow.ts index d084784f..a84d7f75 100644 --- a/demo/client/components/window/optionsWindow.ts +++ b/demo/client/components/window/optionsWindow.ts @@ -119,9 +119,13 @@ export class OptionsWindow extends BaseWindow implements IControlWindow { 'overviewRuler', 'quirks', 'theme', + 'vtExtensions', 'windowOptions', 'windowsPty', ]; + const nestedBooleanOptions: { label: string, parent: string, prop: string }[] = [ + { label: 'vtExtensions.kittyKeyboard', parent: 'vtExtensions', prop: 'kittyKeyboard' } + ]; const stringOptions: { [key: string]: string[] | null } = { cursorStyle: ['block', 'underline', 'bar'], cursorInactiveStyle: ['outline', 'block', 'bar', 'underline', 'none'], @@ -156,6 +160,10 @@ export class OptionsWindow extends BaseWindow implements IControlWindow { booleanOptions.forEach(o => { html += `
`; }); + nestedBooleanOptions.forEach(({ label, parent, prop }) => { + const checked = this._terminal.options[parent]?.[prop] ?? false; + html += `
`; + }); html += '
'; numberOptions.forEach(o => { html += `
`; @@ -187,6 +195,13 @@ export class OptionsWindow extends BaseWindow implements IControlWindow { } }); }); + nestedBooleanOptions.forEach(({ label, parent, prop }) => { + const input = document.getElementById(`opt-${label.replace('.', '-')}`) as HTMLInputElement; + addDomListener(input, 'change', () => { + console.log('change', label, input.checked); + this._terminal.options[parent] = { ...this._terminal.options[parent], [prop]: input.checked }; + }); + }); numberOptions.forEach(o => { const input = document.getElementById(`opt-${o}`) as HTMLInputElement; addDomListener(input, 'change', () => {