Change stop key to 's' for better compatibility
All checks were successful
Build and Release / build-and-release (push) Successful in 59s
All checks were successful
Build and Release / build-and-release (push) Successful in 59s
- Replace Shift+Space with 's' key for stop functionality - Update status bar shortcuts to reflect the change - Bump version to 0.1.5
This commit is contained in:
parent
8e2989731e
commit
586c0b88eb
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cm-player"
|
name = "cm-player"
|
||||||
version = "0.1.4"
|
version = "0.1.5"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
@ -227,8 +227,8 @@ async fn handle_key_event<B: ratatui::backend::Backend>(terminal: &mut Terminal<
|
|||||||
tracing::info!("Playing: {:?} (playlist: {} tracks)", path, state.playlist.len());
|
tracing::info!("Playing: {:?} (playlist: {} tracks)", path, state.playlist.len());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
(KeyCode::Char(' '), KeyModifiers::SHIFT) => {
|
(KeyCode::Char('s'), _) => {
|
||||||
// Shift+Space: Stop playback
|
// s: Stop playback
|
||||||
state.player_state = PlayerState::Stopped;
|
state.player_state = PlayerState::Stopped;
|
||||||
state.current_position = 0.0;
|
state.current_position = 0.0;
|
||||||
state.current_duration = 0.0;
|
state.current_duration = 0.0;
|
||||||
|
|||||||
@ -251,7 +251,7 @@ fn render_status_bar(frame: &mut Frame, state: &AppState, area: Rect) {
|
|||||||
frame.render_widget(status_bar, area);
|
frame.render_widget(status_bar, area);
|
||||||
} else {
|
} else {
|
||||||
// Normal mode shortcuts (always shown when not in search mode)
|
// Normal mode shortcuts (always shown when not in search mode)
|
||||||
let shortcuts = "/: Search • v: Mark • a: Add • c: Clear • Enter: Play • Space: Pause • Shift+Space: Stop • ←→: Seek • +/-: Vol • n/p: Next/Prev • r: Rescan • q: Quit";
|
let shortcuts = "/: Search • v: Mark • a: Add • c: Clear • Enter: Play • Space: Pause • s: Stop • ←→: Seek • +/-: Vol • n/p: Next/Prev • r: Rescan • q: Quit";
|
||||||
let status_bar = Paragraph::new(shortcuts)
|
let status_bar = Paragraph::new(shortcuts)
|
||||||
.style(Style::default().fg(Theme::muted_text()).bg(Theme::background()))
|
.style(Style::default().fg(Theme::muted_text()).bg(Theme::background()))
|
||||||
.alignment(Alignment::Center);
|
.alignment(Alignment::Center);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user