How to Use Function Keys (aka Hardware Keys) as Triggers

I saw some people asking questions about this so I hope this will be useful.

Function keys are mostly used to change some hardware settings: adjusting luminosity/sound etc…This is the « normal » behavior.

Goal : Use the function keys to launch macros but only in RandomApplication. Keep their normal behavior everywhere else.

Problem: Keyboard Maestro has no possibility to capture the hardware keypresses.

Solution: disable hardware keys in system setting and recreate their function in Keyboard Maestro.

  • Check « Use all F1, F2, etc. keys as standard function keys » in system preferences under the Keyboard tab.
  • Get the following macro group into KM and activate it.
  • Set the group setting to be « available except in these application: RandomApplication »
  • Create all the F1,F2 etc…triggers you want in another group available in RandomApp.
     
    Download: Hardware function keys Macros.kmmacros (32 KB)
    hardware macro group
2 Likes

Edit...Uploaded correct version of group.

My Keyboard Maestro editor (v. 9.2) has no Hardware Function Keys macro group in the macro library. I used the search function of the Macro Library and searched for "function". It came up empty.

??

Hey JoJo,

Read through @Joseki post again – he's providing the macros...

-Chris

Chris,
Thank you so much!

My first time in the KM site. I’ll learn the syntax someday… :grin:

Cheers.

1 Like