Add j/k shortcuts for scrolling and update help instructions in TUI

fixes #18
This commit is contained in:
2025-09-30 01:10:29 +02:00
parent 8409bf646a
commit 2731a3a878
2 changed files with 6 additions and 2 deletions

View File

@@ -328,10 +328,12 @@ impl ChatApp {
self.mode = InputMode::Editing;
self.sync_buffer_to_textarea();
}
(KeyCode::Up, KeyModifiers::NONE) => {
(KeyCode::Up, KeyModifiers::NONE)
| (KeyCode::Char('k'), KeyModifiers::NONE) => {
self.on_scroll(-1isize);
}
(KeyCode::Down, KeyModifiers::NONE) => {
(KeyCode::Down, KeyModifiers::NONE)
| (KeyCode::Char('j'), KeyModifiers::NONE) => {
self.on_scroll(1isize);
}
(KeyCode::Esc, KeyModifiers::NONE) => {