diff --git a/ui-tui/src/__tests__/textInputReadline.test.ts b/ui-tui/src/__tests__/textInputReadline.test.ts index b1389d57f3e7..4892ee9ea986 100644 --- a/ui-tui/src/__tests__/textInputReadline.test.ts +++ b/ui-tui/src/__tests__/textInputReadline.test.ts @@ -2,8 +2,7 @@ import { describe, expect, it } from 'vitest' import { applyReadlineCtrlEdit } from '../components/textInput.js' -const key = (overrides: Record = {}) => - ({ ctrl: false, meta: false, ...overrides }) as any +const key = (overrides: Record = {}) => ({ ctrl: false, meta: false, ...overrides }) as any const ctrl = key({ ctrl: true }) @@ -85,12 +84,15 @@ describe('applyReadlineCtrlEdit', () => { }) it('ignores modified and unrelated keys', () => { - expect(applyReadlineCtrlEdit('f', key({ ctrl: true, shift: true }), { cursor: 0, selection: null, value: 'abc' })) - .toBeNull() - expect(applyReadlineCtrlEdit('d', key({ ctrl: true, alt: true }), { cursor: 0, selection: null, value: 'abc' })) - .toBeNull() - expect(applyReadlineCtrlEdit('d', key({ ctrl: true, super: true }), { cursor: 0, selection: null, value: 'abc' })) - .toBeNull() + expect( + applyReadlineCtrlEdit('f', key({ ctrl: true, shift: true }), { cursor: 0, selection: null, value: 'abc' }) + ).toBeNull() + expect( + applyReadlineCtrlEdit('d', key({ ctrl: true, alt: true }), { cursor: 0, selection: null, value: 'abc' }) + ).toBeNull() + expect( + applyReadlineCtrlEdit('d', key({ ctrl: true, super: true }), { cursor: 0, selection: null, value: 'abc' }) + ).toBeNull() expect(applyReadlineCtrlEdit('x', ctrl, { cursor: 0, selection: null, value: 'abc' })).toBeNull() }) }) diff --git a/ui-tui/src/app/useInputHandlers.ts b/ui-tui/src/app/useInputHandlers.ts index 2795ac3f1511..83b89f1c1394 100644 --- a/ui-tui/src/app/useInputHandlers.ts +++ b/ui-tui/src/app/useInputHandlers.ts @@ -12,7 +12,15 @@ import type { SudoRespondResponse, VoiceRecordResponse } from '../gatewayTypes.js' -import { type ChordKey, isAction, isBareCtrl, isCopyShortcut, isExplicitAction, isMac, isVoiceToggleKey } from '../lib/platform.js' +import { + type ChordKey, + isAction, + isBareCtrl, + isCopyShortcut, + isExplicitAction, + isMac, + isVoiceToggleKey +} from '../lib/platform.js' import { computePrecisionWheelStep, initPrecisionWheel } from '../lib/precisionWheel.js' import { computeWheelStep, initWheelAccelForHost } from '../lib/wheelAccel.js' import { closeWidget, dispatchWidgetInput } from '../sdk/host.js'