LircrcExample here

From LinuxTVWiki
Revision as of 01:21, 12 May 2009 by Jimbley (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Heres an example .lircrc file to map button presses to key presses, copy it into your home directory and run irxevent to control any app with the remote (if you have irkick running, quit it before starting irxevent, maybe also su, /etc/init.d/lirc restart).

 ################## irxevent Control ######################
 #
 # irxevent info
 # http://linux.die.net/man/1/irxevent
 #
 # keycode info
 # /usr/include/X11/keysymdef.h
 # http://crpppc19.epfl.ch/cgi-bin/dwww/usr/share/doc/lirc/irxevent.keys
 #
 
 #	Remote Button
 ##	Key Press
 
 
 #	Go
 ##	F1
 begin
 prog = irxevent
 button = Go
 config = Key F1 CurrentWindow
 end
 
 #	Power
 ##	F2
 begin
 prog = irexec
 button = Power
 config = Key F2 CurrentWindow
 #	Turns monitor in Standby
 #config = sudo vbetool dpms on ; sudo vbetool dpms off
 end
 
 #	TV
 ##	F3
 begin
 prog = irxevent
 button = TV
 config = Key F3 CurrentWindow
 end
 
 #	Videos
 ##	F4
 begin
 prog = irxevent
 button = Videos
 config = Key F4 CurrentWindow
 end
 
 #	Music
 ##	F5
 begin
 prog = irxevent
 button = Music
 config = Key F5 CurrentWindow
 end
 
 #	Pictures
 ##	F6
 begin
 prog = irxevent
 button = Pictures
 config = Key F6 CurrentWindow
 end
 
 #	Guide
 ##	F7
 begin
 prog = irxevent
 button = Guide
 config = Key F7 CurrentWindow
 end
 
 #	Radio
 ##	F8
 begin
 prog = irxevent
 button = Radio
 config = Key F8 CurrentWindow
 end
 
 #	ArrowUp
 ##	Up
 begin
 prog = irxevent
 button = ArrowUp
 config = Key Up CurrentWindow
 end
 
 #	ArrowLeft
 ##	Left
 begin
 prog = irxevent
 button = ArrowLeft
 config = Key Left CurrentWindow
 end
 
 #	OK
 ##	Return
 begin
 prog = irxevent
 button = OK
 config = Key Return CurrentWindow
 #config = Key Select CurrentWindow
 end
 
 #	ArrowRight
 ##	Right
 begin
 prog = irxevent
 button = ArrowRight
 config = Key Right CurrentWindow
 end
 
 #	ArrowDown
 ##	Down
 begin
 prog = irxevent
 button = ArrowDown
 config = Key Down CurrentWindow
 end
 
 #	BackExit
 ##	Escape
 begin
 prog = irxevent
 button = BackExit
 config = Key Escape CurrentWindow
 #config = Key Cancel CurrentWindow
 end
 
 #	Menu
 ##	Menu (ie. right-click)
 begin
 prog = irxevent
 button = Menu
 config = Key Menu CurrentWindow
 end
 
 #	VolumeUp
 ##	+
 begin
 prog = irxevent
 button = VolumeUp
 config = Key plus CurrentWindow
 #config = Key KP_Add CurrentWindow
 end
 
 #	VolumeDown
 ##	-
 begin
 prog = irxevent
 button = VolumeDown
 config = Key minus CurrentWindow
 #config = Key KP_Subtract CurrentWindow
 end
 
 #	PrevCh
 ##	Backspace
 begin
 prog = irxevent
 button = PrevCh
 config = Key BackSpace CurrentWindow
 #config = Key Prior CurrentWindow
 end
 
 #	Mute
 ##	Enter (chosen as its below keypad-, keypad+)
 begin
 prog = irxevent
 button = Mute
 config = Key Enter CurrentWindow
 end
 
 #	ChannelUp
 ##	PageUp
 begin
 prog = irxevent
 button = ChannelUp
 config = Key Page_Up CurrentWindow
 end
 
 #	ChannelDown
 ##	PageDown
 begin
 prog = irxevent
 button = ChannelDown
 config = Key Page_Down CurrentWindow
 end
 
 #	Record
 ##	R
 begin
 prog = irxevent
 button = Record
 config = Key R CurrentWindow
 end
 
 #	Rewind
 ##	B
 begin
 prog = irxevent
 button = Rewind
 config = Key B CurrentWindow
 end
 
 #	SkipBack
 ##	Home
 begin
 prog = irxevent
 button = SkipBack
 config = Key Home CurrentWindow
 end
 
 #	Play
 ##	P
 begin
 prog = irxevent
 button = Play
 config = Key P CurrentWindow
 end
 
 #	Pause
 ##	U
 begin
 prog = irxevent
 button = Pause
 config = Key U CurrentWindow
 #config = Key Pause CurrentWindow
 end
 
 #	Stop
 ##	S
 begin
 prog = irxevent
 button = Stop
 config = Key S CurrentWindow
 end
 
 #	Fwdwind
 ##	F
 begin
 prog = irxevent
 button = Fwdwind
 config = Key F CurrentWindow
 end
 
 #	SkipFwd
 ##	End
 begin
 prog = irxevent
 button = SkipFwd
 config = Key End CurrentWindow
 end
 
 #	1
 begin
 prog = irxevent
 button = 1
 config = Key 1 CurrentWindow
 end
 
 #	2
 begin
 prog = irxevent
 button = 2
 config = Key 2 CurrentWindow
 end
 
 #	3
 begin
 prog = irxevent
 button = 3
 config = Key 3 CurrentWindow
 end
 
 #	4
 begin
 prog = irxevent
 button = 4
 config = Key 4 CurrentWindow
 end
 
 #	5
 begin
 prog = irxevent
 button = 5
 config = Key 5 CurrentWindow
 end
 
 #	6
 begin
 prog = irxevent
 button = 6
 config = Key 6 CurrentWindow
 end
 
 #	7
 begin
 prog = irxevent
 button = 7
 config = Key 7 CurrentWindow
 end
 
 #	8
 begin
 prog = irxevent
 button = 8
 config = Key 8 CurrentWindow
 end
 
 #	9
 begin
 prog = irxevent
 button = 9
 config = Key 9 CurrentWindow
 end
 
 #	Star
 ##	Asterisk
 begin
 prog = irxevent
 button = Star
 config = Key asterisk CurrentWindow
 ## asterisk doesnt work for me... anybody else getting 8 instead of *??
 #config = Key multiply CurrentWindow
 end
 
 #	0
 begin
 prog = irxevent
 button = 0
 config = Key 0 CurrentWindow
 end
 
 #	#
 ##	NumberSign (Hash)
 begin
 prog = irxevent
 button = #
 config = Key numbersign CurrentWindow
 end
 
 #	Red
 ##	F9
 begin
 prog = irxevent
 button = Red
 config = Key F9 CurrentWindow
 end
 
 #	Green
 #	F10
 begin
 prog = irxevent
 button = Green
 config = Key F10 CurrentWindow
 end
 
 #	Yellow
 ##	F11
 begin
 prog = irxevent
 button = Yellow
 config = Key F11 CurrentWindow
 end
 
 #	Blue
 ##	F12
 begin
 prog = irxevent
 button = Blue
 config = Key F12 CurrentWindow
 end