LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   How to make multimedia keys useful in KDE (https://www.linuxquestions.org/questions/linux-desktop-74/how-to-make-multimedia-keys-useful-in-kde-928697/)

javascriptninja 02-10-2012 02:02 PM

How to make multimedia keys useful in KDE
 
In Gnome when I pressed the "play" button on my keyboard it would play/pause the song in a media player.

In KDE when I press the play button nothing happens.

I want to use this key to send a play/pause signal message to the program "mpc" so that when I press the key it does the same thing as typing "mpc toggle" in a terminal.

How can this be done?

bigrigdriver 02-10-2012 10:40 PM

Here is a howto to help you figure it all out: http://cweiske.de/howto/xmodmap/allinone.html

I recommend you read through it to be certain you understand it before attempting any changes to your system.

javascriptninja 02-11-2012 04:21 PM

Quote:

Originally Posted by bigrigdriver (Post 4599454)
Here is a howto to help you figure it all out: http://cweiske.de/howto/xmodmap/allinone.html

I recommend you read through it to be certain you understand it before attempting any changes to your system.

I was able to do it by setting the keys in System Settings / Common Appearance and Behaviour / Shortcuts and Gestures / Custom Shortcuts. Then I read your article. I looked for the Xmodmap file in my home directory and other places, but didn't find any.

When KDE was able to assign my multimedia keys, where did it store this information? xmodmap was already installed in my system. Did it do something unrelated to xmodmap?

DavidMcCann 02-12-2012 11:31 AM

You were right to stick to the KDE tools. They're designed for the job and properly tested. The web site dates from 2008, and there's no guarantee that the advice will work with a current version of KDE.

The Xmodmap file has to be created.

KDE does the job with its own tools. The details of the shortcuts will be recorded somewhere in the configuration section of your home directory. They're probably buried deep: e.g. in Gnome they're at ~/.gconf/apps/gnome_settings_daemon/keybindings/%gconf.xml!

javascriptninja 02-12-2012 03:53 PM

Quote:

Originally Posted by DavidMcCann (Post 4600594)
You were right to stick to the KDE tools. They're designed for the job and properly tested. The web site dates from 2008, and there's no guarantee that the advice will work with a current version of KDE.

The Xmodmap file has to be created.

KDE does the job with its own tools. The details of the shortcuts will be recorded somewhere in the configuration section of your home directory. They're probably buried deep: e.g. in Gnome they're at ~/.gconf/apps/gnome_settings_daemon/keybindings/%gconf.xml!

I did
Quote:

locate gconf.xml
and it found lots of files. I found directories similar to what you described, but with slightly different names. KDE wouldn't store it there though, would it?

DavidMcCann 02-13-2012 10:40 AM

No: gconf is gnome configuration. Not being a fan of KDE (to put it mildly), I'd forgotten where the files live, but it seems that ~/.kde4 is the likely place. These sites look interesting
http://techbase.kde.org/KDE_System_A...guration_Files
https://wiki.archlinux.org/index.php/KDE


All times are GMT -5. The time now is 02:28 PM.