How to make Firefox part of my start up routine using a hotkey

I created a macro where I can type a few letter letters and it will launch and open up a bunch of programs whenever I want it to. Works just fine.

Someone suggested that instead I should be using a hot key to do the same thing as it would be more effective if I'm not actually typing the letters into a form or something.

So I did that. I made a macro that is a hot key and calls on the other macro to open the programs.

I like it. However, Firefox opens in safe mode. I don't like that.

If I trigger the macro by simply typing Firefox does not seem to enter safe mode.

But if I use the hot key to trigger the other macro that then opens the program, Firefox does open in safe mode.

So combining the two macros, the first fires off the second by way of a hot key, I experience problems with Firefox and only with Firefox. The rest seem to open just fine.

Any ideas?

You possibly don't know this but if you activate (run) Firefox with the key pressed, it starts up in safe mode.

So what's happening in your macro that is triggered by S is the key is still pressed when KM activates Firefox - and that's why you're seeing the behaviour you are.

I used this macro to test:

image

If I very quickly release the hot key trigger, then Firefox starts up normally. If I release the hot key trigger a bit slowly, then Firefox starts up in safe mode.

To overcome the fact that KM is faster than your fingers you can do either of these:

  1. Choose a hotkey that doesn't include
  2. Insert a short pause at the top of your macro. I tried 0.25 seconds which worked fine. It looks like this in my test:
    image

I'd probably go for the second option as you then don't have to worry about your fingers lingering on the keyboard...

As an aside you don't need two macros. Just add the additional trigger to your original macro which will then be triggered by either your typed string, or the hotkey combination of your choice.

1 Like
  1. Start your macro with a "Pause Until" action that pauses until the ⌥ key is released:

image

3 Likes

All of this info was exceptionally helpful. Thank you so much for the time you spent writing it. Makes perfect sense.

1 Like

I engaged this and it is working perfectly. In one way of seeing it I like it better than a pause that way I don't have to worry about how long I hold the key down as nothing is going to happen until my fingers get off it.

Is it possible to add the pause until conditions are met in the main macro without having to go two using two of them?

Using two of them works perfectly. But I can't figure out how to add it to this one.

You should be able to add it as the very first action, above the "Activate 1Password".

When you use the "typed string" trigger the ⌥ key won't be "pressed" so the "Pause" instantly un-pauses, when you use the hot key trigger it will "Pause" until the ⌥ key is released.

Trying to figure out where and how to add it.

I tried to type pause until and search for that but it doesn't seem to want to add before 1Password.

Could you perhaps tell me how to add something in before the programs are listed that are going to start up? I think that's what I'm missing.

I add actions wherever they feel like going, then drag them to the position that I want :wink:

But the proper way to do it is to select the action you want your new action to go before and then, whichever method you use to add an action, hold the Shift key down as you do so.

You can:

  • Go through the menus: Edit -> Insert Action -> Control Flow and then Shift-click on the "Pause Until" menu item
  • ⌃⌘A, type "Pause", and either Shift-click the "Pause Until" action or down-arrow until it is highlighted and then Shift-Return
  • Open the "Actions" pane (⌘K or click "New Action" at the bottom of the macro), navigate through that, and Shift-double-click on the item you want

Or if you are using the "Actions" pane, just drag what you want into the position you want it!

1 Like

For anybody reading this I found the following answer from analysis with ChatGPT. Here it is and it looks like it's working well.

To insert a “Pause Until” action in your Keyboard Maestro macro that waits until you release the trigger key(s):

  1. Open the Macro: In Keyboard Maestro, double-click your “Start my day” macro to open it.

  2. Add a “Pause Until” Action:

• Click the plus (+) button at the bottom left to add a new action.

• Search for “Pause Until” in the action search bar.

• Drag the “Pause Until” action to the top of your macro, above the “Will execute the following actions” section.

  1. Configure the Condition:

• In the “Pause Until” action, set the condition to:

All of the following are trueThe ModifiersNo modifiers.

This ensures the macro pauses until you release all keys involved in triggering the macro.

  1. Save the Macro:

• Press Command + S or click the “Save” button to save your changes.

Once added, the macro will wait until the trigger key(s) or modifiers are released before proceeding with the rest of the actions.

Thank you. This has been invaluable to me. The whole process has been extremely frustrating because of my lack of knowledge of how to do this. Thank you for your help and pointing me in the right direction.

Also for those who are struggling with this like I am, ChatGPT might be a real help to you. It understands keyboard Maestro pretty well.

I hope someone teaches ChatGPT that you don't save macros in KM and neither do you double-click them to edit.

Ignoring "Step 4", of course...

If you haven't already, spend time with the KM manual rather than ChatGPT. The "How To Create a Macro" section includes

You can add a new action by clicking the New Action button or the + button at the bottom of the macro detail view to display the list of actions or by choosing the Edit ➤ Insert Action By Name menu or choosing from the Edit ➤ Insert Action menu...You can reorder the actions by dragging them around.

There are two main problems with the manual:

  1. There's a lot of it, so its difficult to find what you want
  2. There's so much to KM that there's still things not mentioned in the manual!

Have at least a skim, so you've an idea of where to look for stuff. But if you're ever stuck for more than 5 minutes -- post here! There's plenty of people ready to help, and the average answer is way better than you'll get from an AI...

1 Like

Ha ha, right you are. I tried the control S to save and got nowhere. Quickly realized that it was not necessary.

And thank you for the suggestion to look at the manual. So many people don't read the manual. In this case, me either. But I will start looking through it more often when I need it.

Thank you for the link as well.

And yes, the people in this forum are incredibly helpful.

Thanks again for the help. It was invaluable to stop the frustration I've been experiencing.

General rule of thumb: When the swearing starts -- stop, and post here!

1 Like

Why not just change "This hot key: ..." is pressed" to "is released?

I'll confess I've never used (or even considered using) "is released" in a hot key trigger. What are the pros, cons, and gotchas?

Pro: if you use it to activate an application, you are not holding down "option" or any other keys if the app is being launched. Therefore it won't go into any non-standard mode that would otherwise have been triggered.

Con: a very slight delay till you remove your fingers from the keys. :slight_smile:

"Gotchas": none.

I use ⇧⌥⌘-i to activate Music.app (yes, that's "i" for "iTunes"—that key combination is an old one). I can't even remember now what happens if you hold down the option key while launching Music.app, so whatever that "feature" is, I don't miss it!

Well, here's a gotcha: try this macro

Download Macro(s): Test Hotkey release.kmmacros (1.6 KB)

Macro-Image

Keyboard Maestro Export

Macro-Notes
  • Macros are always disabled when imported into the Keyboard Maestro Editor.
    • The user must ensure the macro is enabled.
    • The user must also ensure the macro's parent macro-group is enabled.
System Information
  • macOS 13.6.1
  • Keyboard Maestro v11.0.3

The macro fires as expected when the hotkey is released.

Now do this: press the hotkey and then release the S key but keep the and keys pressed. The macro then fires - even though the two modifiers are still pressed.

Therefore I'd say that would not work for the OP's request and @Nige_S's approach is the correct one in this case.