summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrabite <rabite@posteo.de>2019-05-28 01:14:53 +0200
committerrabite <rabite@posteo.de>2019-06-11 01:59:09 +0200
commitb18b2bb9ad7b3f245401bd1f9da4b3ff195fe820 (patch)
treeba95e107a0b658be86f7fd8af283b36ee372f08b
parente5c61ea63e4ed05480e4c00edf0bb6c710e366e4 (diff)
add quick_actions.rs
-rw-r--r--src/quick_actions.rs11
1 files 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<Vec<QuickActions>> {
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<Vec<QuickActions>> {
}
// shouldn't contain keys used for navigation/activation
-static CHARS: &str = "bcdefgimoqrstuvxyz";
+static CHARS: &str = "bcdeghijklmoqrstuvxyz";
impl QuickActions {
pub fn new(files: Vec<File>,