v0.0.5 - TUI: add Left/Right arrow keys to cycle command focus alongside Tab

This commit is contained in:
Laan Tungir
2026-08-19 13:18:11 -04:00
parent ea11bb5a87
commit 2cd64032ee
4 changed files with 12 additions and 5 deletions
Generated
+1 -1
View File
@@ -1490,7 +1490,7 @@ dependencies = [
[[package]]
name = "nsigner"
version = "0.0.3"
version = "0.0.4"
dependencies = [
"base64",
"chacha20poly1305",
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -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";
+9 -2
View File
@@ -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;