mojira.dev
MC-121389

Function key can no longer be bound in macOS

Workaround

Per @unknown's comment, it is possible to use external software to remap the keys. See that comment for more info.

The bug

Since 17w43a, the Function key can no longer be bound in controls in macOS. Previously, it could be bound and would show up as FUNCTION.

How to reproduce

  1. Go to Options > Controls.

  2. Select a control.

  3. Press the Function key to try to bind the key to the control. Notice that nothing happens; the key press is ignored.

Related issues

MC-124461 "Fn" key on Bottom left corner can't use to control game MC-124659 Cannot bind Function key on OSX MC-125835 Can't set to FUNCTION key on Mac MC-132659 "Fn" Key on Mac can no longer be assigned as a key under "Controls MC-133231 "FUNCTION" Key not applicable on controls MC-133940 Unable to bind fn key to action MC-134627 'Function' key not useable for macs. MC-134683 "Fn" key not settable as keybind on Mac MC-134739 Can't set fn as sprint key on controls MC-139019 Can't use Function as a control on Mac MC-139619 "fn" key on macOS keyboard not responding. MC-140789 Left Click Problem MC-141874 OSX: Not possible to assign the function-key (fn) MC-157318 Key Binding on mac MC-160489 Function Button (fn) doesn't work for controls anymore MC-185829 Unable to select controls MC-186863 Unable to select controls MC-227121 Control Settings Bug

Comments

migrated

When will you fix this?It's very important to our Mac users. Use ctrl key to run will hurt our little finger.

migrated

Why hasn't this been fixed yet? Still not fixed in pre-4.

migrated

Is this bug that difficult to fix? What should our mac users do? buy an external keyboard? Okay. If Mojang can't fix that. I have a solution to temporary fix this problem. 

 

  1. Install Karabiner

  2. Enable Karabiner

  3. Open file ~/.config/karabiner/karabiner.json

  4. Insert following text into *“rules”: [ ]*

  5. Save file.

  6. Set sprint key to “=”, and use key ";" as "fn" key.

  7. Enjoy and waiting for Mojang to fix it. (forever?)

{
            "description": "Fn in Minecraft",
            "manipulators": [{
                    "conditions": [{
                        "file_paths": ["/Applications/Minecraft.app/Contents/runtime/jre-x64/1.8.0_74/bin/java"],
                        "type": "frontmost_application_if"
                    }],
                    "from": {
                        "key_code": "fn"
                    },
                    "to": [{
                        "key_code": "equal_sign"
                    }],
                    "type": "basic"
                },
                {
                    "conditions": [{
                        "file_paths": ["/Applications/Minecraft.app/Contents/runtime/jre-x64/1.8.0_74/bin/java"],
                        "type": "frontmost_application_if"
                    }],
                    "from": {
                        "key_code": "semicolon",
                        "modifiers": {
                            "optional": ["any"]
                        }
                    },
                    "to": [{
                        "key_code": "fn"
                    }],
                    "type": "basic"
                }
            ]
        }
pokechu22

To my understanding, yes, it is a complicated one. Partially because of MC-29501, and partially because this is an issue in the library the game uses and not the game itself.

migrated

I hate to be that one guy; however, @Jinyu Meng's solution is not viable. While it does let us use the "FUNCTION" key as our sprint, it makes us have to reconfigure our Dual-Wielding key. Along with that, in most scenarios, we'll have to use both hands in order to toggle our #F-keys rather than 1 as before. Using this solution also prevents us from typing the letter "F" in chat, making this extremely annoying on multiplayer as well as when you're doing command work. Lastly, using Karabiner effects ALL versions of the game, not just the 1.13 Pre-releases; moreover, making this a temporary but not great work-around

Really hoping this is fixed before the final release!

Avakining

Would @Jinyu Meng's solution also be applicable to MC-121376?

migrated

Are you going to fix it? I really can't play in 1.13 because of that issue.. 
Please do something about that 

migrated

I changed the keys in my script to "=" and ";". These keys are not commonly use in chat or commands.

Avakining

Still occurs in 19w02a

migrated

Still hasn't been fixed. Really annoying. Used the fn key for changing perspective.

migrated

Why can't it just be reverted to how it was before?

migrated

Also, it affects every version from 1.13 and up

migrated

I couldn't get @Jinyu Meng's code to work initially, so I changed in the file path from "/Applications/Minecraft.app/Contents/runtime/jre-x64/1.8.0_74/bin/java" to "/Application Support/minecraft/runtime/jre-x64/jre.bundle/Contents/"

Hope this helps to anyone out there!

migrated

I use the fn key to sprint but since I can't bind it to sprint in 1.16, I have to use control, but that hurts my finger and when I sprint with it, and my attack/destroy keybind (left mouse button) doesn't work when I sprint with control.

[Mod] markderickson

Can confirm in 21w07a.

wobst.michael

Can this still be reproduced in 22w16b or later?

Avakining

Yes, still applies to 22w16b

migrated

i can confirm in 1.19.4

clamlol

Can confirm in 24w03b, but may be Works as Intended/Won't Fix. My understanding is that Apple doesn't intend for apps (generally) to be able to intercept the function key since doing so interferes with the behavior of F1, F2, etc, which is why any apps which do wish to intercept it must use a special workaround. The fact that Minecraft lacks such a workaround seems less like a bug and more like a choice to adhere to Apple's principles, annoying though they may be.

migrated

(Unassigned)

Confirmed

Platform

Normal

Accessibility, UI

controls, macos

Minecraft 17w43a, Minecraft 17w43b, Minecraft 17w45b, Minecraft 18w02a, Minecraft 18w03b, ..., 21w07a, 22w16b, 1.19 Pre-release 4, 1.19.4, 24w03b

Retrieved