working play/pause media keys in Manjaro KDE - Printable Version

+- PINE64 (
+-- Forum: Pinebook Pro (
+--- Forum: Pinebook Pro Tutorials (
+--- Thread: working play/pause media keys in Manjaro KDE (/showthread.php?tid=8779)

working play/pause media keys in Manjaro KDE - clover - 01-14-2020

I noticed that the default keyboard shortcuts for playing and pausing media does not work on Manjaro.

This is useful to have if you are like me and have headphones that have a play/pause button or a keyboard with media keys.
This works with my Razer Hammerhead USB-C Headphones and Logitech Craft Keyboard

First step is remove the default keyboard shortcuts.

Global Shortcuts -> Other Shortcuts -> Media Controller -> Play/Pause Media Playback. Set this to None. It doesn't work so
we are getting it out of the way.

Interesting to note that volume up and down work out of the box. Less work for us!

xbindkeys allows you to map any key to any command...

sudo pacman -S xbindkeys

playerctl is a client that automatically finds media sources and allows you to play/pause them, go forward/backward, etc...

sudo pacman -S playerctl

add this to .xbindkeysrc (you need to create this file in your home directory)

"playerctl play-pause"

now start xbindkeys program

xbindkeys -p

make it permanent if you want by adding it to Autostart:

Autostart -> add program -> click the folder and find it in /usr/bin/xbindkeys -> make it executable and that should be it!

Enjoy your new ability to quickly play and pause media from peripherals. Even works on Youtube videos in Chromium! Don't think it works in Firefox though.
Should work for Spotify, vlc, and other media players... untested though.