Hi! So, I have a 2014 MacBook Pro with the fn key permanently taped down. Which is fine when running macOS, as the fn key is disabled in system settings. With Linux however, I need to relay on an external keyboard, because the taped down fn key is preventing essential keys like backspace and return to function properly.

Is there a way to disable the fn key under Arch with Wayland and River WM? All I could find is keyd, which seems great, except it doesn’t work on my machine when it comes to the fn key.

Everything is fine according to both sudo journalctl -eu keyd and sudo systemctl status keyd . Here’s my /etc/keyd/default.conf :

[ids]  

05ac:025a:21458be1 # Apple Inc. Internal Keyboard  

[main]  

a = b # Just for testing  
b = a # Just for testing  
fn = noop # Disable the fn key  

Swapping a and b does work, but for some reason, disabling the fn key doesn’t. Or at least, it still prevents me to use backspace or return on the internal keyboard.

Another one I tried is Input Remapper, alas sudo input-remapper-control --list-devices sees every device, internal trackpad included, but not the internal keyboard. So that one’s probably out anyway.

If anyone is able to think of something before I spend money I don’t have on a second decade old laptop just to SSH into my MacBook when my body prevents me from sitting at the desk, that would be much appreciated.

Thanks! c:

Wait, why the heck is your fn key taped down?!

In 2019, I spilled a little water next to my MacBook. After that, it would refuse to boot, shutting itself down during the loading sequence. I then realized that pressing random keys during its initialization would get my Mac to start up. Once logged in however, it would turn off after a few seconds. Cried a lot before eventually finding out that any lack of activity for 500 ms would cause the laptop to shut down instantly. Never could find a proper solution, or even someone with the same issue, although I’m sure it’s due to Apple’s usual shenanigans and not a real hardware issue: this was never a problem with Linux. So, rather than losing my only computer, I sacrificed my fn key. Six years later, this machine proclaimed dead by a Genius is still running Arch Linux and macOS Mojave just fine. Morale of the story? Fuck Apple, and maybe my neurological disorder and shaky hands too, but mostly Apple.

Edit:

Solution provided by @Oinks@lemmy.blahaj.zone. Many thanks to her!

To disable the fn key temporarily:
echo 0 | sudo tee /sys/module/hid_apple/parameters/fnmode

And done!

To disable the fn key permanently:
echo options hid_apple fnmode=0 | sudo tee -a /etc/modprobe.d/hid_apple.conf

And then regenerate the initramfs. If you’re using Arch like me, it’s:
sudo mkinitcpio -P

Thanks to everyone who tried to help! Much appreciated. c:

  • Oinks@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    21
    ·
    edit-2
    8 days ago

    FN keys are usually handled at a firmware, sometimes BIOS or driver level. This makes them completely inaccessible to keyboard remappers (they have no idea when it is pressed), which is why none of them can do this.

    This Stackexchange answer looks like it should contain the information you need, but I don’t have a 2014 MacBook to test it.

    • lstwndr@piefed.blahaj.zoneOP
      link
      fedilink
      English
      arrow-up
      14
      ·
      edit-2
      8 days ago

      Oh my gosh! It worked! It totally worked! You’re awesome! Thank you so, so much!

      To disable the fn key temporarily:
      echo 0 | sudo tee /sys/module/hid_apple/parameters/fnmode

      To disable the fn key permanently:
      echo options hid_apple fnmode=0 | sudo tee -a /etc/modprobe.d/hid_apple.conf

      And then regenerate the initramfs. If you’re using Arch like me, it’s:
      sudo mkinitcpio -P

      Being once again able to use my laptop while resting my back will make life much better.

      Thank you to infinity and beyond! Blåhaj bless you. <3