summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrabite <rabite@posteo.de>2019-05-28 01:14:53 +0200
committerrabite <rabite@posteo.de>2019-07-01 17:30:08 +0200
commit8b46676d9e8af0cac4752a93ac436b7c0fd3cb81 (patch)
treef1b11e4ef5caf869e8b5d429fd871aabf179bad8
parent32d4bdf02021c64953e67dce4e9d6d4158902d83 (diff)
add quick_actions.rs
-rw-r--r--src/quick_actions.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/quick_actions.rs b/src/quick_actions.rs
index 14c33bc..a1cbc5f 100644
--- a/src/quick_actions.rs
+++ b/src/quick_actions.rs
@@ -68,13 +68,14 @@ impl FoldableWidgetExt for ListView<Vec<QuickActions>> {
fn on_key(&mut self, key: Key) -> HResult<()> {
match key {
Key::Char('a') |
- Key::Char('h') |
Key::Ctrl('c') |
- Key::Esc => HError::popup_finnished()?,
+ Key::Esc |
+ 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,
@@ -194,7 +195,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>,