From 5a83c4c1d128c4138788e615cc116c0c4acdc09c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Forment?= Date: Thu, 5 Feb 2026 18:57:09 +0100 Subject: [PATCH] Space on all views --- CHANGELOG.md | 3 +++ src/input.rs | 22 +++++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 33f2f4b..f341608 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ All notable changes to this project will be documented in this file. ### Improved - Sample library browser: search now shows folder names only (no files) while typing, sorted by fuzzy match score. After confirming search with Enter, folders can be expanded and collapsed normally. Esc clears the search filter before closing the panel. Left arrow on a file collapses the parent folder. Cursor and scroll position stay valid after expand/collapse operations. +### Changed +- Space now toggles play/pause on all views, including the Patterns page where it previously toggled pattern play. Pattern play on the Patterns page is now bound to `p`. + ## [0.0.7] - 2026-05-02 ### Added diff --git a/src/input.rs b/src/input.rs index f4d33c8..7256038 100644 --- a/src/input.rs +++ b/src/input.rs @@ -1159,11 +1159,16 @@ fn handle_patterns_page(ctx: &mut InputContext, key: KeyEvent) -> InputResult { } } KeyCode::Enter => ctx.dispatch(AppCommand::PatternsEnter), - KeyCode::Char(' ') => { + KeyCode::Char('p') => { if ctx.app.patterns_nav.column == PatternsColumn::Patterns { ctx.dispatch(AppCommand::PatternsTogglePlay); } } + KeyCode::Char(' ') => { + ctx.dispatch(AppCommand::TogglePlaying); + ctx.playing + .store(ctx.app.playback.playing, Ordering::Relaxed); + } KeyCode::Char('c') if !ctrl => { let mute_changed = ctx.app.commit_staged_changes(); if mute_changed { @@ -1449,6 +1454,11 @@ fn handle_engine_page(ctx: &mut InputContext, key: KeyEvent) -> InputResult { KeyCode::Char('?') => { ctx.dispatch(AppCommand::OpenModal(Modal::KeybindingsHelp { scroll: 0 })); } + KeyCode::Char(' ') => { + ctx.dispatch(AppCommand::TogglePlaying); + ctx.playing + .store(ctx.app.playback.playing, Ordering::Relaxed); + } _ => {} } InputResult::Continue @@ -1673,6 +1683,11 @@ fn handle_help_page(ctx: &mut InputContext, key: KeyEvent) -> InputResult { KeyCode::Char('?') => { ctx.dispatch(AppCommand::OpenModal(Modal::KeybindingsHelp { scroll: 0 })); } + KeyCode::Char(' ') => { + ctx.dispatch(AppCommand::TogglePlaying); + ctx.playing + .store(ctx.app.playback.playing, Ordering::Relaxed); + } _ => {} } InputResult::Continue @@ -1721,6 +1736,11 @@ fn handle_dict_page(ctx: &mut InputContext, key: KeyEvent) -> InputResult { KeyCode::Char('?') => { ctx.dispatch(AppCommand::OpenModal(Modal::KeybindingsHelp { scroll: 0 })); } + KeyCode::Char(' ') => { + ctx.dispatch(AppCommand::TogglePlaying); + ctx.playing + .store(ctx.app.playback.playing, Ordering::Relaxed); + } _ => {} } InputResult::Continue