From 7ffc859af7dbc398e386206d366d14e2b2205a45 Mon Sep 17 00:00:00 2001 From: Chris Ong Date: Mon, 22 Jun 2026 13:35:02 -0700 Subject: [PATCH 1/2] add cooldown for Enter key in ISO installer --- .../imagegen/attendedinstaller/attendedinstaller.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/toolkit/tools/imagegen/attendedinstaller/attendedinstaller.go b/toolkit/tools/imagegen/attendedinstaller/attendedinstaller.go index cb7a361f5fa..ef495ab249d 100644 --- a/toolkit/tools/imagegen/attendedinstaller/attendedinstaller.go +++ b/toolkit/tools/imagegen/attendedinstaller/attendedinstaller.go @@ -36,6 +36,8 @@ import ( const ( defaultGridWeight = 1 + enterCooldown = 300 * time.Millisecond + textRow = 3 textColumn = 0 textRowSpan = 1 @@ -68,6 +70,7 @@ type AttendedInstaller struct { grid *tview.Grid pauseCustomInput bool pauseSpeakupInput bool + ignoreEnterUntil time.Time currentView int allViews []views.View backdropStyle tview.Theme @@ -199,6 +202,9 @@ func (ai *AttendedInstaller) showView(newView int) (err error) { return } + // Apply Enter cooldown to all views to prevent carried key events from auto-advancing. + ai.ignoreEnterUntil = time.Now().Add(enterCooldown) + ai.grid.AddItem(view.Primitive(), primaryContentRow, primaryContentColumn, primaryContentRowSpan, primaryContentColumnSpan, primaryContentMinSize, primaryContentMinSize, true) ai.app.SetFocus(ai.grid) ai.currentView = newView @@ -221,6 +227,10 @@ func (ai *AttendedInstaller) quit() { } func (ai *AttendedInstaller) globalInputCapture(event *tcell.EventKey) *tcell.EventKey { + if event.Key() == tcell.KeyEnter && !ai.ignoreEnterUntil.IsZero() && time.Now().Before(ai.ignoreEnterUntil) { + return nil + } + // If we're clearing the speakup buffer, don't process keypresses // tcell has no easy way of differentiating between keypad enter (speakup clear) and enter if ai.pauseSpeakupInput && event.Key() == tcell.KeyEnter { From f579f30b2a0ec7d69c86222aa79446a6b0ba5852 Mon Sep 17 00:00:00 2001 From: Chris Ong Date: Mon, 22 Jun 2026 13:55:13 -0700 Subject: [PATCH 2/2] change to 50ms --- toolkit/tools/imagegen/attendedinstaller/attendedinstaller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolkit/tools/imagegen/attendedinstaller/attendedinstaller.go b/toolkit/tools/imagegen/attendedinstaller/attendedinstaller.go index ef495ab249d..db11d4b79a6 100644 --- a/toolkit/tools/imagegen/attendedinstaller/attendedinstaller.go +++ b/toolkit/tools/imagegen/attendedinstaller/attendedinstaller.go @@ -36,7 +36,7 @@ import ( const ( defaultGridWeight = 1 - enterCooldown = 300 * time.Millisecond + enterCooldown = 50 * time.Millisecond textRow = 3 textColumn = 0