notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit 9304111184474178696f3729205f51a5be34eb99
parent d71ee50d203a7533f8182d10e7d76f39861a4c64
Author: William Casarin <jb55@jb55.com>
Date:   Tue, 27 Jan 2026 10:44:02 -0800

dave: add Delete key binding for classic view

The Delete key was only working in scene view because it was handled
locally in scene.rs. This adds the binding to the global keybindings
system so it works in both views.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Diffstat:
Mcrates/notedeck_dave/src/lib.rs | 5+++++
Mcrates/notedeck_dave/src/ui/keybindings.rs | 7+++++++
2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/crates/notedeck_dave/src/lib.rs b/crates/notedeck_dave/src/lib.rs @@ -946,6 +946,11 @@ impl notedeck::App for Dave { KeyAction::TogglePlanMode => { self.toggle_plan_mode(ui.ctx()); } + KeyAction::DeleteActiveSession => { + if let Some(id) = self.session_manager.active_id() { + self.delete_session(id); + } + } } } diff --git a/crates/notedeck_dave/src/ui/keybindings.rs b/crates/notedeck_dave/src/ui/keybindings.rs @@ -27,6 +27,8 @@ pub enum KeyAction { ToggleView, /// Toggle plan mode for the active session TogglePlanMode, + /// Delete the active session + DeleteActiveSession, } /// Check for keybinding actions. @@ -79,6 +81,11 @@ pub fn check_keybindings( return Some(KeyAction::TogglePlanMode); } + // Delete key to delete active session (only when no text input has focus) + if !ctx.wants_keyboard_input() && ctx.input(|i| i.key_pressed(Key::Delete)) { + return Some(KeyAction::DeleteActiveSession); + } + // Ctrl+1-9 for switching agents (works even with text input focus) // Check this BEFORE permission bindings so Ctrl+number always switches agents if let Some(action) = ctx.input(|i| {