Can I Detect Whether I'm in Launchpad?

I would like to be able to have a trigger like "when I enter/exit launchpad", but no existing trigger seems to work.
Is there any clever workaround for it? Or may I suggest that the dev make it possible?

1 Like

Hey Jay,

LaunchPad doesn't show up as an application, so it's doing some oddball things Keyboard Maestro cannot detect.

You can see for yourself by running this macro when LaunchPad is in front.

-Chris


Discover Front Application.kmmacros (2.7 KB)

1 Like

How about you only use KM to launch Launchpad, then you can detect that macro?

My desire is to change the defualt Launchpad shortcuts. It's currently command+arrowkey, my want is for it to be control+arrowkey. Looks like this is still not possible?

Doesn't it work to change the Launchpad shortcut using the checkbox in the middle of this panel in the System Preferences app?

1 Like

No, that's the shortcut for launching Launchpad... looking to change the shortcuts that become available once it's opened.

e.g. to move though launchpad left or right use command+arrowkey / two finger swipe... what I mean to say is there are shortcuts within Launchpad that are not listed in system preferences as far as I could find, not sure where they are? or if they are changeable as Launchpad is not measured as an app in some perspectives and is in others, but it would be really nice to change them as I use Launchpad a lot.

It loops back to KM as I could make a macro to execute the shortcut that is possibly unchangeable (mentioned in last paragraph). e.g. make a keyboard shortcut in KM to press a different keyboard shortcut. But for that to work KM would need to know it's currently running in Lauchpad, hence the question that heads this thread.

I hope I make sense :woozy_face:

Of course that makes sense. My responses are probably wrong 20% of the time, like this one was here.

My only suggestion now is that you can do an image search in KM for an "Apple Logo" in the upper left part of the Menu Bar. If there is no Menu Bar then you might be in Launchpad, I guess. Or you could be in a full screen mode in an app, but I think that that can also be detected using KM.

Using this method you might be able to use a macro that applies in every app to exit the macro if Launchpad is detected using this method.

Does this make sense? Or are we still in my 20% likelihood of being wrong?

Hey Leland,

You can detect whether the Launchpad is open, although you have to resort to AppleScript UI-Scripting.

-Chris

--------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2021/12/06 03:08
# dMod: 2021/12/06 03:08 
# Appl: Dock, System Events
# Task: Detect Whether the Launchpad is Open.
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @Dock, @System_Events, @Detect, @Launchpad
--------------------------------------------------------

tell application "System Events"
   tell application process "Dock"
      set LaunchpadIsOpen to exists of group "Launchpad"
      return LaunchpadIsOpen as text
   end tell
end tell

--------------------------------------------------------
1 Like

Brilliant! :grinning_face_with_smiling_eyes:

Move to the Left in Launchpad.kmmacros (4.0 KB)
Move to the Right in Launchpad.kmmacros (4.0 KB)


1 Like