Issue in one app Fn via Shift-Fn

I use the function keys as global app shortcuts (like F1 activates Finder, F2 Mail, etc).

I want to keep this logic, but I have a few apps which use function keys them selves heavily. So in these apps I want to set up the following:

  • Fn still issues the Keyboard Maestro app shortcuts
  • Shift-Fn issues Fn in the front application

Suroriusnigly, for individual Fn keys, e.g. the F2 key, the attached macro seems to work. But of course I have to write a macro per Fn key.

It would be more elegant and maintainable to create one macro which reacts to all Shift-Fn events and issues the appropriate Fn key stroke. Is this possible?

That, of course, is the issue with having dedicated, global function keys. I suppose you've been doing this for years, and now your muscle memory is firmly ingrained. But I have to ask:

  • Have you ever tried using Spotlight to launch/activate apps?
  • Have you ever tried using LaunchBar to launch/activate apps?

LB is my favorite by far. It works out-of-the-box just by typing the first few characters of the app name. But for those I use often, I assign a specific LB shortcut (abbreviation) to them, like "F" for finder; "PF" for Path Finder; "KM" for Keyboard Maestro, etc.

LB has a free trial, so you might give it a try. :wink:

Now, if you really want to use FKs like you requested, you might try this:
In the Macro Group for your standard app activation, add an "Except for" condition, like this:


So, when any of those Apps are active (frontmost), the FKs in that Group would NOT be active. Thus, in the Group for each of those apps, you can use one of the FK triggers in the above Group.

Make sense?

Of course, I have to ask this. When you are in one of the excepted apps, how do you activate the app normally triggered by the same FK?

Does that answer the question in our OP?
More questions?

Thanks for your reply, J Michael.

What I do I keep the general app activation via Fn keys in all apps, even the "excepted apps" (which use the internal Fn Keys for things). In these apps I use the menus instead.

But I would like to use shift-Fn in the expected apps to issue Fn internally. I can do that for an Fn key individually, like for the F2 Key in my macro above, but it would be nice to do it for *all Fn keys in one macro. I mean: Taking the key pressed, strip it from the shift modifier and re-issue it. - But I guess that is not possible, or is it?

Sure it is.

In ONE Macro, assign ALL of the Fn (or SHIFT-Fn) that you want as triggers.
Then, from that macro, use the TriggerValue token in a Switch or Case action to either perform the actual actions for the Fn, OR, call another macro to do it using the Execute a Macro action.


The TriggerValue is cool! Thanks for pointing it out.

I had a look and it is string like "⇧F2". In the string I'm sure I can separate the "F2", but is it possible to issue that key held in a variable? (Preferably without a case statement, but rather as a keystroke issued dynamically from the content of a variable...)