Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
lircd/irexec: execute command for a combination of buttons?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
minski
n00b
n00b


Joined: 16 Dec 2002
Posts: 10
Location: munich, germany

PostPosted: Mon Dec 16, 2002 6:56 pm    Post subject: lircd/irexec: execute command for a combination of buttons? Reply with quote

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
View user's profile Send private message
hrnick
Guru
Guru


Joined: 31 Aug 2002
Posts: 425
Location: Sweden

PostPosted: Mon Dec 16, 2002 9:20 pm    Post subject: Reply with quote

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 :D

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
View user's profile Send private message
hrnick
Guru
Guru


Joined: 31 Aug 2002
Posts: 425
Location: Sweden

PostPosted: Mon Dec 16, 2002 9:28 pm    Post subject: Reply with quote

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 :D
Back to top
View user's profile Send private message
hrnick
Guru
Guru


Joined: 31 Aug 2002
Posts: 425
Location: Sweden

PostPosted: Mon Dec 16, 2002 9:32 pm    Post subject: Reply with quote

oops, did I really write "suck" instead och "such" :D :oops: :oops: :oops:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum