[SOLVED] How to make multimedia keys useful in KDE
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
Last edited by javascriptninja; 02-10-2012 at 03:00 PM.
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?
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!
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.