aboutsummaryrefslogtreecommitdiff
path: root/src/handler.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/handler.rs')
-rwxr-xr-xsrc/handler.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/handler.rs b/src/handler.rs
index ab09050..91dcec7 100755
--- a/src/handler.rs
+++ b/src/handler.rs
@@ -329,6 +329,23 @@ pub fn handle_key_events(key_event: KeyEvent, app: &mut App) -> AppResult<()> {
// Change playlist name
KeyCode::Char('e') => if app.selected_tab == SelectedTab::Playlists {},
+ // go to top of list
+ KeyCode::Char('g') => {
+ match app.selected_tab {
+ SelectedTab::Queue => app.queue_list.index = 0,
+ SelectedTab::DirectoryBrowser => app.browser.selected = 0,
+ SelectedTab::Playlists => app.pl_list.index = 0
+ }
+ }
+
+ // go to bottom of list
+ KeyCode::Char('G') => {
+ match app.selected_tab {
+ SelectedTab::Queue => app.queue_list.index = app.queue_list.list.len() - 1,
+ SelectedTab::DirectoryBrowser => app.browser.selected = app.browser.filetree.len() - 1,
+ SelectedTab::Playlists => app.pl_list.index = app.pl_list.list.len() - 1
+ }
+ }
_ => {}
}
}