Topic: [not a bug - solved] I'm unable to use the F[number] keys on macOS  (Read 10106 times)


srukle

« on: September 13, 2021, 05:38:18 AM »
I'm an old Linux user, so I'm not too familiar with this issue. The F6 command to look at cultural maps doesn't work. Instead, it sets my nighttime mode for Mac, which is not what I want to do. There doesn't appear to be an option to change this. Any ideas?
« Last Edit: September 13, 2021, 10:10:58 PM by Sami »

koteko

« Reply #1 on: September 13, 2021, 01:58:37 PM »
In MacOS, to access the F-keys you need to use Fn+Fx. By default, the F-keys are bound to special behaviours (like brightness etc).

This can easily be changed to match the behaviour on Windows/Linux laptops:

Quote
Choose Apple menu > System Preferences.
Click Keyboard.
Select "Use F1, F2, etc. keys as standard function keys".

srukle

« Reply #2 on: September 13, 2021, 05:11:28 PM »
In MacOS, to access the F-keys you need to use Fn+Fx. By default, the F-keys are bound to special behaviours (like brightness etc).

This can easily be changed to match the behaviour on Windows/Linux laptops:

Quote
Choose Apple menu > System Preferences.
Click Keyboard.
Select "Use F1, F2, etc. keys as standard function keys".

Thank you for the recommendation.

I can confirm Fn+Fx works.

For users who may not be familiar with where Fn is located, it is a single key on the board. Bottom left, typically labeled "fn," and then you proceed with the F key you want. For example, hold fn key down with your left hand, then F6 key with your right.

JP_Finn

  • Honorary Lifetime Supporter
  • Member
  • *
  • Posts: 1207
  • Total likes: 656
  • Thawed Finn in SoCal
    • View Profile
« Reply #3 on: September 15, 2021, 10:15:22 PM »
Write a start up Apple script by adding the Fn key toggle:
Code: [Select]
--Check if GUI Scripting is Enabled
tell application "System Events"
    if not UI elements enabled then
        set UI elements enabled to true
    end if
end tell
--Enable/Disable "Use all F1, F2, etc. keys as standard function keys" option in Keyboard & Mouse Preference pane and close System Preferences
tell application "System Events"
    tell application "System Preferences"
        reveal anchor "keyboardTab" of pane "com.apple.preference.keyboard"
    end tell
    click checkbox 1 of tab group 1 of window 1 of application process "System Preferences"
end tell
if application "System Preferences" is running then
    tell application "System Preferences" to quit
end if

And then start the game:
Code: [Select]

open application “UrW”


And then after the application exits, run the top part of script again, this time toggling the Fn off, which is exactly the same.

DISCLAIMER: I’m not on my Mac to actually test or post the whole script “turnkey” style.
IF I remember, I’ll see if can make it so...
DISCLAIMER 2: switching between apps while the game is running, the Fn controls will be inverse, e.g. volume up / down would require holding down Fn, then pressing F11/F12 (or what ever the keys are for volume control)