On Debian 13 GNOME disable keyboard airplane key.
Apr 23, 3:24pm

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:


1. Disable the Key via GNOME Settings (GUI)

  • Open Settings > Keyboard Shortcuts.
  • Look for any shortcuts related to "Airplane Mode" or "Flight Mode" and disable or reassign them.

2. Disable the Key via dconf (Command Line)

If the key is bound to a GNOME shortcut, you can disable it using dconf:

bash
gsettings set org.gnome.settings-daemon.plugins.media-keys airplane-mode ''

This clears any assigned shortcut for airplane mode.


3. Disable the Key at the Hardware Level (X11)

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:

Step 1: Identify the Keycode

Run xev in a terminal, press the airplane mode key, and note the keycode (e.g., XK_F2 or similar).

Step 2: Remap the Key

Use xmodmap to disable the key:

bash
xmodmap -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.


4. Disable the Key via systemd (If Handled by a Service)

Some systems use systemd services to manage hardware keys. Check if a service like systemd-rfkill is running:

bash
systemctl --user status systemd-rfkill.socket systemd-rfkill.service

If it's active, you can mask it:

bash
systemctl --user mask systemd-rfkill.socket systemd-rfkill.service

5. Disable RFKill (If the Key Toggles RFKill)

If the key toggles RFKill (which controls airplane mode), you can blacklist the RFKill module:

bash
echo "blacklist rfkill" | sudo tee /etc/modprobe.d/blacklist-rfkill.conf
sudo update-initramfs -u

Then reboot.


6. Use 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.



Which method would you like to try first?

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.

Apr 23, 3:25pm

This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.