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

Code:
sudo pacman -S xbindkeys

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

Code:
sudo pacman -S playerctl


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

Code:
"playerctl play-pause"
    XF86AudioPlay

now start xbindkeys program


Code:
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.


Messages In This Thread
working play/pause media keys in Manjaro KDE - by clover - 01-14-2020, 06:46 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Building PPSSPP with Manjaro AUR LivingLinux 0 1,109 06-11-2022, 05:07 PM
Last Post: LivingLinux
  How to update Manjaro to 20.10 pineitup 8 13,328 07-31-2021, 04:44 AM
Last Post: jiyong
  Make your own Manjaro image flatulent_piney 0 3,186 11-07-2020, 03:30 AM
Last Post: flatulent_piney
  Manjaro ARM, Cryptomator, and MEGA Sync dp1kinobe 3 7,017 10-24-2020, 06:38 AM
Last Post: pineitup
  Downgrading packages on Manjaro ARM (on the example of boinc) wrzomar 0 3,378 10-02-2020, 12:20 PM
Last Post: wrzomar
  Freepascal FPC3.20 and Lazarus IDE on Manjaro KDE dieselnutjob 0 2,871 08-02-2020, 06:57 AM
Last Post: dieselnutjob
  Installing WPS Office on Manjaro brent.thierens 5 9,612 07-13-2020, 03:13 AM
Last Post: brent.thierens
  kernel build script for latest mainline manjaro kernel xmixahlx 42 57,466 07-11-2020, 09:01 PM
Last Post: xmixahlx
  full disk encryption with luks on manjaro xfce limxr 48 66,665 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 7,809 06-23-2020, 12:41 AM
Last Post: pljanson

Forum Jump:


Users browsing this thread: 1 Guest(s)