LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-14-2011, 05:12 AM   #1
me-$-on
Member
 
Registered: May 2007
Posts: 64

Rep: Reputation: 15
Multimedia Keys on Laptop - special control


Hello.

I would like to use my multimedia keys on the laptop.

As I have seen in kde, they are recognized already, very good.

But I would like to use the play-pause, ffd, rwd and stop button
in a special way.
After pressing one of them , a programm or script is called, which does:

a ) determine the entries ( in a list ) of assigned applications to
be controlles by this mm-buttons.
( The list can be edited, I decide to add vlc, amarok, flash
plugin for firefox )

b ) determine, which of the applications are running actually

c ) determine, which of this applications has the focus ( means,
which of them ( if all more running ) is "the active one".

d ) issue its shell command, which corresponds to the keyhit (
play, pause, fwd, rwd, stop )

Now my question : Is it all possible via shell/and or x-script?

If not, i will have to code something, i suppose.


THX in advance.


Greetings


me-$-on
 
Old 01-16-2011, 02:01 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
The answer is 42, errrh, yes, to all of the above.




Cheers,
Tink
 
Old 01-17-2011, 01:45 AM   #3
me-$-on
Member
 
Registered: May 2007
Posts: 64

Original Poster
Rep: Reputation: 15
Hello Tinkster

So, it is possible to determine the actual running xapplications ( even the one, which has already the focus ) via shell script ?

Ok, i can imagine issuing ps -aux | grep vlc , for example.

And how can I determine that it is "actually in the front" ?


Greetings,


me-$-on.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
special multimedia keys and mpd ernesto_cgf Linux - Software 4 05-25-2007 05:59 PM
Special function (Fn) keys don't work reliably in Suse 10.1 on Evesham laptop Paul Williamson Linux - Laptop and Netbook 0 02-10-2007 09:57 AM
control kmix with multimedia keys Michael_aust Linux - Newbie 3 01-30-2007 05:09 PM
Special keys dont work on Compaq presario laptop rahilrai SUSE / openSUSE 1 03-13-2006 11:59 AM
special keys of laptop alinsoar Linux - Laptop and Netbook 2 11-01-2005 02:40 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:44 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