From 0dc132e5cbda012dff9faed9a115e2d96c1419af Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Mon, 24 Sep 2018 18:13:25 +0200 Subject: run_key_action_for_mode(): Simulate key press on `map` type action For now this is just a test and doesn't handle modifier keys. Just trying to see if 'autopilot' will work. --- src/cocoa_bridge.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/cocoa_bridge.rs') diff --git a/src/cocoa_bridge.rs b/src/cocoa_bridge.rs index 5f6cee7..6e1a41b 100644 --- a/src/cocoa_bridge.rs +++ b/src/cocoa_bridge.rs @@ -3,6 +3,7 @@ use std::mem; use std::ptr; use std::slice; +use autopilot::key::type_string; // use cocoa::base::nil; // use cocoa::foundation::{NSArray, NSAutoreleasePool, NSDictionary}; use libc::{c_char, size_t}; @@ -258,6 +259,8 @@ mode { if let Some(map) = map { return match map.kind { MapKind::Map => { + type_string(&map.action, &[], 0.0, 0.0); + Some( KeyActionResult::new(ActionKind::Map) .with_action(&map.action) -- cgit v1.2.3