
Enabling the F4 key in macOS - mmastrac
https://boinkor.net/2017/11/enabling-the-f4-key-in-macos/
======
gilgoomesh
This is not about enabling the F4 key, it is about enabling the Dashboard key
which has been disabled for the last few versions of macOS.

Dashboard and F4 share a physical key but they are not the same and you can
hold down Fn to switch between the two, regardless of the keyboard
preferences. To be clear, this advice would generally apply only when you have
"Use F1, F2, etc. keys as standard function keys" switched _OFF_ in the
keyboard preferences.

If you're using these keys as regular function keys, they work as regular
function keys and have always done so.

~~~
mikestew
_To be clear, this advice would generally apply only when you have "Use F1,
F2, etc. keys as standard function keys" switched OFF in the keyboard
preferences._

And for further clarification, OFF is the default.

What I don’t understand is what the author expected. If they set this setting
to ON, then they won’t see the issue. If it’s OFF, then they expect a feature
that isn’t an included feature anymore?

~~~
exikyut
I'm not using macOS, but it sounds like the Dashboard key, which now does
nothing, is not sending F4 instead.

Unfortunately that's simultaneously perfectly consistent while it also
violates the principle of least surprise:

\- It remains technically correct - the Fn keys are in "do special thing
mode", and this key has no special thing associated with it any more

\- It is now a dead key, which is extremely confusing because, now that it
does absolutely nothing __under the default configuration__, it's arguable as
to why it's even there anymore. From the "my computer is a physical thing that
humans interact with" standpoint (as distinct from the "behold my
mathematically perfect 4GHz calculator" standpoint), it kinda makes a lot of
sense for that key to go "oh I just send F4 because I don't do anything
special" to me. In fact NOT doing that would irritate me no end!

Anecdotally, this reminds me of the recent 1+2+3 calculator incident in iOS:
it's pretty obvious all the frontline developers at Apple have touch-bar
MacBooks (something something "politically-correct forced dogfooding", oooooo)
so this inconsistency fell through the cracks.

Apple is starting to fragment from the bottom up in a big way...

~~~
esrauch
Surely you can see an argument for it potentially being more confusing that F4
sends a keystroke to your active application but none of the F keys do?

~~~
pluma
Non-macOS user here on a random laptop: when I type Fn+<some key> and that key
doesn't have a special function that can be invoked using the Fn key, the
result is the same as not holding the Fn key.

If the behaviour of the Fn key were inversed (i.e. keys with special functions
perform that function unless the Fn key is held down), I would still expect
regular keys to work normally no matter where on the keyboard they are. The F#
keys aren't special.

------
makecheck
This is kind of short on details but a few things I’m curious about...

First, function keys are not necessarily “normal” when pressed; by default
they also require “fn” to be pressed, otherwise they perform a system function
(Dashboard, sound volume, etc.). And since you can _turn off_ a lot of these
features in System Preferences, I can imagine that these keys might be set to
do nothing.

It is also possible for Mac applications to install _system-wide_ hot keys,
theoretically overriding even single key presses. At the very _least_ you need
to know what apps are currently running to debug this.

It is also possible to install your own keyboard overrides, through System
Preferences. Need to check those.

I’m probably missing some other things. The Mac is extremely flexible when it
comes to the keyboard.

~~~
dingo_bat
> The Mac is extremely flexible when it comes to the keyboard.

True, but the fact that macbooks ship with a keyboard lacking page up, page
down, home and end just frustrates me to no end. Much smaller sized laptops
manage to include those keys while maintaining comfort. And you cannot make up
for missing keys with key combos.

~~~
Cyberdog
> And you cannot make up for missing keys with key combos.

If you're saying you can't replicate those keys with key combos: Fn-Up Arrow,
Fn-Down Arrow, Fn-Left Arrow and Fn-Right Arrow perform PgUp, PgDn, Home, and
End, respectively.

If you're saying key combos are not a suitable replacement for those keys
being not present: Well, I make do, personally.

~~~
_asummers
Home/End can also be accomplished with Cmd up/down.

~~~
mikestew
Or (EDIT: whoops, Ctrl not Cmd) Ctrl-A and Ctrl-E, Emacs style. In fact, a lot
of Emacs navigation combos work just about everywhere on macOS. I have a
keyboard with all of the keys the laptop keyboard leaves off, but I find that
I don’t use them on macOS.

~~~
_asummers
Cmd-a is select all in OSX by default and Cmd-e does nothing for me. The
capital versions don't do anything noteworthy for me either. In emacs,
home/end would be M-< and M-> no? To your point, Ctrl-a/e/f/b/n/p all work as
they do in emacs in OSX.

~~~
bipson
CMD-e used to be "eject selected disk" in Finder/desktop. Will thus also cause
the error-"bloing"/"don't know what you want"\- sound on most macOS versions,
if nothing suitable is selected.

~~~
mercutio2
CMD-e is apply the selected text to the search input. Extremely useful, search
for the next instance of a word you see on the screen is thus:

Double click word CMD-e CMD-g

~~~
bipson
Don't know what (which program) you are referring to, I was referring to
official MacOS shortcuts and the Finder [1] (Search for "Command-E")

[1] [https://support.apple.com/en-us/HT201236](https://support.apple.com/en-
us/HT201236)

------
doomlaser
As long as we're discussing system-wide keycode tricks, I wrote a prefpane
that allows you to hide the Mac's cursor at any time with a hotkey.

[http://doomlaser.com/cursorcerer-hide-your-cursor-at-
will/](http://doomlaser.com/cursorcerer-hide-your-cursor-at-will/)

Useful for when full-screen web videos flake out on this, recording the iOS
simulator, and a number of other situations.

------
pschastain
The keycodes listed in the article are wrong. F4 is 118; F5 is 96. Not sure
why it worked for the author. For any interested, a full list of macOS
keycodes can be found here: [http://macbiblioblog.blogspot.com/2014/12/key-
codes-for-func...](http://macbiblioblog.blogspot.com/2014/12/key-codes-for-
function-and-special-keys.html)

------
egypturnash
If you want to do a lot more to change keys, consider Karabiner:
[https://pqrs.org/osx/karabiner/](https://pqrs.org/osx/karabiner/)

I use it to turn |\ into forwards delete (with fn \ emitting a \\) and to turn
caps lock into cmd-alt-shift. You can do some really crazy things with it if
you’re sufficiently dedicated.

~~~
jeffhuys
Be aware, though, that the newest version (Karabiner-Elements) has a bug where
a key might get stuck. Which means you won't be able to login if SHIFT or a
letter is stuck. I eventually removed it, because I lost work a few times
because of this.

~~~
egypturnash
Works fine for me. Though I don't remap shift or any letters.

------
dailyvijeos
Neat. Seems like a powerful way to do most common key remapping without a kext
like Karabiner Elements.

~~~
pavel_lishin
Does it work for other arbitrary keys?

~~~
cc33
I don't think so. It should only work with this specific key.

------
S_A_P
I have similar troubles with the f11 key. I only use it in windows(step into)
but it has never worked on Mac. I guess the next thing to do is try this
milder fix for key 96+7?

------
emmelaich
While we're here does anyone know what the volume keys are for a non-apple
keyboard attached to a Mac?

~~~
danaliv
Depends on the keyboard I suppose; if you want to remap keys I recommend
Karabiner: [https://pqrs.org/osx/karabiner/](https://pqrs.org/osx/karabiner/)

I use it with my WASD custom and it works great.

------
ashleyn
It's stuff like this that routinely puts off power users from macOS.

~~~
oxguy3
Agreed -- I would dump macOS for Debian in a second if it weren't for my
workplace trying to standardize everyone on one OS. The fact that I have to
buy a third-party app just to disable mouse/scroll acceleration and enable my
mouse's extra buttons is absolutely ludicrous.

(if anyone is wondering, the third-party app I speak of is Smooze, and it's a
godsend [https://smooze.co/](https://smooze.co/))

~~~
Cyberdog
> Moustache: This app also includes a moustache.

 _finger-down-throat gesture accompanied by retching noises_

At any rate, you can configure the "extra buttons" on most mice to do tasks on
the Mac without special software. For example, I have a gaming mouse at home,
and have one of the buttons configured to trigger Mission Control (showing
miniature images of all windows open across all apps) merely through the Mouse
pane of System Preferences. Also, games detect the extra buttons and can be
configured to use them with no problem.

But yes, disabling mouse acceleration should be a built-in feature as well,
and it is not.

------
mattbroekhuis
Get better touch tool

------
pavel_lishin
Apple feels like a hot mess right now. I spilled water into my wired keyboard,
so they gave me a wireless one. The volume controls on it don't work. No magic
combination of the Function key and F11 and F12 (I think? It's not in front of
me) would work. The keyboard viewer showed a big blank. Plugging it in and
turning off the wireless feature did nothing.

I stuffed it into a desk drawer, and stole one from the desk of a departed
coworker. If I spill water in that, I might ask them to order me another wired
one, if Apple still bothers making them.

I know it's a small thing. But reaching over to my laptop to adjust the
volume, or hunting for it with my mouse is annoying. It's one small papercut
out of many.

~~~
sammoorhouse
> Apple feels like a hot mess right now

Because you spilled water on your keyboard?

~~~
pavel_lishin
The new wireless keyboard had the problem, not the damaged keyboard.

