This forum has been archived. All content is frozen. Please use KDE Discuss instead.

khotkeys multimedia keys not working

Tags: khotkeys, shortcuts, multimedia, keyboard, keys khotkeys, shortcuts, multimedia, keyboard, keys khotkeys, shortcuts, multimedia, keyboard, keys
(comma "," separated)
heminder
Registered Member
Posts
15
Karma
0

khotkeys multimedia keys not working

Mon Jul 13, 2015 11:42 pm
[EDIT] Workaround: The command-line program mpris-remote can successfully control Clementine, but not Audacious (it has MPRIS2 plugin, but mpris-remote uses mpris version 1). So for anyone else with this problem, simply assign mpris-remote commands to the keys. If someone more experienced knows why khotkeys itself isn't working I'd appreciate your insight.
________________________________________________________________________

Hi.

I'm currently running Debian 8 (Jessie), recently upgraded from 7 (Wheezy).

In Wheezy, khotkeys settings in "Global Keyboard Shortcuts" weren't working as they should, but I set the Custom Shortcuts as a command/URL to get my multimedia keys working (play-pause, next, previous, stop). This got them to work perfectly, but when I upgraded to Jessie they ceased functioning.

The situation is now that while khotkeys can recognise and assign the media keys, an application like Clementine does not respond to the key presses. Trying to assign the keys in Clementine's own shortcuts preferences doesn't work as the application does not recognise any key press at all with the desired multimedia key.

Xev registers the key presses successfully.

I have found multiple thread on the Arch Linux forums on this issue:
https://bbs.archlinux.org/viewtopic.php?id=103636
https://bbs.archlinux.org/viewtopic.php?id=135735

Here is an example of one of the scripts that I assigned, and was working in Wheezy :

Code: Select all
#!/bin/bash

## -- This script will imitate Gnome's Media Controls (Play/Pause, Next, Previous, Stop) -- ##
## -- It will assume you are using a media application that is compatible with MPRIS or  -- ##
## -- "Media Player Remote Interfacing Specification"                                    -- ##

# Search for running media applications
# and store into apps array
apps=(`qdbus | grep org.mpris.MediaPlayer2 | sed 's/.*\.//'`)

# For each application send the "PlayPause" command
for app in "${apps[@]}"
  do   
        qdbus org.mpris.MediaPlayer2.$app /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
  done


Running the script from the terminal yields:
Code: Select all
$ ./.MediaPlayPause
qdbus: could not find a Qt installation of ''

I have tried installing qdbus-qt5 and qt5-default packages, and still get the same result.


The current output from dbus-monitor on key press using the above script:
Code: Select all
$ dbus-monitor
signal sender=org.freedesktop.DBus -> dest=:1.261 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired                                                                                                                           
   string ":1.261"                                                                                                                 
method call sender=:1.261 -> dest=org.freedesktop.DBus serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch                                                                                                                           
   string "eavesdrop=true"                                                                                                         
signal sender=:1.27 -> dest=(null destination) serial=1592 path=/Notify; interface=org.kde.KNotify; member=notificationClosed     
   int32 459                                                                                                                       
signal sender=:1.2 -> dest=(null destination) serial=3710 path=/Layouts; interface=org.kde.KeyboardLayouts; member=layoutListChanged                                                                                                                                 
signal sender=:1.2 -> dest=(null destination) serial=3711 path=/modules/keyboard; interface=org.kde.KeyboardLayouts; member=layoutListChanged                                                                                                                         
signal sender=:1.5 -> dest=(null destination) serial=6241 path=/component/khotkeys; interface=org.kde.kglobalaccel.Component; member=globalShortcutPressed                                                                                                           
   string "khotkeys"                                                                                                               
   string "{b02d0e1a-7929-460b-ad2d-f6fdf119849a}"                                                                                 
   int64 15535792                                                                                                                 
method call sender=:1.5 -> dest=org.kde.knotify serial=6242 path=/Notify; interface=org.kde.KNotify; member=event                 
   string "globalshortcutpressed"                                                                                                 
   string "kglobalaccel"                                                                                                           
   array [                                                                                                                         
      variant          string "application"                                                                                       
      variant          string "khotkeys"                                                                                           
   ]                                                                                                                               
   string ""                                                                                                                       
   string "The global shortcut for PlayPause was issued."                                                                         
   array [                                                                                                                         
   ]                                                                                                                               
   array [                                                                                                                         
   ]                                                                                                                               
   int32 -1                                                                                                                       
   int64 0                                                                                                                         
method return sender=:1.27 -> dest=:1.5 reply_serial=6242                                                                         
   int32 0   
signal sender=:1.2 -> dest=(null destination) serial=3712 path=/Layouts; interface=org.kde.KeyboardLayouts; member=layoutListChanged                                                                                                                                 
signal sender=:1.2 -> dest=(null destination) serial=3713 path=/modules/keyboard; interface=org.kde.KeyboardLayouts; member=layoutListChanged 


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft