From d8392b4e48e106711d92ca94098ff527e4879702 Mon Sep 17 00:00:00 2001 From: Federico Terzi Date: Sat, 25 Jan 2020 14:58:07 +0100 Subject: [PATCH] Fix bug that prevented certain applications, such as Photoshop, from working correctly with espanso on macOS. Fix #159 --- native/libmacbridge/bridge.mm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/native/libmacbridge/bridge.mm b/native/libmacbridge/bridge.mm index 0280789..564405b 100644 --- a/native/libmacbridge/bridge.mm +++ b/native/libmacbridge/bridge.mm @@ -101,6 +101,14 @@ void send_string(const char * string) { usleep(2000); + // Some applications require an explicit release of the space key + // For more information: https://github.com/federico-terzi/espanso/issues/159 + CGEventRef e2 = CGEventCreateKeyboardEvent(NULL, 0x31, false); + CGEventPost(kCGHIDEventTap, e2); + CFRelease(e2); + + usleep(2000); + i += chunk_size; } });