Toggling F-Keys

Great Discussion, thanks all of you for the good solutions!

So here's my contribution to this.
I've made an automatic switcher, depending on the application that's being used. For Example: I only need this, when i'm in Lightroom, otherwise I don't. So i adjusted the script a little bit, to activate the option, if the Application is active and to deactivate, if its inactive.
So far, it works pretty well, maybe it will help some of you :relaxed:

Best Regards
Edi

FNKeySwitcher Macros.kmmacros (6.4 KB)

Do you have an idea about how to update this for the Ventura System Settings?

Call up Apple and ask them to kindly put the new System Settings out of our misery and either revert it back to System Preferences, or replace it with something that isn't a horrible maze of nested disasters.

As near as I can tell you'd have to:

  • Open the Keyboard preferences pane.
  • Click the Keyboard Shortcuts… button.
  • Switch to the Function Keys panel.
  • Toggle to the switch.

You basically have to implement that sequence, either with UI actions, or maybe AppleScript accessibility.

I can say that this will be easier with the next version of Keyboard Maestro.

But for now, you have to do it all the hard way, probably with a bunch of Click at Found Image actions and delays.

Note that switching to the Function Keys panel can be done using the Insert Text by Typing action to use type ahead to type "Function".

2 Likes

Thanks!

I hacked something together for now:

image

1 Like

Hi can you kindly share this as a downloadable macro? Thanks!

Sure.
Change Function Keys.kmmacros (341.8 KB)

This works on macOS Ventura 13.4

1 Like

Cool! Probably slightly more elegant than my macro. :slight_smile:

Following the read.me, in my case, in Sonoma 14.2.1, this script-turned-into-an-application opens System Settings but does not go into Keyboard Shortcuts or any further. Also, trying to run it as a script from on a Streamdeck gives the same result.

I am not a coder. Is there something else I need to be doing

I should add, that I’ve turned on the accessibility feature in the security and privacy settings for this application, but each time I run the application I get an error saying that Toggling F-Keys doesn’t have permission to use assistive etc.