Skip to content

Commit d64c4e3

Browse files
committed
Fix API key paste handling in onboarding
1 parent b016a3e commit d64c4e3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

codex-rs/tui/src/onboarding/auth.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use codex_login::ShutdownHandle;
99
use codex_login::run_login_server;
1010
use crossterm::event::KeyCode;
1111
use crossterm::event::KeyEvent;
12+
use crossterm::event::KeyEventKind;
1213
use crossterm::event::KeyModifiers;
1314
use ratatui::buffer::Buffer;
1415
use ratatui::layout::Constraint;
@@ -376,7 +377,8 @@ impl AuthModeWidget {
376377
should_request_frame = true;
377378
}
378379
KeyCode::Char(c)
379-
if !key_event.modifiers.contains(KeyModifiers::CONTROL)
380+
if key_event.kind == KeyEventKind::Press
381+
&& !key_event.modifiers.contains(KeyModifiers::CONTROL)
380382
&& !key_event.modifiers.contains(KeyModifiers::ALT) =>
381383
{
382384
if state.prepopulated_from_env {

0 commit comments

Comments
 (0)