Media keys play/pause globally worked in 12.10, not in 13.10
- by Stéphane Gourichon
Laptop media keys
On Asus n55sf laptop, there are a dedicated keys for volume up, volume down, mute, [play/pause], stop, launch (plus a dozen Fn-key combinations).
In 12.10 most worked.
(Overall is seems unrelated to desktop environment used, stating it for the sake of completeness.)
On Ubuntu 12.10 under XFCE they just worked. That is: when a player like rhythmbox or totem was started, it would alternate between play and pause. Interestingly, if several were started, they would alternate independently. E.g. use mouse to pause rhythmbox, launch totem, and one hit on [play/pause] key would pause one and resume the other.
Keys Next,Previous and Stop worked as expected in any program.
In 13.10 most still work, but play/skip related ignored.
On Xubuntu 13.10 (XFCE too) the volume keys work but the [play/pause], stop, next and prev are ignored. Not tried regular Ubuntu 13.10 (Unity).
Search before you ask
Here are a few facts:
https://wiki.ubuntu.com/Hotkeys/Architecture is ummutable and mentions Ubuntu 9.10. https://wiki.ubuntu.com/Hotkeys/Troubleshooting is also outdated as it mentions /usr/share/doc/udev/README.keymap.txt which no longer exists.
On 12.10 and 13.10 versions, at XFCE level (as visible by xfconf-query or using xfce4-settings-manager) there are a couple of shortcut for keys like XF86Calculator or XF86TouchpadToggle but nothing related to volume prev/next/play/stop, which is okay.
XF86Audio substring doesn't appear in /etc (which is normal)
Kernel-level test: "showkey -s" on console shows that keys Next,Play/Pause,Previous,Stop are keycodes 163,164,165,166. Nothing relevant in /etc about that.
Reports https://bugs.launchpad.net/ubuntu/+source/udev/+bug/1072371 and https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1012365 suggest to adjust at udev level.
Alas, the udev tutorials I found ( e.g. https://wiki.debian.org/udev ) don't even mention keyboard.
A thread in french seems to deal with a similar issue: https://forum.ubuntu-fr.org/viewtopic.php?id=1395051. @sudo evtest /dev/input/event3@, in X as well as on plain console, reports events on key pressed and repeats, but nothing when pressing those media keys. Is udev a dead end ?
Questions
How did it work in 12.10 ? Through udev ? Something else ?
Any other hint ?