Skip to content

Commit 84453d6

Browse files
committed
feat(tui): add Alt+C keyboard shortcut to copy last response
Adds Alt+C as a keybinding that triggers the same copy-to-clipboard logic as the /copy slash command, making it quicker to grab the last agent response as raw markdown without typing a command.
1 parent 68e16ba commit 84453d6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

codex-rs/tui/src/chatwidget.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4778,6 +4778,18 @@ impl ChatWidget {
47784778
self.quit_shortcut_expires_at = None;
47794779
self.quit_shortcut_key = None;
47804780
}
4781+
KeyEvent {
4782+
code: KeyCode::Char(c),
4783+
modifiers,
4784+
kind: KeyEventKind::Press,
4785+
..
4786+
} if modifiers.contains(KeyModifiers::ALT)
4787+
&& !modifiers.contains(KeyModifiers::CONTROL)
4788+
&& c.eq_ignore_ascii_case(&'c') =>
4789+
{
4790+
self.dispatch_command(SlashCommand::Copy);
4791+
return;
4792+
}
47814793
KeyEvent {
47824794
code: KeyCode::Char(c),
47834795
modifiers,

0 commit comments

Comments
 (0)