2

My (capacitive) media keys have recently become autonomous, causing my wifi to switch on and off at random intervals and effectively rendering the machine unusable.

How can I disable those keys? My preferred solution is to simply disable or misconfigure the daemon that intercepts the XF86WLAN and XF86Bluetooth keyboard events. I can't seem to figure out though which daemon is currently responsible for this, so some help is appreciated.

I'm running Debian Wheezy with a default GNOME 3 setup.

1
  • I also tried adding replace key <I245> { [ XF86Launch1 ] }; to my xkbcomp keymap, where <I245> is the code originally mapped to XF86Bluetooth, and it still didn't work; xev correctly sees pressing the bluetooth button as XF86Launch, but my bluetooth still gets turned off. This is indeed an acpi issue, and there doesn't seem to be an option in BIOS to turn off the keys.
    – xdavidliu
    Commented Jul 11, 2019 at 22:55

1 Answer 1

1

Since this is a keyboard malfunction, I'd favor blocking the keys at the keyboard level.

A simple way to do this is to reassign the keys to do nothing. You can do it with the following shell snippet:

#!/bin/sh
xmodmap - <<EOF
keysym XF86WLAN = NoSymbol
keysym XF86Bluetooth = NoSymbol
EOF

Write this script to a file, make it executable (chmod +x /path/to/script) and add it to your Gnome startup applications.

5
  • Hi Gilles, thanks, that's a useful suggestion. Unfortunately it does not seem to solve the problem and I fail to understand why. After the suggested xmodmap command I tested with xev and found: KeyPress event, (...) keycode 245 (keysym 0x0, NoSymbol) (...). Yet bluetooth switches off like before. I am starting to believe that the button switches the hardware directly but I am unsure how to verify that. Any further suggestions are welcome!
    – gertjan
    Commented Jun 4, 2012 at 7:48
  • 1
    @gertjan Oh. Then this button might be controlled by ACPI. Come to think of it, I usually see these functions controlled by ACPI, unlike things like volume controls which are often keys. That's not a subsystem I'm familiar with. I've made a small edit to your question to try to draw in the right crowd. Commented Jun 4, 2012 at 22:49
  • this answer is incorrect; should it be deleted?
    – xdavidliu
    Commented Jul 11, 2019 at 22:55
  • @xdavidliu I'd rather keep this answer because I think it's correct for some keyboards with some software configurations, even if it isn't correct for gertjan's configuration. Commented Jul 12, 2019 at 8:35
  • @Gilles which keyboards does this answer work for? It doesn't work on my thinkpad x1, and it's exactly because the wifi and bluetooth switches listen to the keycode, not the keysym, so changing the keysym as this answer does won't do anything.
    – xdavidliu
    Commented Jul 12, 2019 at 13:17

You must log in to answer this question.

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