Fn Key Function

I've found that the Fn key is not accepted as a modifier hotkey for a trigger, is there a reason for this?

I guess the fn key is too low level. You can’t use it as modifier for macOS shortcuts either.

I don't know the reason, but if you want to change this, I recommend Karabiner.

I use Karabiner for the caps lock key but not sure I want to change the Fn key's functionality. In the case of the caps lock I did.

Generally, the Fn key is not a real key, not a modifier like Option or Shift, but instead is a hardware toggle, that toggles the meaning of the function keys between their function key behaviour and their hardware key behaviour.

The Fn key is not supported by the system Hot Key API.

However, if you're using a non-Apple keyboard (I'm typing this on a Microsoft Natural Ergonomic 4000 keyboard) you might have more luck. I'm using the F-Lock key as a toggle for my microphone. :slight_smile:

2 Likes

I just figured out that BetterTouchTool handles the fn key as a key modifier.
So you can create any shortcut with the FN key. Pretty handy !
And from BetterTouchTool, you can easily call any macro in keyboardmaestro.
Hope that helps !

1 Like

How do I call a Keyboard Maestro macro via BetterTouchTool?

The reason I want to try this is because BetterTouchTool allows for using the Fn key as a hotkey trigger.

Hi @bocciaman, take a look at this post:

I use an action in BetterTouchTool to open an url like : kmtrigger://macro=[UUID]
(See here : trigger:URL [Keyboard Maestro Wiki])
To get the UUID of a macro :
Edit > Copy As > Copy UUID

2 Likes

Even better, you can create a Keyboard Maestro macro to copy the UUID into the clipboard and then convert it into a kmtrigger URL ready for pasting. I'm using that a lot as I continue to configure my Stream Deck

I tried the open URL as well as AppleScript, neither worked for me.

Here is BTT

Here is Keyboard Maestro

It appears to be quite possible to remap the Fn key on a Mac keyboard. As noted Better Touch Tool implements it, as does Emacs. It can be reassigned in the MacOS System Preferences for Keyboard.

In my opinion, they didn't allow it as a modifier because either 1) they're saving it for a later version, 2) they didn't think many users would want to use it, or 3) they're lazy.

Here's a possible work around. You can change the keyboard mapping on the OS level, so you don't need to run a separate application. You do this with the command line tool hidutil. Do an internet search; there are many places where this is explained.

For some reason, Apple makes it hard to find the code for the Fn key, but it seems to be
0xFF00000003.

Using this, you can remap the Fn key to/from any other key you like. Exchange it with something conventient that KM can handle.

The hot key API does not support the Fn key, nor does it differentiate between left and right modifier keys.

Remapping the Fn key can be done with low level tools. Maybe one day Keyboard Maestro will include low level remapping of keys, but it does not currently. Low level key remapping is really below the level that Keyboard Maestro operates.

This is borderline rude.

There is no such thing as “saving it for a later version” - my todo list is a mile long and has thousands of entries, one of which is low level key remapping. The fact that it hasn't been done is not “saving it for a later version”, it is “other things have had higher priority in my view, which at the end of the day is the only view that matters for what I implement”.

And “they're lazy” is just plain rude, and if you persist with rudeness, you will not be welcome on my forum.

Keyboard Maestro does not implement things that are not available with public APIs, which is why Keyboard Maestro back to version 4 (released over a decade ago) runs on Apple Silicon Macs. That's not lazy, that is a design choice and careful programming.

Keyboard Maestro does not solve all problems for all people, nor does it implement all features everyone wants, or even all features I want. That's called finite resources.

hidutil was not released in 10.11 which is what Keyboard Maestro 9.x supports. hidutil is interesting, and Apple describes the code to do it directly in TN2450, but hidutil and the method described there only remap a key to another single key, which, while useful, does not (at least as far as I can tell) provide the ability of Karabiner Elements to map Caps Lock to the Hyper Key (Command, Control, Option, Shift) which is what appeals most to Keyboard Maestro users generally.

So you can use hidutil to remap the Fn key to Control, for example, and then use Fn/Control as a hot key modifier, but it would conflict with existing uses of Control, not provide any new space for hot keys (as the Hyper Key effectively does since pressing all the modifiers is rather cumbersome).

So yes, Keyboard Maestro might support the hidutil remapping in the future, but since it does not actually provide the Hyper Key facility, it is a relatively low priority, and since you can already do it yourself using hidutil, and using an Login trigger, and it does not interact with any other Keyboard Maestro features, there is even less reason for me to implement it.

9 Likes

Thanks for the tip provided here! I use BetterTouchTool (from my Setapp subscription) to map my F4 function key to launchpad.

1 Like

OK, so how would I make a KM shortcut to launch Quick Note in macOS Monterey.
The keyboard shortcut Apple provides is fn Q.

1 Like

You can change the Mac OS shortcut to Quick Note to a shortcut that doesn’t need the fn key.

About three quarters of the way down this article it tells you how to do that. (It’s a good article on Quick Note as well so, worth reading anyway).

2 Likes

Thanks. I thought of that at about 3:00 am after I posted the question. And thanks for the link to the article. I saw that, but didn't read it carefully.

Also, in System Preferences > Keyboard > Shortcuts, Apple calls the key the "globe" key, and on my new Magic Keyboard, it's labeled with both fn and a globe icon :globe_with_meridians:. I wonder if that means they will expand its capability in the future.

It’s already enabled. The Globe Key changes input language. :grinning: