diff options
| author | Teddy Wing | 2018-09-25 13:45:00 +0200 |
|---|---|---|
| committer | Teddy Wing | 2018-09-25 13:45:00 +0200 |
| commit | 587eeaf94a1336ab640197e124ec2648caf70686 (patch) | |
| tree | aadb53a8151531d197f2452f0e8c2992194d2aea /src | |
| parent | 7a52917130bba42a772b278cce0db63db4fb43d5 (diff) | |
| download | dome-key-map-587eeaf94a1336ab640197e124ec2648caf70686.tar.bz2 | |
run_key_action_for_mode(): Fix bugs from recent state & autopilot change
* Use `state.in_mode` as `in_mode` will always be `None` now
* Use `type_string` for map actions inside a mode. Otherwise the action
wouldn't be typed.
Diffstat (limited to 'src')
| -rw-r--r-- | src/cocoa_bridge.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cocoa_bridge.rs b/src/cocoa_bridge.rs index 8e3b0ad..396b8a6 100644 --- a/src/cocoa_bridge.rs +++ b/src/cocoa_bridge.rs @@ -268,6 +268,8 @@ mode <play><up> { if let Some(map) = mode.get(trigger) { return match map.kind { MapKind::Map => { + type_string(&map.action, &[], 0.0, 0.0); + Some( KeyActionResult::new(ActionKind::Map) .with_action(&map.action) @@ -286,7 +288,7 @@ mode <play><up> { } // TODO: make sure this doesn't run when in_mode - if in_mode.is_none() { + if state.in_mode.is_none() { if let Some(map) = map { return match map.kind { MapKind::Map => { |
