diff options
| author | Teddy Wing | 2018-10-03 15:40:04 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2018-10-03 15:40:04 +0200 | 
| commit | 76100132d1d855bb3ecaf4fc73354e7414ef7c19 (patch) | |
| tree | 744119217454c270ddf50d4b7c566a4752a0242e /src | |
| parent | 997374f109adbe62c4e55c7d58cfecf8a2e43b9b (diff) | |
| download | dome-key-map-76100132d1d855bb3ecaf4fc73354e7414ef7c19.tar.bz2 | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/cocoa_bridge.rs | 19 | 
1 files changed, 2 insertions, 17 deletions
| 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 <play><up> {                      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 <play><up> {                  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()                                  } | 
