How to rebind the XF86RFKill (F10) media key

I’ve tried to rebind it through hyprland, but it always kills my wifi/bluetooth. Is there a way to rebind this key, or is this hardware hardcoded?

Which Linux distro are you using?
Fedora

Which release version?
41 (latest)

Which kernel are you using?
6.12.6

Which BIOS version are you using?
3.05

Which Framework Laptop 13 model are you using? (AMD Ryzen™ 7040 Series, Intel® Core™ Ultra Series 1, 13th Gen Intel® Core™ , 12th Gen Intel® Core™, 11th Gen Intel® Core™)
7040 13inch

XF86RFKill (F10) shouldn’t be hardcoded (handled in hardware). It’s been reported not to be on some Framework models at least.

You can check by turning on Airplane mode and doing

rfkill list all

Hardware RFkill will be listed as “Hard blocked: yes”.
In that case, the EC (Embedded Controller), or a physical hardware switch is using the RFkill pin on the Wifi/BT module, and that is outside of OS control. Those that have a malfunctioning hardware RFkill would need to apply tape over the RFkill pin to block it.

Presuming it’s not hardware RFkill, then you can rebind it or just disable it if you wish. But keys like RFkill (OS / software RFkill) are normally handled at a lower level than regular hotkeys. See Map scancodes to keycodes - ArchWiki (a great deal of infomation on ArchWiki applies outside of Arch as well).

TL;DR - this should do it
Create
/etc/udev/hwdb.d/99-keyboard-rebinds.hwdb

# /etc/udev/hwdb.d/99-keyboard-rebinds.hwdb
# reload / rebuild database after charges using sudo udevadm hwdb --update && sudo udevadm trigger
#
# format:  evdev:input:b{bus}v{vendor}p{product}
#
# Framework Laptop 13 RFkill key
# bus 0018 vendor 32AC product 0006

evdev:input:b0018v32ACp0006*
  KEYBOARD_KEY_100c6=f10

To just disable RFkill instead of binding to F10, you can use =reserved

Then do

sudo udevadm hwdb --update && sudo udevadm trigger

Disabling Flight Mode / Airplane Mode Function Key F10 - is it possible? - #13 by aaz2234