tui(run): use keymap instead of raw key events (#30077)

Co-authored-by: Sebastian Herrlinger <hasta84@gmail.com>
This commit is contained in:
Simon Klee 2026-05-31 10:58:12 +02:00 committed by GitHub
commit e8dd8f7fe0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 762 additions and 893 deletions

View file

@ -177,10 +177,6 @@ export function RunQuestionBody(props: {
return
}
if (event.name === "return" && !event.shift && !event.ctrl && !event.meta) {
saveCustom()
event.preventDefault()
}
return
}
@ -496,6 +492,7 @@ export function RunQuestionBody(props: {
focusedBackgroundColor={props.theme.surface}
cursorColor={props.theme.text}
focused={!disabled()}
onSubmit={saveCustom}
onContentChange={() => {
if (!area || area.isDestroyed || disabled()) {
return