View previous topic :: View next topic |
Author |
Message |
minski n00b
Joined: 16 Dec 2002 Posts: 10 Location: munich, germany
|
Posted: Mon Dec 16, 2002 6:56 pm Post subject: lircd/irexec: execute command for a combination of buttons? |
|
|
i know, u can define actions for every button on your ir-remote-control.
is it also possible, to only execute a command, when several buttons are pressed in a certain order?
i want to shut the system with my remote-control, BUT the system should NOT go down when a single button is pressed.
can i tell lircd to shutdown the system, when for example button "MINIMIZE" and "RESERVED" (on my hauppauge remote) are pressed within 1 second,
or to halt the system, when i press a single button for 2 seconds?
anything like that, would solve my problem.
any ideas? |
|
Back to top |
|
|
hrnick Guru
Joined: 31 Aug 2002 Posts: 425 Location: Sweden
|
Posted: Mon Dec 16, 2002 9:20 pm Post subject: |
|
|
I think that you can use modes (http://www.lirc.org/html/configure.html#lircrc_format) in your .lircrc to make a series of keys to be pressed in a certain order to execute a certain command. I am not sure if it works and I haven't used it but it should look something like this:
Code: | begin
button = button1
mode = mode1
end
begin mode1
begin
button = button2
mode = mode2
end
end Mode1
begin mode2
begin
button = button3
prog = irexec
config = command-to-be-executed
end
end Mode2 |
You might want to test it with something else than a shutdown command before you know it works
There are also a couple of interesting projects suck as smartmenu (http://www.fi.muni.cz/~xkutale1/en/smartmenu/) that could be an alternative |
|
Back to top |
|
|
hrnick Guru
Joined: 31 Aug 2002 Posts: 425 Location: Sweden
|
Posted: Mon Dec 16, 2002 9:28 pm Post subject: |
|
|
You could add something like this to "mode1" and "mode2" in order to abort these modes with "another-button":
Code: | begin
button = another-button
flags = mode
end |
I hope you don't mind all the wonderful names I've given the buttons and modes |
|
Back to top |
|
|
hrnick Guru
Joined: 31 Aug 2002 Posts: 425 Location: Sweden
|
Posted: Mon Dec 16, 2002 9:32 pm Post subject: |
|
|
oops, did I really write "suck" instead och "such" |
|
Back to top |
|
|
|