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 update Manjaro to 20.10 pineitup 8 5,874 07-31-2021, 04:44 AM
Last Post: jiyong
  Make your own Manjaro image flatulent_piney 0 1,561 11-07-2020, 03:30 AM
Last Post: flatulent_piney
  Manjaro ARM, Cryptomator, and MEGA Sync dp1kinobe 3 3,455 10-24-2020, 06:38 AM
Last Post: pineitup
  Downgrading packages on Manjaro ARM (on the example of boinc) wrzomar 0 1,667 10-02-2020, 12:20 PM
Last Post: wrzomar
  Freepascal FPC3.20 and Lazarus IDE on Manjaro KDE dieselnutjob 0 1,508 08-02-2020, 06:57 AM
Last Post: dieselnutjob
  Installing WPS Office on Manjaro brent.thierens 5 5,517 07-13-2020, 03:13 AM
Last Post: brent.thierens
  kernel build script for latest mainline manjaro kernel xmixahlx 42 32,671 07-11-2020, 09:01 PM
Last Post: xmixahlx
  full disk encryption with luks on manjaro xfce limxr 48 35,610 07-09-2020, 07:27 AM
Last Post: JtR
  Is there a MMC upgrade instruction from debian-mate to manjaro factory (20.06)? pljanson 4 4,191 06-23-2020, 12:41 AM
Last Post: pljanson
  How to boot Manjaro from NVME with uboot on eMMC as400 47 28,645 06-07-2020, 02:37 AM
Last Post: as400

Forum Jump:

Users browsing this thread: 1 Guest(s)