[MPlayer-users] Binding keys to mplayer?

Jesse F. Hughes jesse at phiwumbda.org
Fri Aug 20 09:03:29 CEST 2004


Hey ho.

xmms comes with very useful flags like this:

       -t, --play-pause
              Pause if playing, play otherwise.

I've bound the Pause key in X to xmms -t, so that it acts as pause for
my cdplayer.  Very useful.  If the phone rings, I don't have to search
for the application.  I just hit pause, no matter which window has
focus.

I'd like the same functionality for mplayer.  Now, I could try reading
from a pipe and bind a key to send <space> to the pipe, but that's too
limiting.  I'd lose all the other keybindings that I want
occasionally.  

What I'm after: 

    * In the term in which mplayer starts, the usual keybindings
      apply.

   * Additionally, some useless key (say PrintScreen) is bound in X so
     that hitting it toggles play/pause for whatever mplayer is
     running.

I guess it's a bit trickier for mplayer, since there could be multiple
instances running (not so with xmms, I think).  But something like
this would be swell.

Any ideas?

Thanks.
-- 
Jesse F. Hughes 
"I'm not sure whether I'm not thinking clearly or clearly not
thinking." -- Ling Cheung, said on some day other than our wedding
              day.  Honest.




More information about the MPlayer-users mailing list