LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-16-2008, 09:29 AM   #1
iiv
Member
 
Registered: Jun 2007
Location: Russia, Moscow Region
Distribution: Slackware
Posts: 167

Rep: Reputation: 30
Unhappy KDE takes care of media keys


Hello everyone. I'm not using KDE, but my mum and a friend do.

Using xev identified all the media keys we needed to figure. Then wrote them to ~/.Xmodmap, added
Code:
xmodmap ~/.Xmodmap
script to ~/.kde/Autostart/ so KDE works fine with volume keys! I was really surprised that when I pressed the volume Up key, it showed up a volume meeter changing.

That was great. But that was also a fail. Because I'm not able to figure out where exactly does KDE keeps what it execs. To fix it. Because pressing for example the 'mute' key just turns off the wrong ALSA control. Actually our soundcard does not have a Master control, so it turns off nothing, just shows the crossed dynamic icon in the tray.

Other keys are 'play/pause', 'stop', 'next song' and so on. Just as usual. They do not generate(luckily) ACPI signals, just standard X events. So how to configure them all?

Have to admit, I am a complete GUI fool, using only fluxbox and Xfce(much more rarely) and CLI.
 
Old 05-16-2008, 10:10 AM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
I don't know the answer to your question, but you might want to take a look at an application called keytouch:

http://keytouch.sourceforge.net/

I've used it in the past to get special keys working. It's a lot easier than trying to do it by hand.
 
Old 05-16-2008, 01:40 PM   #3
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
For KDE, you can use its built-in tools to map keyboard shortcuts to actions. If you want to use another WM/DE, you could use xbindkeys to do the same. See here for more information: http://dev-loki.blogspot.com/2006/04...h-xmodmap.html

My keyboard volume keys were correctly mapped, and pressing them showed a volume bar that increased or decreased, and mute muted/unmuted on the screen, but no actions were physically taken. Since I use KMix, I used KDE's Input Actions to send dcop messages to kmix to increase, decrease or mute/unmute. It works beautifully. This whole process is explained in the provided link. It should be noted that the "Master Channel" is incorrectly set for my sound card, so I had to pass a non-zero argument to kmix's dcop interface to increase/decrease/mute/unmute the proper channel. If you don't use kmix, or you use a different WM/DE entirely, you could always send arguments to amixer or some such thing instead.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: WP: VA Takes the Lead in Paperless Care LXer Syndicated Linux News 0 04-12-2007 11:31 PM
Shortcut keys for Non-KDE apps in KDE thebeast Linux - Software 0 12-03-2005 01:36 PM
How xev, and media keys on a keyboard jrattner1 Linux - Software 1 09-29-2005 04:36 PM
an app that just takes care of everything needed to install from source? sunowww Linux - Newbie 1 12-20-2004 11:21 AM
Why does Gnome takes over my KDE desktop? EThitop Linux - Newbie 11 05-27-2004 09:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration