From 789ab04110c31738e02bc9a162ccce3c9215ea28 Mon Sep 17 00:00:00 2001 From: Jeremy Rand Date: Thu, 10 Mar 2022 22:57:23 -0500 Subject: [PATCH] Send the NDA window to the back during listening. This way, the key strokes generated has less chance of being consumed by the NDA window which won't do any good. Also add some more ideas for the future. --- .../jrand.xcuserdatad/xcschemes/xcschememanagement.plist | 8 ++++---- Listener/Readme.md | 2 ++ Listener/main.c | 2 ++ Listener/main.rez | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Listener.xcodeproj/xcuserdata/jrand.xcuserdatad/xcschemes/xcschememanagement.plist b/Listener.xcodeproj/xcuserdata/jrand.xcuserdatad/xcschemes/xcschememanagement.plist index 7eee78c..3a48605 100644 --- a/Listener.xcodeproj/xcuserdata/jrand.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/Listener.xcodeproj/xcuserdata/jrand.xcuserdatad/xcschemes/xcschememanagement.plist @@ -7,17 +7,17 @@ Archive.xcscheme_^#shared#^_ orderHint - 4 + 3 Binary.xcscheme_^#shared#^_ orderHint - 3 + 2 DiskImage.xcscheme_^#shared#^_ orderHint - 1 + 4 Listener.xcscheme_^#shared#^_ @@ -27,7 +27,7 @@ doNotBuild.xcscheme_^#shared#^_ orderHint - 2 + 1 diff --git a/Listener/Readme.md b/Listener/Readme.md index db7587d..40aab84 100644 --- a/Listener/Readme.md +++ b/Listener/Readme.md @@ -44,3 +44,5 @@ There are a number of improvements to make: * Perhaps a Siri shortcut so you can just tell your phone to dictate to your GS without even starting the ListenerApp. * Maybe a mode where instead of dictating text, you can dictate commands like "close window", "copy" and "paste" and the right standard commands are sent as key strokes. * Instead of injecting keyboard events through the Event Manager on the GS, look at injecting fake keypresses into ADB itself. This should improve compatibility with applications that do not get their key events from the Event Manager. Based on what I have read, the SendInfo toolbox routine with the keyCode command should be able to do this. It should be possible based on what things like Video Keyboard does in the System 6.0.1 distribution. +* Investigate if some minimal amount of bonjour support could be introduced on the GS side so that the modern device could detect its presence on the network. That way, you wouldn't need to set the IP address of the GS in the app. +* There have been suggestions to turn this into a general solution for integrating a modern machine with a GS. This might involve things like file transfer in either direction, clipboard syncing and perhaps other things along those lines. diff --git a/Listener/main.c b/Listener/main.c index fed0351..45bd2f6 100644 --- a/Listener/main.c +++ b/Listener/main.c @@ -484,6 +484,8 @@ void handleAwaitingMsgHeaderState(void) textTransfer->header.size = globals->messageHeader.messageArg; textTransfer->header.position = 0; newState(LISTEN_STATE_AWAITING_TEXT); + if (FrontWindow() == globals->winPtr) + SendBehind((GrafPortPtr)toBottom, globals->winPtr); break; default: diff --git a/Listener/main.rez b/Listener/main.rez index 508c7e8..a14251b 100644 --- a/Listener/main.rez +++ b/Listener/main.rez @@ -16,7 +16,7 @@ resource rVersion (1) { { 0, /* Major version number in BCD */ 9, /* Minor version number in BCD */ - 0, /* Bug version number in BCD */ + 1, /* Bug version number in BCD */ development,/* Development phase */ 0 /* Release number */ },