Search for Power Button Panel
[pierogi] / keysets / yamaha.cpp
1 #include "yamaha.h"
2 #include "protocols/necprotocol.h"
3
4
5 YamahaDVD1::YamahaDVD1(
6   unsigned int index)
7   : PIRKeysetMetaData(
8       "DVD Keyset 1",
9       Yamaha_Make,
10       index)
11 {
12 }
13
14
15 void YamahaDVD1::populateProtocol(
16   QObject *guiObject)
17 {
18   if (threadableProtocol)
19   {
20     // If the pointer is not null, the keyset must already be populated.
21     return;
22   }
23
24   threadableProtocol = new NECProtocol(guiObject, index, false, true);
25
26 //  setPreData(0x3EC1, 16);
27   setPreData(0x7C, 8);
28
29   addKey("power_av", Power_Key, 0x80, 16); // might be wrong
30   addKey("play", Play_Key, 0x82, 8);
31   addKey("pause", Pause_Key, 0x83, 8);
32   addKey("stop", Stop_Key, 0x85, 8);
33   addKey("rewind", Rewind_Key, 0x86, 8);
34   addKey("fast_forward", FastForward_Key, 0x87, 8);
35   addKey("record", Record_Key, 0x8B, 8);
36
37   addKey("0", Zero_Key, 0x93, 8);
38   addKey("1", One_Key, 0x94, 8);
39   addKey("2", Two_Key, 0x95, 8);
40   addKey("3", Three_Key, 0x96, 8);
41   addKey("4", Four_Key, 0x97, 8);
42   addKey("5", Five_Key, 0x98, 8);
43   addKey("6", Six_Key, 0x99, 8);
44   addKey("7", Seven_Key, 0x9A, 8);
45   addKey("8", Eight_Key, 0x9B, 8);
46   addKey("9", Nine_Key, 0x9C, 8);
47   addKey("+10", DoubleDigit_Key, 0x9D, 8);
48   addKey("ent", Enter_Key, 0x9E, 8);
49
50   addKey("display", Info_Key, 0xA6, 8);
51   addKey("title", DiscTitle_Key, 0xB1, 8);
52   addKey("menu", DiscMenu_Key, 0xB2, 8);
53   addKey("down", Down_Key, 0xB3, 8);
54   addKey("up", Up_Key, 0xB4, 8);
55   addKey("left", Left_Key, 0xB5, 8);
56   addKey("right", Right_Key, 0xB6, 8);
57   addKey("return", Exit_Key, 0xB7, 8);
58   addKey("enter", Select_Key, 0xB8, 8);
59   addKey("previous", Previous_Key, 0xB9, 8);
60   addKey("next", Next_Key, 0xBA, 8);
61 }
62
63
64 YamahaDVD1a::YamahaDVD1a(
65   unsigned int index)
66   : YamahaDVD1(index)
67 {
68   setKeysetName("DVD/LD Keyset 1a");
69 }
70
71
72 void YamahaDVD1a::populateProtocol(
73   QObject *guiObject)
74 {
75   if (threadableProtocol)
76   {
77     // If the pointer is not null, the keyset must already be populated.
78     return;
79   }
80
81   YamahaDVD1::populateProtocol(guiObject);
82
83   addKey("LD_CH_-", ChannelDown_Key, 0x02, 8);
84   addKey("LD_CH_+", ChannelUp_Key, 0x03, 8);
85   addKey("LD_PAUSE/STOP", Pause_Key, 0x04, 8);
86   addKey("LD_PLAY", Play_Key, 0x05, 8);
87   addKey("LD_SCH_FWD", FastForward_Key, 0x07, 8);
88   addKey("LD_SCH_REV", Rewind_Key, 0x06, 8);
89   addKey("LD_STILL_REV", StepBack_Key, 0x0A, 8);
90   addKey("LD_STILL_FWD", StepForward_Key, 0x0B, 8);
91   addKey("SOUND", Unmapped_Key, 0x12, 8);
92   addKey("DISPLAY", Info_Key, 0x13, 8);
93   addKey("LD_STOP", Stop_Key, 0x5B, 8);
94 }
95
96
97 YamahaAudio1::YamahaAudio1(
98   unsigned int index)
99   : PIRKeysetMetaData(
100       "Audio Device Keyset 1",
101       Yamaha_Make,
102       index)
103 {
104 }
105
106
107 void YamahaAudio1::populateProtocol(
108   QObject *guiObject)
109 {
110   if (threadableProtocol)
111   {
112     // If the pointer is not null, the keyset must already be populated.
113     return;
114   }
115
116   threadableProtocol = new NECProtocol(guiObject, index, false, true);
117
118 //  setPreData(0x9E61, 16);
119   setPreData(0x79, 8);
120
121   addKey("MODE", Mode_Key, 0x00, 8);
122   addKey("OPEN", Eject_Key, 0x01, 8);
123   addKey("PLAY", Play_Key, 0x02, 8);
124   addKey("SKIP_BACK", Previous_Key, 0x04, 8); // "-", "PREV"
125   addKey("SEARCH_BACK", Rewind_Key, 0x05, 8);
126   addKey("SEARCH_FWD", FastForward_Key, 0x06, 8);
127   addKey("SKIP_FWD", Next_Key, 0x07, 8); // "+", "NEXT"
128   addKey("REPEAT", Repeat_Key, 0x08, 8); // "REPEAT_S/F/OFF", "S/F"
129   addKey("REPEAT_A-B", RepeatAB_Key, 0x09, 8);
130   addKey("TIME", Info_Key, 0x0A, 8); // "TIME_DISPLAY"
131   addKey("INDEX", Unmapped_Key, 0x0B, 8);
132   addKey("PROG", Program_Key, 0x0C, 8);
133   addKey("CLEAR", Clear_Key, 0x0D, 8); // "CANCEL"
134   addKey("DEL", Unmapped_Key, 0x0E, 8);
135   addKey("SPACE", Unmapped_Key, 0x0F, 8);
136   addKey("0", Zero_Key, 0x10, 8);
137   addKey("1", One_Key, 0x11, 8);
138   addKey("2", Two_Key, 0x12, 8);
139   addKey("3", Three_Key, 0x13, 8);
140   addKey("4", Four_Key, 0x14, 8);
141   addKey("5", Five_Key, 0x15, 8);
142   addKey("6", Six_Key, 0x16, 8);
143   addKey("7", Seven_Key, 0x17, 8);
144   addKey("8", Eight_Key, 0x18, 8);
145   addKey("9", Nine_Key, 0x19, 8);
146   addKey("PLUS10", DoubleDigit_Key, 0x1A, 8);
147   addKey("RANDOM", Random_Key, 0x1B, 8); // "AUTO"
148   addKey("OUTPUT_MINUS", VolumeDown_Key, 0x1C, 8);
149   addKey("OUTPUT_PLUS", VolumeUp_Key, 0x1D, 8);
150   addKey("DIMMER", Unmapped_Key, 0x1E, 8); // "MODE"
151   addKey("10", Unmapped_Key, 0x40, 8);
152   addKey("11", Unmapped_Key, 0x41, 8);
153   addKey("12", Unmapped_Key, 0x42, 8);
154   addKey("13", Unmapped_Key, 0x43, 8);
155   addKey("14", Unmapped_Key, 0x44, 8);
156   addKey("15", Unmapped_Key, 0x45, 8);
157   addKey("16", Unmapped_Key, 0x46, 8);
158   addKey("17", Unmapped_Key, 0x47, 8);
159   addKey("18", Unmapped_Key, 0x48, 8);
160   addKey("19", Unmapped_Key, 0x49, 8);
161   addKey("20", Unmapped_Key, 0x4A, 8);
162   addKey("21", Unmapped_Key, 0x4B, 8);
163   addKey("22", Unmapped_Key, 0x4C, 8);
164   addKey("23", Unmapped_Key, 0x4D, 8);
165   addKey("24", Unmapped_Key, 0x4E, 8);
166   addKey("DISC_SKIP_FORWARD", NextDisc_Key, 0x4F, 8);
167   addKey("DISC_SKIP_REVERSE", PrevDisc_Key, 0x50, 8);
168   addKey("DISC_SCAN", Unmapped_Key, 0x53, 8);
169   addKey("PAUSE", Pause_Key, 0x55, 8);
170   addKey("STOP", Stop_Key, 0x56, 8);
171   addKey("TAPE", Unmapped_Key, 0x57, 8);
172   addKey("SYNCHRO", Unmapped_Key, 0x58, 8); // "DIRECT_OUT"
173   addKey("PEAK", Unmapped_Key, 0x5D, 8);
174 }
175
176
177 YamahaAudio1a::YamahaAudio1a(
178   unsigned int index)
179   : YamahaAudio1(index)
180 {
181   setKeysetName("Audio Keyset 1a");
182 }
183
184
185 void YamahaAudio1a::populateProtocol(
186   QObject *guiObject)
187 {
188   if (threadableProtocol)
189   {
190     // If the pointer is not null, the keyset must already be populated.
191     return;
192   }
193
194   YamahaAudio1::populateProtocol(guiObject);
195
196   addKey("PAUSE/STOP", Stop_Key, 0x03, 8);
197   addKey("PAUSE/STOP", Pause_Key, 0x03, 8);
198 }
199
200
201 YamahaAudio2::YamahaAudio2(
202   unsigned int index)
203   : PIRKeysetMetaData(
204       "Audio Keyset 2",
205       Yamaha_Make,
206       index)
207 {
208   addControlledDevice(Yamaha_Make, "RX-395-RDS", Audio_Device);
209   addControlledDevice(Yamaha_Make, "AX-570", Audio_Device);
210   addControlledDevice(Yamaha_Make, "CDX-570", Audio_Device);
211 }
212
213
214 void YamahaAudio2::populateProtocol(
215   QObject *guiObject)
216 {
217   if (threadableProtocol)
218   {
219     // If the pointer is not null, the keyset must already be populated.
220     return;
221   }
222
223   threadableProtocol = new NECProtocol(guiObject, index, false, true);
224
225 //  setPreData(0x5EA1, 16);
226   setPreData(0x7A, 8);
227
228   addKey("TapePlay", Unmapped_Key, 0x00, 8);
229   addKey("TapeRewind", Unmapped_Key, 0x01, 8);
230   addKey("TapeForward", Unmapped_Key, 0x02, 8);
231   addKey("TapeStop", Unmapped_Key, 0x03, 8);
232   addKey("TapeRec", Record_Key, 0x04, 8); // "TAPE_RECPAUSE"
233   addKey("TAPE_REC_MUTE", Unmapped_Key, 0x05, 8);
234   addKey("TapeDeckA/B", Unmapped_Key, 0x06, 8);
235   addKey("TapeDirA", Unmapped_Key, 0x07, 8);
236   addKey("CDPlay", Play_Key, 0x08, 8);
237   addKey("CDPause/Stop", Pause_Key, 0x09, 8);
238   addKey("CDPause/Stop", Stop_Key, 0x09, 8);
239   addKey("CDSkipForward", Advance_Key, 0x0A, 8);
240   addKey("CDSkipBack", Replay_Key, 0x0B, 8);
241   addKey("CDForward", FastForward_Key, 0x0C, 8);
242   addKey("CDRewind", Rewind_Key, 0x0D, 8);
243   addKey("PHONO_PLAY/CUT", Unmapped_Key, 0x0E, 8);
244   addKey("vcr", Unmapped_Key, 0x0F, 8);
245   addKey("ch+", ChannelUp_Key, 0x10, 8);
246   addKey("ch-", ChannelDown_Key, 0x11, 8);
247   addKey("abcde", Unmapped_Key, 0x12, 8); // "A/B/C/D/E" "tuner-toggle"
248   addKey("GO_VCR2", Unmapped_Key, 0x13, 8);
249   addKey("phono", PhonoInput_Key, 0x14, 8);
250   addKey("cd", CDInput_Key, 0x15, 8);
251   addKey("tuner", TunerInput_Key, 0x16, 8);
252   addKey("dvdld", DVDInput_Key, 0x17, 8); // "d-tv/cbl", "AUX"
253   addKey("tapemonitor", TapeInput_Key, 0x18, 8); // "Tape/MD_Monitor", "DAT"
254   addKey("TAPE2", Unmapped_Key, 0x19, 8);
255   addKey("vol+", VolumeUp_Key, 0x1A, 8);
256   addKey("vol-", VolumeDown_Key, 0x1B, 8);
257   addKey("mute", Mute_Key, 0x1C, 8); // "-20DB"
258   addKey("on", PowerOn_Key, 0x1D, 8);
259   addKey("off", PowerOff_Key, 0x1E, 8);
260   addKey("Power", Power_Key, 0x1F, 8); // "STANDBY"
261
262   addKey("TapeDirB", Unmapped_Key, 0x40, 8);
263   addKey("DiscSkip", NextDisc_Key, 0x4F, 8); // "CD_DISC"
264   addKey("right", Right_Key, 0x52, 8);  // "DSP+", "DELAY_TIME+"
265   addKey("left", Left_Key, 0x53, 8); // "DSP-", "DELAY_TIME-"
266   addKey("tvdbs", SatInput_Key, 0x54, 8); // "SAT/D-TV" "d-tv/cbl alt"
267   addKey("vaux", Unmapped_Key, 0x55, 8); // "GO_CDV1"
268   addKey("effect", Unmapped_Key, 0x56, 8);
269   addKey("sleep", Sleep_Key, 0x57, 8);
270   addKey("effect+", Unmapped_Key, 0x58, 8); // "DSP_Prg+"
271   addKey("effect-", Unmapped_Key, 0x59, 8); // "DSP_Prg-"
272   addKey("EQ_ON/FLAT", Unmapped_Key, 0x5A, 8);
273   addKey("EQ_PRESET_SKIP", Unmapped_Key, 0x5B, 8);
274   addKey("REAR_LEVEL_+", RearVolumeUp_Key, 0x5E, 8);
275   addKey("REAR_LEVEL_-", RearVolumeDown_Key, 0x5F, 8);
276
277   addKey("FRONT_EFFECT_LEVEL_+", Unmapped_Key, 0x80, 8);
278   addKey("FRONT_EFFECT_LEVEL_-", Unmapped_Key, 0x81, 8);
279   addKey("CENTRE_LEVEL_+", CenterVolumeUp_Key, 0x82, 8);
280   addKey("CENTRE_LEVEL_-", CenterVolumeDown_Key, 0x83, 8);
281   addKey("CENTRE_MODE", Unmapped_Key, 0x84, 8);
282   addKey("test", Unmapped_Key, 0x85, 8); // "DSP_TEST"
283   addKey("level", Unmapped_Key, 0x86, 8); // "Time/Level"
284   addKey("extdecoder", Unmapped_Key, 0x87, 8); // "ExternalDecoder", "6chIN"
285   addKey("dolbydts", Surround_Key, 0x88, 8); // "PRO_LOGIC_SURROUND"
286   addKey("movietheater1", Unmapped_Key, 0x89, 8); // "PRO_LOGIC_ENHANCED"
287   addKey("movietheater2", Unmapped_Key, 0x8A, 8); // "CNCT_VIDEO"
288   addKey("monomovie", Unmapped_Key, 0x8B, 8);
289   addKey("tvsports", Unmapped_Key, 0x8C, 8); // "ROCK"
290   addKey("disco", Unmapped_Key, 0x8D, 8); // "HALL"
291   addKey("rock", Unmapped_Key, 0x8E, 8);
292   addKey("jazzclub", Unmapped_Key, 0x8F, 8);
293   addKey("church", Unmapped_Key, 0x90, 8);
294   addKey("hall", Unmapped_Key, 0x91, 8);
295
296   addKey("up", Up_Key, 0x98, 8);
297   addKey("down", Down_Key, 0x99, 8);
298   addKey("setmenu", Unmapped_Key, 0x9C, 8);
299   addKey("setmenu-", Unmapped_Key, 0x9D, 8);
300   addKey("display", Info_Key, 0xC2, 8); // "onscreen"
301 }
302
303
304 YamahaAudio2a::YamahaAudio2a(
305   unsigned int index)
306   : YamahaAudio2(index)
307 {
308   setKeysetName("Audio Keyset 2a");
309 }
310
311
312 void YamahaAudio2a::populateProtocol(
313   QObject *guiObject)
314 {
315   if (threadableProtocol)
316   {
317     // If the pointer is not null, the keyset must already be populated.
318     return;
319   }
320
321   YamahaAudio2::populateProtocol(guiObject);
322
323   addKey("Dolby/DTS", Unmapped_Key, 0x90, 8);
324   addKey("6.1/5.1", Unmapped_Key, 0x97, 8);
325   addKey("Night", Unmapped_Key, 0x95, 8);
326   addKey("Stereo", Unmapped_Key, 0x56, 8);
327 }
328
329
330 YamahaAudio2b::YamahaAudio2b(
331   unsigned int index)
332   : YamahaAudio2(index)
333 {
334   setKeysetName("Audio Keyset 2b");
335 }
336
337
338 void YamahaAudio2b::populateProtocol(
339   QObject *guiObject)
340 {
341   if (threadableProtocol)
342   {
343     // If the pointer is not null, the keyset must already be populated.
344     return;
345   }
346
347   YamahaAudio2::populateProtocol(guiObject);
348
349   addKey("SOURCE_DIRECT", Unmapped_Key, 0x56, 8);
350 }
351
352
353 YamahaAudio2c::YamahaAudio2c(
354   unsigned int index)
355   : YamahaAudio2(index)
356 {
357   setKeysetName("Audio Keyset 2c");
358 }
359
360
361 void YamahaAudio2c::populateProtocol(
362   QObject *guiObject)
363 {
364   if (threadableProtocol)
365   {
366     // If the pointer is not null, the keyset must already be populated.
367     return;
368   }
369
370   YamahaAudio2::populateProtocol(guiObject);
371
372   addKey("parameterv", Unmapped_Key, 0xC4, 8);
373   addKey("parameter^", Unmapped_Key, 0xC5, 8);
374   addKey("parameter+", Unmapped_Key, 0xC6, 8);
375   addKey("parameter-", Unmapped_Key, 0xC7, 8);
376   addKey("1", One_Key, 0x88, 8);
377   addKey("2", Two_Key, 0x89, 8);
378   addKey("3", Three_Key, 0x8A, 8);
379   addKey("4", Four_Key, 0x8B, 8);
380   addKey("5", Five_Key, 0x8C, 8);
381   addKey("6", Six_Key, 0x8D, 8);
382   addKey("7", Seven_Key, 0x8E, 8);
383   addKey("8", Eight_Key, 0x8F, 8);
384   addKey("9", Nine_Key, 0x90, 8);
385   addKey("0", Zero_Key, 0x91, 8);
386   addKey("setv", Unmapped_Key, 0x9C, 8);
387   addKey("set^", Unmapped_Key, 0x9D, 8);
388   addKey("set+", Unmapped_Key, 0x9E, 8);
389   addKey("set-", Unmapped_Key, 0x9F, 8);
390 }
391
392
393 YamahaAudio2d::YamahaAudio2d(
394   unsigned int index)
395   : YamahaAudio2(index)
396 {
397   setKeysetName("Audio Keyset 2d");
398 }
399
400
401 void YamahaAudio2d::populateProtocol(
402   QObject *guiObject)
403 {
404   if (threadableProtocol)
405   {
406     // If the pointer is not null, the keyset must already be populated.
407     return;
408   }
409
410   YamahaAudio2::populateProtocol(guiObject);
411
412   addKey("LOUDNESS_+", Unmapped_Key, 0x1D, 8);
413   addKey("LOUDNESS_-", Unmapped_Key, 0x1E, 8);
414 }
415
416
417 YamahaAudio3::YamahaAudio3(
418   unsigned int index)
419   : PIRKeysetMetaData(
420       "Audio Keyset 3",
421       Yamaha_Make,
422       index)
423 {
424 }
425
426
427 void YamahaAudio3::populateProtocol(
428   QObject *guiObject)
429 {
430   if (threadableProtocol)
431   {
432     // If the pointer is not null, the keyset must already be populated.
433     return;
434   }
435
436   threadableProtocol = new NECProtocol(guiObject, index, false, true);
437
438 //  setPreData(0xFE01, 16);
439   setPreData(0x7F, 8);
440
441   addKey("PLAY", Play_Key, 0x00, 8);
442   addKey("REWIND", Rewind_Key, 0x01, 8);
443   addKey("FAST_FORWARD", FastForward_Key, 0x02, 8);
444   addKey("STOP", Stop_Key, 0x03, 8);
445   addKey("RECORD/PAUSE", Record_Key, 0x04, 8);
446   addKey("RECORD_MUTE", RecordMute_Key, 0x05, 8);
447   addKey("DECK_A/B", Unmapped_Key, 0x06, 8);
448   addKey("DIRECTION_<>", Unmapped_Key, 0x07, 8); // "DIR_A"
449   addKey("DIR_B", Unmapped_Key, 0x08, 8);
450   addKey("DUBBING", Unmapped_Key, 0x09, 8);
451   addKey("SEARCH_FORWARD", Advance_Key, 0x0A, 8);
452   addKey("SEARCH_REVERSE", Replay_Key, 0x0B, 8);
453   addKey("COUNTER_TAPE", Unmapped_Key, 0x0C, 8);
454   addKey("COUNTER_RESET", Reset_Key, 0x0D, 8);
455   addKey("COUNTER_MEMORY", Unmapped_Key, 0x0E, 8);
456   addKey("MONITOR", Unmapped_Key, 0x0F, 8);
457   addKey("0", Zero_Key, 0x10, 8);
458   addKey("1", One_Key, 0x11, 8);
459   addKey("2", Two_Key, 0x12, 8);
460   addKey("3", Three_Key, 0x13, 8);
461   addKey("4", Four_Key, 0x14, 8);
462   addKey("5", Five_Key, 0x15, 8);
463   addKey("6", Six_Key, 0x16, 8);
464   addKey("7", Seven_Key, 0x17, 8);
465   addKey("8", Eight_Key, 0x18, 8);
466   addKey("9", Nine_Key, 0x19, 8);
467   addKey("PROG", Program_Key, 0x1A, 8);
468   addKey("CLEAR", Clear_Key, 0x1B, 8);
469   addKey("RUN", Unmapped_Key, 0x1C, 8);
470   addKey("COUNTER_REMAIN", Unmapped_Key, 0x1D, 8);
471   addKey("INTRO_SCAN_FORWARD", Unmapped_Key, 0x1E, 8);
472   addKey("INTRO_SCAN_REVERSE", Unmapped_Key, 0x1F, 8);
473 }
474
475
476 YamahaAudio4::YamahaAudio4(
477   unsigned int index)
478   : PIRKeysetMetaData(
479       "Audio Keyset 4",
480       Yamaha_Make,
481       index)
482 {
483   addControlledDevice(Yamaha_Make, "GX-50", Audio_Device);
484 }
485
486
487 void YamahaAudio4::populateProtocol(
488   QObject *guiObject)
489 {
490   if (threadableProtocol)
491   {
492     // If the pointer is not null, the keyset must already be populated.
493     return;
494   }
495
496   threadableProtocol = new NECProtocol(guiObject, index, false, true);
497
498 //  setPreData(0x1EE1, 16);
499   setPreData(0x78, 8);
500
501   addKey("open", Eject_Key, 0x00, 8);
502   addKey("cd_stop", Stop_Key, 0x01, 8);
503   addKey("cd_play", Play_Key, 0x02, 8);
504   addKey("cd_next", Next_Key, 0x03, 8);
505   addKey("cd_last", Previous_Key, 0x04, 8);
506   addKey("random", Random_Key, 0x07, 8);
507   addKey("tape", Unmapped_Key, 0x08, 8);
508   addKey("edit", Unmapped_Key, 0x09, 8);
509   addKey("time", Unmapped_Key, 0x0A, 8);
510   addKey("prog", Program_Key, 0x0B, 8);
511   addKey("repeat", Repeat_Key, 0x0C, 8);
512   addKey("disc_skip", NextDisc_Key, 0x0D, 8);
513   addKey("power", Power_Key, 0x0F, 8);
514   addKey("0", Zero_Key, 0x10, 8);
515   addKey("1", One_Key, 0x11, 8);
516   addKey("2", Two_Key, 0x12, 8);
517   addKey("3", Three_Key, 0x13, 8);
518   addKey("4", Four_Key, 0x14, 8);
519   addKey("5", Five_Key, 0x15, 8);
520   addKey("6", Six_Key, 0x16, 8);
521   addKey("7", Seven_Key, 0x17, 8);
522   addKey("8", Eight_Key, 0x18, 8);
523   addKey("9", Nine_Key, 0x19, 8);
524   addKey("+10", DoubleDigit_Key, 0x1A, 8);
525   addKey("+", ChannelUp_Key, 0x1E, 8);
526   addKey("-", ChannelDown_Key, 0x1F, 8);
527   addKey("tape_stop", Unmapped_Key, 0x41, 8);
528   addKey("tape_play_forward", Unmapped_Key, 0x42, 8);
529   addKey("tape_play_back", Unmapped_Key, 0x43, 8);
530   addKey("tape_forward", Unmapped_Key, 0x44, 8);
531   addKey("tape_back", Unmapped_Key, 0x45, 8);
532   addKey("rec", Record_Key, 0x46, 8);
533   addKey("tape1/2", Unmapped_Key, 0x47, 8);
534   addKey("tuner", TunerInput_Key, 0x4B, 8);
535   addKey("sleep", Sleep_Key, 0x4F, 8);
536   addKey("up_arrow", Up_Key, 0x55, 8);
537   addKey("down_arrow", Down_Key, 0x56, 8);
538   addKey("left_arrow", Left_Key, 0x57, 8);
539   addKey("right_arrow", Right_Key, 0x58, 8);
540   addKey("flat", Unmapped_Key, 0x59, 8);
541   addKey("music", Unmapped_Key, 0x5A, 8);
542   addKey("location", Unmapped_Key, 0x5B, 8);
543   addKey("user", Unmapped_Key, 0x5C, 8);
544   addKey("mode", Unmapped_Key, 0x5D, 8);
545   addKey("input", Input_Key, 0x5E, 8);
546 }
547
548
549 YamahaTV1::YamahaTV1(
550   unsigned int index)
551   : PIRKeysetMetaData(
552       "TV Keyset 1",
553       Yamaha_Make,
554       index)
555 {
556 }
557
558
559 void YamahaTV1::populateProtocol(
560   QObject *guiObject)
561 {
562   if (threadableProtocol)
563   {
564     // If the pointer is not null, the keyset must already be populated.
565     return;
566   }
567
568   threadableProtocol = new NECProtocol(guiObject, index, false, true);
569
570 //  setPreData(0x20DF, 16);
571   setPreData(0x04, 8);
572
573   addKey("ch+", ChannelUp_Key, 0x00, 8);
574   addKey("ch-", ChannelDown_Key, 0x01, 8);
575   addKey("vol+", VolumeUp_Key, 0x02, 8);
576   addKey("vol-", VolumeDown_Key, 0x03, 8);
577   addKey("mute", Mute_Key, 0x09, 8);
578   addKey("0", Zero_Key, 0x10, 8);
579   addKey("1", One_Key, 0x11, 8);
580   addKey("2", Two_Key, 0x12, 8);
581   addKey("3", Three_Key, 0x13, 8);
582   addKey("4", Four_Key, 0x14, 8);
583   addKey("5", Five_Key, 0x15, 8);
584   addKey("6", Six_Key, 0x16, 8);
585   addKey("7", Seven_Key, 0x17, 8);
586   addKey("8", Eight_Key, 0x18, 8);
587   addKey("9", Nine_Key, 0x19, 8);
588   addKey("goback", PrevChannel_Key, 0x1A, 8);
589 }
590
591
592 YamahaKaraoke1::YamahaKaraoke1(
593   unsigned int index)
594   : PIRKeysetMetaData(
595       "Karaoke Keyset 1",
596       Yamaha_Make,
597       index)
598 {
599 }
600
601
602 void YamahaKaraoke1::populateProtocol(
603   QObject *guiObject)
604 {
605   if (threadableProtocol)
606   {
607     // If the pointer is not null, the keyset must already be populated.
608     return;
609   }
610
611   threadableProtocol = new NECProtocol(guiObject, index, false, true);
612
613 //  setPreData(0xDE21, 16);
614   setPreData(0x7B, 8);
615
616   addKey("POWER", Power_Key, 0x80, 8);
617   addKey("VOL+", VolumeUp_Key, 0x82, 8);
618   addKey("VOL-", VolumeDown_Key, 0x83, 8);
619   addKey("LD", LDInput_Key, 0x8C, 8);
620   addKey("CD/CDG", CDInput_Key, 0x8D, 8);
621   addKey("VCR", VCRInput_Key, 0x8E, 8);
622   addKey("TAPE", TapeInput_Key, 0x8F, 8);
623   addKey("AUX2", Unmapped_Key, 0x90, 8);
624   addKey("AUX1", AuxInput_Key, 0x91, 8);
625   addKey("B_SYMBOL", Unmapped_Key, 0x96, 8);
626   addKey("SQUARE_SYMBOL", Unmapped_Key, 0x97, 8);
627   addKey("HASH", Unmapped_Key, 0x98, 8);
628   addKey("BALLAD", One_Key, 0x99, 8);
629   addKey("POPS", Two_Key, 0x9A, 8);
630   addKey("JAZZ", Three_Key, 0x9B, 8);
631   addKey("ROCK", Four_Key, 0x9C, 8);
632   addKey("MPX/STEREO", Unmapped_Key, 0xD8, 8);
633   addKey("VOCAL_AID", Unmapped_Key, 0xD9, 8);
634   addKey("ONE_TOUCH_KAR.", Unmapped_Key, 0xDA, 8);
635 }