Blog - /Personal
I've made a bit of progress on tweaking the interaction between gxine
and the Apple Remote that came with my Mac Mini. For starters, I
thought that the gxine events looked suspiciously like C code. It
turns out that they are, in fact, JavaScript. You're even allowed to
define JavaScript functions in your gxine settings file and then use
them later on in the remote setup. *sigh* If only gxine has a
"in_dvd_menu" flag or something similar, I could make buttons perform
navigation while in the menus, and skip/slow/play/pause, etc. during
playback. One hackish way of approximating this would be to see how
long the current video is. If it's longer than 5 minutes, it's
probably doing DVD playback, otherwise it is probably in the menus. I
haven't tried doing this yet, though, because I came across the
feature that I will describe next.
I found out that lirc is capable of treating multiple button clicks as
one event, merely by specifying additional button lines in order.
This is very exciting to me, because it allowed me to turn my MENU key
into a "Meta" key of sorts. That is, hitting MENU and then another
button does a different action than just hitting that button. So now,
all of my playback-specific actions (play, pause, skip backwards 10
seconds, fast forward, etc.) are accessible by just hitting MENU
first, while omitting the initial press of MENU gets the standard DVD
menu navigation. As an example, hitting MENU, VOLUME_UP toggles both
fullscreen and pausing, in case I need to switch desktops (gxine hogs
the desktop while in full-screen mode). Happiness has been achieved
on this front :^) .
The next step is to have some global-level remote bindings that allow me to switch between virtual desktops. Even Mac OS X can't do that! These global level keys would be accessed by hitting MENU twice, and then a different button. For example, sending a pause command to my MusicPD daemon would be achieved by hitting MENU, MENU, PLAY/PAUSE, while flipping one desktop to the left would be MENU, MENU, PREVIOUS. Hitting MENU three times would be handled on an application-specific basis, so that I can map it to "Go to DVD root/title menu" when in gxine.
Some other ideas follow.
Add a comment