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.
    Hardware function keys Macros.kmmacros (32 KB)
    hardware macro group
2 Likes

Edit...Uploaded correct version of group.