Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function keys do not work properly with certain keyboards on macOS #1683

Open
unilock opened this issue Nov 11, 2024 · 2 comments
Open

Function keys do not work properly with certain keyboards on macOS #1683

unilock opened this issue Nov 11, 2024 · 2 comments
Labels
1.20.1 Targeted at Minecraft 1.20.1 1.20.4 Targeted at Minecraft 1.20.4 1.21.1 Targeted at Minecraft 1.21.1 bug A bug or error triage Needs triaging and confirmation

Comments

@unilock
Copy link

unilock commented Nov 11, 2024

Minecraft Version: 1.20.1, 1.20.4, 1.21.1

NeoForge Version: 47.1.106, 20.4.237, 21.1.77

Logs: 1.21.1: https://gist.github.com/unilock/a699a9ebba05e3da37dbb5759e381f16

Steps to Reproduce:

  1. Install Minecraft 1.21.1 + NeoForge on macOS
  2. Attempt to bind a key to a function key (F1, F2, F3, ...)
  3. The key is bound as "Not Bound" instead

Description of issue:
The function keys (F1 thru F12) can't be used with keybinds (they always end up as "Not Bound"), and the debug keybinds (F3+x) just bring up the debug overlay instead of... debugging.

I assume this is because "F3" on macOS is technically "fn+F3" ("fn" being a separate key). I guess NeoForge detects the "fn" instead of (or before) the "F3", and treats it as an unknown key - thus "Not Bound".

Interestingly, editing options.txt to bind a function key results in that keybind working fine in-game.

All of this works without issue on both vanilla and Fabric.

Image

@unilock unilock added the triage Needs triaging and confirmation label Nov 11, 2024
@sciwhiz12 sciwhiz12 added bug A bug or error 1.20.4 Targeted at Minecraft 1.20.4 1.20.1 Targeted at Minecraft 1.20.1 1.21.1 Targeted at Minecraft 1.21.1 labels Nov 19, 2024
@covers1624
Copy link
Member

Hardware: M4 MacBook Pro.
OS: macOS Sequoia 15.1
Vanilla/Neo: 21.1.77
Java: Eclipse Adoptium 21.0.5

I tested with and without the macOS Use F keys as standard function keys setting, Settings -> Search (Function Keys) -> Use F keys as standard funtion keys.

On Vanilla, I am able to bind and use F key bindings as expected. Except for F3 + H in macOS function key mode, this always does a special action.

On Neo, I am able to use F key bindings as expected with the same semantics as Vanilla. Binding I am unable to set F keys only if I have FN held down prior to clicking on the key to rebind. Otherwise, it works as expected.

@unilock
Copy link
Author

unilock commented Nov 21, 2024

I have the "Use F1, F2, etc. keys as standard function keys" setting turned off, for what it's worth. Turning it on allows everything to work properly - but that's not an ideal solution for me...

Even in vanilla, F3+H doesn't work properly with the aforementioned setting disabled, so I guess that's not NeoForge's concern...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.20.1 Targeted at Minecraft 1.20.1 1.20.4 Targeted at Minecraft 1.20.4 1.21.1 Targeted at Minecraft 1.21.1 bug A bug or error triage Needs triaging and confirmation
Projects
None yet
Development

No branches or pull requests

3 participants