From 8b9b2093197f57a6a8b75452b6e6759cc10f6dac Mon Sep 17 00:00:00 2001 From: rabite Date: Tue, 28 May 2019 01:14:53 +0200 Subject: add quick_actions.rs --- src/quick_actions.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/quick_actions.rs b/src/quick_actions.rs index 17a167c..7228a06 100644 --- a/src/quick_actions.rs +++ b/src/quick_actions.rs @@ -68,11 +68,12 @@ impl FoldableWidgetExt for ListView> { fn on_key(&mut self, key: Key) -> HResult<()> { match key { Key::Char('a') | - Key::Char('h') => HError::popup_finnished()?, + Key::Char('b') => HError::popup_finnished()?, // undefined key causes parent to handle move up/down - Key::Char('j') => HError::undefined_key(key)?, - Key::Char('k') => HError::undefined_key(key)?, - Key::Char('l') => self.run_action(None), + Key::Char('n') => HError::undefined_key(key)?, + Key::Char('p') => HError::undefined_key(key)?, + Key::Char('f') => self.run_action(None), + key @ Key::Char(_) => { let chr = match key { Key::Char(key) => key, @@ -192,7 +193,7 @@ impl ListView> { } // shouldn't contain keys used for navigation/activation -static CHARS: &str = "bcdefgimoqrstuvxyz"; +static CHARS: &str = "bcdeghijklmoqrstuvxyz"; impl QuickActions { pub fn new(files: Vec, -- cgit v1.2.3