mirror of
https://github.com/arabianq/pipewire-soundpad.git
synced 2026-04-28 06:21:23 +00:00
feat: shift + enter is now equal to shift + left mouse
This commit is contained in:
+11
-4
@@ -21,10 +21,17 @@ impl SoundpadGui {
|
||||
}
|
||||
|
||||
if i.key_pressed(Key::Enter) && self.app_state.selected_file.is_some() {
|
||||
self.play_file(
|
||||
&self.app_state.selected_file.clone().unwrap(),
|
||||
i.modifiers.ctrl,
|
||||
);
|
||||
let path = &self.app_state.selected_file.clone().unwrap();
|
||||
if i.modifiers.ctrl {
|
||||
self.play_file(path, true);
|
||||
} else if i.modifiers.shift
|
||||
&& let Some(last_track) = self.audio_player_state.tracks.last()
|
||||
{
|
||||
self.stop(Some(last_track.id));
|
||||
self.play_file(path, true);
|
||||
} else {
|
||||
self.play_file(path, false);
|
||||
}
|
||||
}
|
||||
|
||||
if !self.app_state.show_settings {
|
||||
|
||||
Reference in New Issue
Block a user