From 2cd64032eec2c18513755d884d115a9c230ea282 Mon Sep 17 00:00:00 2001 From: Laan Tungir Date: Wed, 19 Aug 2026 13:18:11 -0400 Subject: [PATCH] v0.0.5 - TUI: add Left/Right arrow keys to cycle command focus alongside Tab --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/lib.rs | 2 +- src/tui.rs | 11 +++++++++-- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8465ff8..b382e4f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1490,7 +1490,7 @@ dependencies = [ [[package]] name = "nsigner" -version = "0.0.3" +version = "0.0.4" dependencies = [ "base64", "chacha20poly1305", diff --git a/Cargo.toml b/Cargo.toml index 155afd1..af74905 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nsigner" -version = "0.0.4" +version = "0.0.5" edition = "2021" license = "MIT" description = "Attended Nostr signing daemon — Rust port of n_signer" diff --git a/src/lib.rs b/src/lib.rs index 884a489..ff78ac2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -31,4 +31,4 @@ pub mod error; pub use error::NsignerError; /// Version string (matches C NSIGNER_VERSION). -pub const VERSION: &str = "v0.0.4"; +pub const VERSION: &str = "v0.0.5"; diff --git a/src/tui.rs b/src/tui.rs index 2176367..eeca22d 100644 --- a/src/tui.rs +++ b/src/tui.rs @@ -678,7 +678,8 @@ impl App { KeyCode::Char('b') | KeyCode::Char('B') => self.toggle_transport(1), KeyCode::Char('f') | KeyCode::Char('F') => self.toggle_transport(2), KeyCode::Char('h') | KeyCode::Char('H') => self.toggle_transport(3), - // Tab / Shift-Tab cycle focus through all commands on the page. + // Tab / Shift-Tab and Left/Right arrows cycle focus through + // all commands on the page. KeyCode::Tab => { if key.modifiers.contains(KeyModifiers::SHIFT) { self.focus = (self.focus + FOCUS_COUNT - 1) % FOCUS_COUNT; @@ -689,9 +690,15 @@ impl App { KeyCode::BackTab => { self.focus = (self.focus + FOCUS_COUNT - 1) % FOCUS_COUNT; } + KeyCode::Right => { + self.focus = (self.focus + 1) % FOCUS_COUNT; + } + KeyCode::Left => { + self.focus = (self.focus + FOCUS_COUNT - 1) % FOCUS_COUNT; + } // Enter activates whichever command is currently focused. KeyCode::Enter => self.activate_focused(), - // Up/Down scroll the activity log. + // Up/Down and j/k scroll the activity log. KeyCode::Up | KeyCode::Char('k') => { if self.activity_scroll > 0 { self.activity_scroll -= 1;