aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTeddy Wing2018-09-25 13:45:00 +0200
committerTeddy Wing2018-09-25 13:45:00 +0200
commit587eeaf94a1336ab640197e124ec2648caf70686 (patch)
treeaadb53a8151531d197f2452f0e8c2992194d2aea /src
parent7a52917130bba42a772b278cce0db63db4fb43d5 (diff)
downloaddome-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.rs4
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 => {