How to do the following (open or focus and then send Keys)

Discussion, questions and support.
Post Reply
Mojito
Posts: 7
Joined: Feb 22nd, ’19, 01:51

Post by Mojito » Feb 24th, ’21, 10:42

I'm trying to do the following:

On Press CNTRL+K
1. Launch or Focus Facebook's Messenger app ) (window title Messenger )
2. Send CNTRL+K (this is the app's native kb shortcut that put focus on the Search bar)
- of course if Messenger already in focus then Fastkeys doesnt need to do anything (let Messenger receive the inputs directly)

Thanks
User avatar
Tom
Posts: 791
Joined: Nov 24th, ’15, 23:39

Post by Tom » Feb 24th, ’21, 19:25

Similar solution was posted here (you need to adjust application names):
viewtopic.php?t=1063

Then introduce a small pause to allow the software to load.
Mojito
Posts: 7
Joined: Feb 22nd, ’19, 01:51

Post by Mojito » Feb 26th, ’21, 11:11

im a total noob but i tried to follow..

here's what i got so far

https://i.imgur.com/vrBF2Td.jpeg

Seems i got most of it working but the problem is if the Messenger window is already in focus, and i send the CNTRL K key to it, FastKey keeps intercepting it

The issue is since i need to use the global hotkey CNTRL K which is also a native hotkey of the Messenger application .. is there a way for the script not to run or intercept the CNTRL K key if Messenger is already active and in focus? like a configuration to RUN SCRIPT ONLY IF MESSENGER IS NOT IN FOCUS - i can't seem to figure this one out.. again i can certainly do this with command script but by then it's too late the CNTRL K has already been intercepted :(
User avatar
Marko
Posts: 1718
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Feb 28th, ’21, 20:42

Why can't you use another shortcut?
Alternatively try adding a (~)Native option to the shortcut (click on ... button for Advanced options).
Post Reply