Class: SamsungTvKeys
- Defined in:
- lib/keys/samsung_tv/samsung_tv_keys.rb
Overview
The SamsungTvKeys class extends Keys, adding keys common to all Samsung TVs.
Instance Method Summary collapse
-
#initialize ⇒ SamsungTvKeys
constructor
Public: Initializes Samsung TV keys.
Constructor Details
#initialize ⇒ SamsungTvKeys
Public: Initializes Samsung TV keys.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/keys/samsung_tv/samsung_tv_keys.rb', line 8 def initialize assign( # Renamed digits because an attribute name may not begin with a digit. :NUM_0 => '0', :NUM_1 => '1', :NUM_2 => '2', :NUM_3 => '3', :NUM_4 => '4', :NUM_5 => '5', :NUM_6 => '6', :NUM_7 => '7', :NUM_8 => '8', :NUM_9 => '9', # Renamed arrows so they are sorted together. This is consistent with the naming for "volume" and "channel". :ARROW_UP => 'up_arrow', :ARROW_DOWN => 'down_arrow', :ARROW_LEFT => 'left_arrow', :ARROW_RIGHT => 'right_arrow', :SELECT => 'select', :POWER => 'power', :VOLUME_UP => 'volume_up', :VOLUME_DOWN => 'volume_down', :CHANNEL_UP => 'channel_up', :CHANNEL_DOWN => 'channel_down', :MUTE => 'mute', :FAV => 'fav', :GUIDE => 'guide', :INFO => 'info', :LAST => 'last', :MENU => 'menu', :EXIT => 'exit', :FAST_FORWARD => 'fastforward', :REWIND => 'rewind', #:SETTINGS => 'settings', # on old remote, could be 'SET UP'? new remote, 'OPTIONS'? :DVR => 'list', :PLAY => 'play', # Renamed skip-back for readability. :SKIP_BACK => 'skipback', :RECORD => 'record', :PAGE_DOWN => 'page_down', :PAGE_UP => 'page_up', :ON_DEMAND => 'mod', # new remote doesn't have this TODO: valid? :A => 'a', # new remote doesn't have this TODO: valid? :B => 'b', # new remote doesn't have this TODO: valid? :C => 'c', # new remote doesn't have this TODO: valid? :D => 'd' # new remote doesn't have this TODO: valid? ) end |