From 76100132d1d855bb3ecaf4fc73354e7414ef7c19 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Wed, 3 Oct 2018 15:40:04 +0200 Subject: run_key_action_for_mode(): Remove `type_string()` calls Actions should now be typed using the `tap()` method and `Action::Map` types instead of `Action::String`s in order to enable modifier keys. --- src/cocoa_bridge.rs | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/cocoa_bridge.rs b/src/cocoa_bridge.rs index c2e493b..ec9497d 100644 --- a/src/cocoa_bridge.rs +++ b/src/cocoa_bridge.rs @@ -292,15 +292,7 @@ mode { if let Some(map) = mode.get(trigger) { return match map.kind { MapKind::Map => { - if let Action::String(s) = &map.action { - type_string(s, &[], 0.0, 0.0); - - Some( - KeyActionResult::new(ActionKind::Map) - .with_action(s) - .in_mode(trigger) - ) - } else if let Action::Map(action) = &map.action { + if let Action::Map(action) = &map.action { for key in action { key.tap() } @@ -326,14 +318,7 @@ mode { if let Some(map) = map { return match map.kind { MapKind::Map => { - if let Action::String(s) = &map.action { - type_string(s, &[], 0.0, 0.0); - - Some( - KeyActionResult::new(ActionKind::Map) - .with_action(s) - ) - } else if let Action::Map(action) = &map.action { + if let Action::Map(action) = &map.action { for key in action { key.tap() } -- cgit v1.2.3