# lircrc.example.[[Nebula Digi T V]]-nativelirc
# 2005-04-02, Samuel Jacobs
# Save this file in ~/.mythtv/lircrc

# There are so many buttons on this remote, 55 to be exact. I don't really 
#  know what to do with all of them, yet I'm discovering that Myth has 
#  functions for all of them and much, much more! All in all, 407 lines of 
#  yummy remote-controlled icing on the delicious cake that is MythTV.

# Intended for use with:
# http://lirc.sourceforge.net/remotes/nebula_electronics/DigiTV
# NOTE: On my system I renamed the remote to "nebdtv". To use this file 
#  with the download from lirc.sf.net (which is otherwise identical to my 
#  copy) simply replace all instances of "nebdtv" with "Nebula_DVB".

# NOTE 2: Not all buttons are used yet, and some key binding customisations 
#  will probably be made to get the most out of the extra buttons. In 
#  particular "Picture" and "Audio" are currently unused so I could 
#  possibly set jumppoints to [[Myth Photo]] and [[Myth Music]] in future.

# NOTE 3: The buttons on the remote are listed from the top left down, row 
#  by row, left to right, with any unused buttons given comments where it 
#  would appear if it was used here. The number buttons are listed in their 
#  entirety before starting back at the "Picture" button.

# NOTE 4: I just thought of another thing that could cause confusion, the 
#  volume buttons are commented out because I use KDELIRC for that. They 
#  are defined however, so just uncomment them if you want to use them.

# Based on, and thanks to:
# lircrc.example.[[Hauppauge Grey]]-nativelirc
# 2003-09-17, Robert Kulagowski
# mailto:rkulagow@rocketmail.com

# TODO: TV (will probably use for launching mythfrontend)
# TODO: Aux (probably a jumppoint to Live TV)
# TODO: DVD/CD (there's currently no jumppoint for generic optical media, 
#  so will probably use for DVD)

begin
    prog = mythtv
    remote = Nebula_DVB
    button = Power
    config = Esc
end

begin
    prog = mythtv
    remote = Nebula_DVB
    button = 1
    config = 1  
end

begin
    prog = mythtv
    remote = Nebula_DVB
    button = 2
    config = 2  
end

begin
    prog = mythtv
    remote = Nebula_DVB
    button = 3
    config = 3  
end

begin
    prog = mythtv
    remote = Nebula_DVB
    button = 4
    config = 4  
end

begin
    prog = mythtv
    remote = Nebula_DVB
    button = 5
    config = 5  
end

begin
    prog = mythtv
    remote = Nebula_DVB
    button = 6
    config = 6  
end

begin
    prog = mythtv
    remote = Nebula_DVB
    button = 7
    config = 7  
end

begin
    prog = mythtv
    remote = Nebula_DVB
    button = 8
    config = 8  
end

begin
    prog = mythtv
    remote = Nebula_DVB
    button = 9
    config = 9  
end

begin
    prog = mythtv
    remote = Nebula_DVB
    button = 0
    config = 0  
end

# TODO: Picture
# TODO: Audio

begin
   prog = mythtv
   remote = Nebula_DVB
   button = I
   config = I
end

begin
   prog = mythtv
   remote = Nebula_DVB
   button = 16:9
   config = W
end

# Unused: 14:9

begin
   prog = mythtv
   remote = Nebula_DVB
# this will only work in live tv mode
   button = EPG
   config = S
end

begin
    prog = mythtv
    remote = Nebula_DVB
    button = Exit
    config = Esc
end

begin
    prog = mythtv
    remote = Nebula_DVB
    button = Menu
    config = M  
end

# Note the "repeat =" strings in the arrows, volume and channel.
# This means that if you hold down the key, every nth instance will be
# passed.  This depends on your system, so you may want to increase or
# decrease this and see what happens.  repeat = 1 is probably too
# fast.

begin
    prog = mythtv
    remote = Nebula_DVB
    button = Up
# This is the "up" on the central diamond 
    repeat = 3
    config = Up
end

begin
    prog = mythtv
    remote = Nebula_DVB
    button = Down
# This is the "down" on the central diamond 
    repeat = 3
    config = Down
end

begin
    prog = mythtv
    remote = Nebula_DVB
    button = Left
# This is the "left" on the central diamond 
    repeat = 3
    config = Left
end

begin
    prog = mythtv
    remote = Nebula_DVB
    button = Right
# This is the "right" on the central diamond 
    repeat = 3
    config = Right
end

begin
    prog = mythtv
    remote = Nebula_DVB
    button = Ok
# Middle button on the diamond
    config = Return
end

# The channel buttons are mapped to Page Up and Page Down.

begin
  prog = mythtv
  remote = Nebula_DVB
  button = Ch+
  repeat = 3
  config = [[Pg Up]]
end

begin
  prog = mythtv
  remote = Nebula_DVB
  button = Ch-
  repeat = 3
  config = [[Pg Down]]
end

# These are the volume buttons. Uncomment them if you want myth to handle 
#  the volume.

begin
  prog = mythtv
  remote = Nebula_DVB
  button = Volume+
  repeat = 3
  config = F11  
end

begin
  prog = mythtv
  remote = Nebula_DVB
  button = Volume-
  repeat = 3
  config = F10  
end

# colours
begin
   prog = mythtv
   remote = Nebula_DVB
   button = Red
# This is the Red button
# We'll use it for "Delete"
   config = D  
end

begin
   prog = mythtv
   remote = Nebula_DVB
   button = Green
# This is the Green button
# We'll use it for "Extended Info"
   config = U
end

begin
   prog = mythtv
   remote = Nebula_DVB
   button = Yellow
# This is the Yellow button
# We'll use it for "Edit"
   config = E
end

begin
   prog = mythtv
   remote = Nebula_DVB
   button = Blue
# This is the Blue button
# We'll use it for "Toggle browse mode"
   config = O
end

begin
    prog = mythtv
    remote = Nebula_DVB
    button = SubT
    config = T
end

begin
    prog = mythtv
    remote = Nebula_DVB
    button = AD
    config = A
end

begin
    prog = mythtv
    remote = Nebula_DVB
    button = Text
# I REALLY can't think of anything to put here, so it does the same as EPG.
    config = S
end

begin
    prog = mythtv
    remote = Nebula_DVB
    button = Mute
    config = |  
end

# Here begineth a stickered area, so I assume the labels for these buttons 
#  could be easily changed post-manufacture.

begin
    prog = mythtv
    remote = Nebula_DVB
    button = Rewind
    config = <
end

begin
   prog = mythtv
   remote = Nebula_DVB
   button = Stop
# Again, I couldn't think of an appropriate function, so it's ESC.
   config = Esc
end

begin
    prog = mythtv
    remote = Nebula_DVB
    button = Play
    config = P  
end

begin
    prog = mythtv
    remote = Nebula_DVB
    button = FForward
    config = >
end

begin
   prog = mythtv
   remote = Nebula_DVB
   button = Chapter
# Change focus for PiP (to change channel in the other window)
   config = B  
end

begin
    prog = mythtv
    remote = Nebula_DVB
    button = Pause
    config = P  
end

begin
    prog = mythtv
    remote = Nebula_DVB
    button = Playspeed
    config = J
end

begin
  prog = mythtv
  remote = Nebula_DVB
  button = Record
  config = R  
end

begin
   prog = mythtv
   remote = Nebula_DVB
   button = PiP
# Toggle PiP on/off
   config = V  
end

begin
   prog = mythtv
   remote = Nebula_DVB
   button = Zoom-
# Use for backwards commercial skip
    config = Q  
end

begin
   prog = mythtv
   remote = Nebula_DVB
   button = Zoom+
# Use for forward commercial skip
    config = Z  
end

begin
    prog = mythtv
    remote = Nebula_DVB
    button = Capture
# Swap the PiP windows
    config = N  
end