How can I get media keys working on my keyboard?

21,918

Try the following; consider them as different tests.

  1. Run showkey (will perhaps require root privileges). This application will tell you if your key is being read or ignored by the system.
  2. Install and run dconf-editor. Go to org.gnome.settings-daemon.plugins.media-keys and set next to XF86AudioNext and prev to XF86AudioPrev.
Share:
21,918

Related videos on Youtube

KD353
Author by

KD353

Currently running XFCE on; Packard-Bell Imedia S1800 PC [2010, Dual Core Pentium E5800, Nvidia GeForce GT 620, RAM 4GB] Dell Inspiron 15 3521 [2013, Dual Core Intel i3-3217U, RAM 8GB]

Updated on September 18, 2022

Comments

  • KD353
    KD353 almost 2 years

    Just got a new keyboard, the Microsoft comfort curve 2000, and everything seems to work fine except for the 'back' and 'forward' multimedia keys.

    I am running Ubuntu 11.10 and have tried going into system settings -> keyboard -> shortcuts, then I try and hold down the keys to set the action I want them to perform, but nothing changes.

    Any thoughts on where else to look?

    -- UPDATE --

    I rebooted and the options to change the keyboard shortcuts seem to be working now. Now I can tweak the whole thing and I managed to assign the media keys correctly.

    Thanks to everybody for the suggetions

    • Anonymous
      Anonymous over 12 years
    • Anonymous
      Anonymous over 12 years
      File a bug report on Launchpad. Include output from sudo lsusb --verbose.
    • thomasrutter
      thomasrutter almost 10 years
      Ubuntu 11.10 is definitely too damn old. Please upgrade.
  • KD353
    KD353 over 12 years
    They do not list the keyboard makes in 11.10 from what I can see, just the language and then the list of variations, nothing to set the specific keyboard make/model. Like I said above, you can go into the keyboard settings and should be able to assign the keys but when I assign them for the keyboard nothing changes
  • KD353
    KD353 over 12 years
    According to showkey the keys are being read 'keycode 158' for back and 'keycode 159' for forward. Should I input those to dconf-editor or the codes you suggested? The media keys are currently set to your suggestions
  • Severo Raz
    Severo Raz over 12 years
    I was thinking about that. I don't think so, I just suggested the application so you could see if your key presses were being read. I think that the solution might be to assign the the XF86 fake keys to your keycodes. I have no idea how to do that, but I think it has to do with xmodmap
  • Severo Raz
    Severo Raz over 12 years
    Check either the manual or this website: xfree86.org/4.2.0/xmodmap.1.html You can set fake keys (keysyms) to keycodes, but perhaps it is a better idea to find out how to get your system to match the correct keyboard.
  • Felipe Pereira
    Felipe Pereira almost 6 years
    It works fine using Vortex Keyboards like Poker 3