On Debian 13 with GNOME, the "airplane mode" key (often a function key like Fn+F2 or a dedicated key) is usually handled by the GNOME Settings Daemon or the hardware abstraction layer (HAL). To disable its functionality, you can try the following methods:
dconf (Command Line)If the key is bound to a GNOME shortcut, you can disable it using dconf:
bashgsettings set org.gnome.settings-daemon.plugins.media-keys airplane-mode ''
This clears any assigned shortcut for airplane mode.
If the key is still triggering airplane mode, it might be handled by the X11 server. You can remap or disable the key using xev and xmodmap:
Run xev in a terminal, press the airplane mode key, and note the keycode (e.g., XK_F2 or similar).
Use xmodmap to disable the key:
bashxmodmap -e "keycode <KEYCODE> = "
Replace <KEYCODE> with the actual keycode from xev.
To make this persistent, add the xmodmap command to your .xinitrc or a startup script.
systemd (If Handled by a Service)Some systems use systemd services to manage hardware keys. Check if a service like systemd-rfkill is running:
bashsystemctl --user status systemd-rfkill.socket systemd-rfkill.service
If it's active, you can mask it:
bashsystemctl --user mask systemd-rfkill.socket systemd-rfkill.service
If the key toggles RFKill (which controls airplane mode), you can blacklist the RFKill module:
bashecho "blacklist rfkill" | sudo tee /etc/modprobe.d/blacklist-rfkill.conf sudo update-initramfs -u
Then reboot.
evdev or libinput Rules (Advanced)If the key is still active, you can create a custom rule to ignore it using evdev or libinput. This requires creating a custom udev rule or X11 configuration.
If you're unsure, start with the GNOME Settings or dconf method, as they are the simplest. If the issue persists, we can dig deeper into hardware-level solutions.