[MPlayer-users] Binding keys to mplayer?

Jesse F. Hughes jesse at phiwumbda.org
Sun Aug 22 21:24:06 CEST 2004


Jan Knutar <jknutar at nic.fi> writes:

> On Friday 20 August 2004 10:03, Jesse F. Hughes wrote:
>
>> 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.
>
> Hi
>
> I built a remote control receiver out of a dead satellite receiver
> box, and hooked it up to a computer, wrote own drivers and such for
> it, and this is how I solved the problem of sending commands to
> mplayer..
>
> First, I have a fifo in ~/ called mplayerctrl Then, in
> ~/.mplayer/config, I have this line: input= file=/home/jan/mplayerctrl
>
> Replace path with your own, etc...
>
> To demonstrate the functionality, you could for example do echo PAUSE
>>~/mplayerctrl

Yeah, I thought about that.  I use a fifo, for instance, to nicely
kill a BitTorrent job via cron.  But I don't want to mess with the
fifo for all the little used functions (like seek forward 1 minute,
etc.).  I just want it for the pause functionality.

Here's what would work:

(1) Bind (in X) scroll lock to send <space> to the fifo.

(2) In the shell in which mplayer has been started, send every
keystroke straight to the fifo.

Can I do (2) reasonably?  If not, I could start a small window whose
sole purpose is to echo to the fifo, I guess.

Thanks for the thoughts.
-- 
Jesse F. Hughes
"What I represent is the unknowable future--the power of change.  In
that sense I'm a force of Nature, a force of the Universe, a living
emodiment of change itself."  --James Harris and his sense of humility




More information about the MPlayer-users mailing list