working play/pause media keys in Manjaro KDE
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.

Possibly Related Threads...
Thread Author Replies Views Last Post
  How to boot Manjaro from NVME with uboot on eMMC as400 0 80 01-16-2020, 12:10 PM
Last Post: as400
  Netflix not working (fix for Bionic installs) stealthbanana 0 122 01-13-2020, 05:11 AM
Last Post: stealthbanana
  Adjust brightness of backlight i3w-Manjaro Gerhard 0 90 01-05-2020, 04:06 PM
Last Post: Gerhard
  i3blocks Manjaro battery status script Gerhard 0 91 01-05-2020, 02:35 PM
Last Post: Gerhard
  Instructions for Installing VS Code on Manjaro clover 3 241 12-20-2019, 10:18 PM
Last Post: tophneal

Forum Jump:

Users browsing this thread: 1 Guest(s)