I am running Kubuntu 19.10(KDE + i3wm) on my ASUS FX505DT.

The issue

I am able to bind the XF86RFKill key using i3wm's bindsym but this binding doesn't seem to nullify's Linux's in-built binding which toggles Airplane Mode.

Behaviour of the issue

This is what xev returns when I press Fn+F12, which is supposed to trigger XF86RFKill:

MappingNotify event, serial 48, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248

FocusOut event, serial 48, synthetic NO, window 0x7a00001,
    mode NotifyGrab, detail NotifyAncestor

FocusOut event, serial 48, synthetic NO, window 0x7a00001,
    mode NotifyUngrab, detail NotifyPointer

FocusIn event, serial 48, synthetic NO, window 0x7a00001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 48, synthetic NO, window 0x0,
    keys:  1   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

While I was testing various things out, I found that my laptop has a separate input device for this function key, as shown by xinput list:

$ xinput list
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ ELAN1200:00 04F3:30BA Mouse               id=12   [slave  pointer  (2)]
⎜   ↳ ELAN1200:00 04F3:30BA Touchpad            id=13   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Asus Wireless Radio Control               id=7    [slave  keyboard (3)]
    ↳ Video Bus                                 id=8    [slave  keyboard (3)]
    ↳ Power Button                              id=9    [slave  keyboard (3)]
    ↳ Sleep Button                              id=10   [slave  keyboard (3)]
    ↳ USB2.0 HD UVC WebCam: USB2.0 HD           id=11   [slave  keyboard (3)]
    ↳ Asus WMI hotkeys                          id=14   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=15   [slave  keyboard (3)]

I further confirmed this by pressing Fn+F12 during xinput test 7 command, which got registered properly:

$ xinput test 7
key press   255 
key release 255 
key press   255 
key release 255 

What I want

I want to shift the key binding of Fn+F12 key, or XF86RFKill from Linux to i3wm. I have the script for toggling airplane mode, and I've bound it using:

bindsym XF86RFKill exec --no-startup-id toggle-airplane

The i3 binding works, but the issue is that, **both Linux and i3wm toggle airplane mode when the key is pressed, hence resulting in doing nothing, due to two successive toggles.

The current Airplane Mode, implemented by KDE, is actually buggy since it doesn't remember the devices turned off before turning on Airplane Mode, and hence it turns on all the radio devices, even though they were initially turned off, after disabling Airplane Mode. I wrote a bash script to attain my goal, and hence the motivation for binding this key manually.

Update 1:

After doing some research and exploring, I've found that asus_wireless kernel module is responsibe for this behaviour. Simply blacklisting the module works but my laptop doesn't detect the keypress anymore. Is it possible to somehow retain the keypress disabling the hotkey?

  • Disabling all applications / modules that process XF86RFKill "calls" should do it (which you already did). And your X server should still be getting the keypress. When you run xev are you not getting the keypress? Jan 15, 2021 at 5:41

1 Answer 1


Not an expert on this subject, but this worked for me. Maybe it can help you too. To disable the input that enables airplane mode, run in terminal:

xmodmap -e 'keycode 255='

Source: How to disable a keyboard key in Linux (Ubuntu)?

Furthermore, the command xmodmap -pke shows a list of all keymappings


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .