From: Jeff D. <je...@tc...> - 2006-04-19 21:48:07
|
Hi, I use LIRC to control my home automation PC which I have configured to use one remote to play music, control lights, play movies, navigate on-screen menu. To accomplish all of this, I've mapped a few buttons on my remote to switch between modes ("Music" button switches the remote to music mode, "TV" button switches the remote to menu-entry mode) which makes it relatively easy to switch between the remote's different modes. However, there are a few instances when having to press a button on the remote to switch modes is not sufficient, such as when I use the menu to navigate to a movie and press "select" again to run a script that begins playing the movie. Because the "select" button is also used for selecting submenus in this mode I cannot use the standard "mode = mplayer" config setup with this button and instead must map a second button to switch the remote over to the "mplayer" mode. To make things easier, I've created a patch that gives external programs the ability to modify lircrcd's mode. This way I can run the new program "lirc_setmode" to explicitly set the mode for a given file. Usage: lirc_setmode <mode> [file] example: lirc_setmode mplayer /etc/lirc/lircrc I've added another program, "lirc_getmode" that will return the current mode of a file. Usage: lirc_getmode [file] example: lirc_getmode /etc/lirc/lircrc I hope someone else finds this useful. -- Jeff |