13352eaa9b892af4f55f1107b40e1d2dfbb37baf
[pierogi] / keysets / grundig.cpp
1 #include "grundig.h"
2 #include "protocols/rc5protocol.h"
3 #include "protocols/necxprotocol.h"
4 #include "protocols/necprotocol.h"
5
6 // This one is iffy, might be another brand:
7 GrundigSat1::GrundigSat1(
8   unsigned int index)
9   : PIRKeysetMetaData(
10       "Satellite Keyset 1",
11       Grundig_Make,
12       index)
13 {
14 }
15
16
17 void GrundigSat1::populateProtocol(
18   QObject *guiObject)
19 {
20   if (threadableProtocol)
21   {
22     // If the pointer is not null, the keyset must already be populated.
23     return;
24   }
25
26   threadableProtocol = new RC5Protocol(guiObject, index);
27
28   addKey("Mute", Mute_Key, 0x0286, 13);
29   addKey("Guide", Guide_Key, 0x028F, 13);
30   addKey("Up", Up_Key, 0x0290, 13);
31   addKey("Down", Down_Key, 0x0291, 13);
32   addKey("Serv", Unmapped_Key, 0x0292, 13);
33   addKey("Exit", Exit_Key, 0x0293, 13);
34   addKey("Left", Left_Key, 0x0295, 13);
35   addKey("Right", Right_Key, 0x0296, 13);
36   addKey("OK", Select_Key, 0x0297, 13);
37   addKey("Prefer", Unmapped_Key, 0x02A1, 13);
38   addKey("Perso", Unmapped_Key, 0x02AA, 13);
39   addKey("A", Unmapped_Key, 0x02AB, 13);
40   addKey("B", Unmapped_Key, 0x02AC, 13);
41   addKey("C", Unmapped_Key, 0x02AD, 13);
42   addKey("D", Unmapped_Key, 0x02AE, 13);
43   addKey("E", Unmapped_Key, 0x02AF, 13);
44
45   addKey("1", One_Key, 0x1281, 13);
46   addKey("2", Two_Key, 0x1282, 13);
47   addKey("3", Three_Key, 0x1283, 13);
48   addKey("4", Four_Key, 0x1284, 13);
49   addKey("5", Five_Key, 0x1285, 13);
50   addKey("6", Six_Key, 0x1286, 13);
51   addKey("7", Seven_Key, 0x1287, 13);
52   addKey("8", Eight_Key, 0x1288, 13);
53   addKey("9", Nine_Key, 0x1289, 13);
54   addKey("0", Zero_Key, 0x1280, 13);
55   addKey("Standby", Power_Key, 0x128C, 13);
56   addKey("Info", Info_Key, 0x128F, 13);
57   addKey("TV/Sat", Input_Key, 0x12A8, 13);
58   addKey("Plus", Unmapped_Key, 0x12AF, 13);
59 }
60
61
62 GrundigSat2::GrundigSat2(
63   unsigned int index)
64   : PIRKeysetMetaData(
65       "Satellite Keyset 2",
66       Grundig_Make,
67       index)
68 {
69   addControlledDevice(Grundig_Make, "STR 7100", Sat_Device);
70 }
71
72
73 void GrundigSat2::populateProtocol(
74   QObject *guiObject)
75 {
76   if (threadableProtocol)
77   {
78     // If the pointer is not null, the keyset must already be populated.
79     return;
80   }
81
82   threadableProtocol = new RC5Protocol(guiObject, index);
83
84   addKey("POWER", Power_Key, 0x017B, 13);
85   addKey("Audio", Audio_Key, 0x00D3, 13);
86   addKey(">|", StepForward_Key, 0x008B, 13);
87   addKey("|<", StepBack_Key, 0x00BB, 13);
88   addKey("1", One_Key, 0x00EB, 13);
89   addKey("2", Two_Key, 0x016B, 13);
90   addKey("3", Three_Key, 0x006B, 13);
91   addKey("4", Four_Key, 0x01AB, 13);
92   addKey("5", Five_Key, 0x00AB, 13);
93   addKey("6", Six_Key, 0x012B, 13);
94   addKey("7", Seven_Key, 0x002B, 13);
95   addKey("8", Eight_Key, 0x01CB, 13);
96   addKey("9", Nine_Key, 0x00CB, 13);
97   addKey("0", Zero_Key, 0x01EB, 13);
98   addKey("i", Info_Key, 0x0093, 13);  // "OSD"
99   addKey("MUTE", Mute_Key, 0x00FB, 13);
100   addKey("P+", ChannelUp_Key, 0x0153, 13);
101   addKey("P-", ChannelDown_Key, 0x0053, 13);
102   addKey("-", VolumeDown_Key, 0x00DB, 13);
103   addKey("+", VolumeUp_Key, 0x01DB, 13);
104   addKey("OK", Select_Key, 0x01FB, 13);
105   addKey("AUX", AuxInput_Key, 0x003B, 13); // "DiscMenu"
106   addKey("TXT", Teletext_Key, 0x01E3, 13);
107   addKey("RED", Red_Key, 0x0143, 13);
108   addKey("GREEN", Green_Key, 0x0103, 13);
109   addKey("YELLOW", Yellow_Key, 0x0043, 13);
110   addKey("BLUE", Blue_Key, 0x0113, 13);
111   addKey("COL-", ColorDown_Key, 0x009B, 13);
112   addKey("COL+", ColorUp_Key, 0x019B, 13);
113   addKey("BRIGHT-", BrightnessDown_Key, 0x005B, 13);
114   addKey("BRIGHT+", BrightnessUp_Key, 0x015B, 13);
115   addKey("TV-G", Unmapped_Key, 0x01BB, 13);
116 }
117
118
119 GrundigAmp1::GrundigAmp1(
120   unsigned int index)
121   : PIRKeysetMetaData(
122       "Amp Keyset 1",
123       Grundig_Make,
124       index)
125 {
126   addControlledDevice(Grundig_Make, "FineArts Amplifier V1", Audio_Device);
127 }
128
129
130 void GrundigAmp1::populateProtocol(
131   QObject *guiObject)
132 {
133   if (threadableProtocol)
134   {
135     // If the pointer is not null, the keyset must already be populated.
136     return;
137   }
138
139   threadableProtocol = new RC5Protocol(guiObject, index);
140
141   addKey("number_10", Zero_Key, 0x1C00, 13);
142   addKey("number_1", One_Key, 0x1C01, 13);
143   addKey("number_2", Two_Key, 0x1C02, 13);
144   addKey("number_3", Three_Key, 0x1C03, 13);
145   addKey("number_4", Four_Key, 0x1C04, 13);
146   addKey("number_5", Five_Key, 0x1C05, 13);
147   addKey("number_6", Six_Key, 0x1C06, 13);
148   addKey("number_7", Seven_Key, 0x1C07, 13);
149   addKey("number_8", Eight_Key, 0x1C08, 13);
150   addKey("number_9", Nine_Key, 0x1C09, 13);
151   addKey("mute", Mute_Key, 0x1C0D, 13);
152   addKey("volume_+", VolumeUp_Key, 0x1C10, 13);
153   addKey("volume_-", VolumeDown_Key, 0x1C11, 13);
154   addKey("standby", Power_Key, 0x1C3D, 13);
155
156   addKey("tuner_up", ChannelUp_Key, 0x1C60, 13);
157   addKey("tuner_down", ChannelDown_Key, 0x1C61, 13);
158   addKey("tuner", TunerInput_Key, 0x1C7F, 13);
159
160   addKey("tape_play_back", Unmapped_Key, 0x1CAF, 13);
161   addKey("tape_pause", Unmapped_Key, 0x1CB0, 13);
162   addKey("tape_fastrewind", Unmapped_Key, 0x1CB2, 13);
163   addKey("tape_fastforward", Unmapped_Key, 0x1CB4, 13);
164   addKey("tape_play_forward", Unmapped_Key, 0x1CB5, 13);
165   addKey("tape_stop", Unmapped_Key, 0x1CB6, 13);
166   addKey("tape_record", Unmapped_Key, 0x1CB7, 13);
167   addKey("tape", TapeInput_Key, 0x1CBF, 13);
168
169   addKey("cd_fastforward", FastForward_Key, 0x1D20, 13);
170   addKey("cd_fastrewind", Rewind_Key, 0x1D21, 13);
171   addKey("cd_pause", Pause_Key, 0x1D30, 13);
172   addKey("cd_play", Play_Key, 0x1D35, 13);
173   addKey("cd_stop", Stop_Key, 0x1D36, 13);
174   addKey("cd", CDInput_Key, 0x1D3F, 13);
175
176   addKey("phono", PhonoInput_Key, 0x1D7F, 13);
177   addKey("dsr_up", Unmapped_Key, 0x1DA0, 13);
178   addKey("dsr_down", Unmapped_Key, 0x1DA1, 13);
179   addKey("dsr_aux", AuxInput_Key, 0x1DBF, 13);
180
181   addKey("dcc_play_back", Unmapped_Key, 0x1DEF, 13);
182   addKey("dcc_pause", Unmapped_Key, 0x1DF0, 13);
183   addKey("dcc_fastrewind", Unmapped_Key, 0x1DF2, 13);
184   addKey("dcc_fastforward", Unmapped_Key, 0x1DF4, 13);
185   addKey("dcc_play_forward", Unmapped_Key, 0x1DF5, 13);
186   addKey("dcc_stop", Unmapped_Key, 0x1DF6, 13);
187   addKey("dcc_record", Unmapped_Key, 0x1DF7, 13);
188   addKey("dcc", Unmapped_Key, 0x1DFF, 13);
189 }
190
191
192 GrundigAudio1::GrundigAudio1(
193   unsigned int index)
194   : PIRKeysetMetaData(
195       "Audio(CD) Keyset 1",
196       Grundig_Make,
197       index)
198 {
199   addControlledDevice(Grundig_Make, "CD 8400", Audio_Device);
200 }
201
202
203 void GrundigAudio1::populateProtocol(
204   QObject *guiObject)
205 {
206   if (threadableProtocol)
207   {
208     // If the pointer is not null, the keyset must already be populated.
209     return;
210   }
211
212   threadableProtocol = new RC5Protocol(guiObject, index);
213
214   addKey("0", Zero_Key, 0x1D00, 13);
215   addKey("1", One_Key, 0x1D01, 13);
216   addKey("2", Two_Key, 0x1D02, 13);
217   addKey("3", Three_Key, 0x1D03, 13);
218   addKey("4", Four_Key, 0x1D04, 13);
219   addKey("5", Five_Key, 0x1D05, 13);
220   addKey("6", Six_Key, 0x1D06, 13);
221   addKey("7", Seven_Key, 0x1D07, 13);
222   addKey("8", Eight_Key, 0x1D08, 13);
223   addKey("9", Nine_Key, 0x1D09, 13);
224   addKey("10+", DoubleDigit_Key, 0x1D0A, 13); // hack
225   addKey("20+", PlusOneHundred_Key, 0x1D0B, 13); // also hack
226
227   addKey("repeat", Repeat_Key, 0x1D1D, 13);
228
229   addKey("track+", Next_Key, 0x1D20, 13);
230   addKey("track-", Previous_Key, 0x1D21, 13);
231   addKey("index+", Unmapped_Key, 0x1D22, 13);
232   addKey("index-", Unmapped_Key, 0x1D23, 13);
233   addKey("store", Memory_Key, 0x1D29, 13);
234   addKey("scan", Scan_Key, 0x1D2B, 13);
235
236   addKey("pause", Pause_Key, 0x1D30, 13);
237   addKey("skip-", Replay_Key, 0x1D32, 13);
238   addKey("skip+", Advance_Key, 0x1D34, 13);
239   addKey("play", Play_Key, 0x1D35, 13);
240   addKey("stop", Stop_Key, 0x1D36, 13);
241 }
242
243
244 GrundigAudio2::GrundigAudio2(
245   unsigned int index)
246   : PIRKeysetMetaData(
247       "Audio Keyset 2",
248       Grundig_Make,
249       index)
250 {
251   addControlledDevice(Grundig_Make, "CDM 700", Audio_Device);
252   addControlledDevice(Grundig_Make, "UMS-9V", Audio_Device);
253 }
254
255
256 void GrundigAudio2::populateProtocol(
257   QObject *guiObject)
258 {
259   if (threadableProtocol)
260   {
261     // If the pointer is not null, the keyset must already be populated.
262     return;
263   }
264
265   threadableProtocol = new NECXProtocol(guiObject, index, true);
266
267   setPreData(0xA2A2, 16);
268
269   addKey("1", One_Key, 0x01, 8);
270   addKey("5", Five_Key, 0x02, 8);
271   addKey("9", Nine_Key, 0x03, 8);
272   addKey("tuning_down", ChannelDown_Key, 0x04, 8);
273   addKey("display", Info_Key, 0x05, 8); // "MODE_remain
274   addKey("on/off", Power_Key, 0x06, 8);
275   addKey("tuner", TunerInput_Key, 0x07, 8);
276   addKey("2", Two_Key, 0x09, 8);
277   addKey("6", Six_Key, 0x0A, 8);
278   addKey("0", Zero_Key, 0x0B, 8);
279   addKey("tuning_up", ChannelUp_Key, 0x0C, 8);
280   addKey("random", Random_Key, 0x0D, 8);
281   addKey("band", TunerBand_Key, 0x0E, 8);
282   addKey("cd", CDInput_Key, 0x0F, 8);
283
284   addKey("3", Three_Key, 0x11, 8);
285   addKey("7", Seven_Key, 0x12, 8);
286   addKey("play/pause", Play_Key, 0x13, 8);
287   addKey("play/pause", Pause_Key, 0x13, 8);
288   addKey("time_program", Program_Key, 0x14, 8); // "MEMORY_clock"
289   addKey("intro", Unmapped_Key, 0x15, 8);
290   addKey("SLEEP", Sleep_Key, 0x17, 8);
291   addKey("4", Four_Key, 0x19, 8);
292   addKey("8", Eight_Key, 0x1A, 8);
293   addKey("stop", Stop_Key, 0x1B, 8);
294   addKey("repeat/scan", Repeat_Key, 0x1C, 8);
295   addKey("repeat/scan", Scan_Key, 0x1C, 8);
296   addKey("BASS", EnhancedBass_Key, 0x1D, 8);
297   addKey("tape", TapeInput_Key, 0x1E, 8);
298   addKey("TIMER", Timer_Key, 0x1F, 8);
299
300   addKey("volume_up", VolumeUp_Key, 0x20, 8);
301   addKey("volume_down", VolumeDown_Key, 0x60, 8);
302   addKey("mute", Mute_Key, 0xA0, 8);
303   addKey("+10", DoubleDigit_Key, 0xE0, 8);
304 }
305
306
307 GrundigVCR1::GrundigVCR1(
308   unsigned int index)
309   : PIRKeysetMetaData(
310       "VCR Keyset 1",
311       Grundig_Make,
312       index)
313 {
314   addControlledDevice(Grundig_Make, "GV 437", VCR_Device);
315 }
316
317
318 void GrundigVCR1::populateProtocol(
319   QObject *guiObject)
320 {
321   if (threadableProtocol)
322   {
323     // If the pointer is not null, the keyset must already be populated.
324     return;
325   }
326
327   threadableProtocol = new RC5Protocol(guiObject, index);
328
329   addKey("SYSTEM", Menu_Key, 0x014A, 13);
330   addKey("OK", Select_Key, 0x0157, 13);
331   addKey("next", Next_Key, 0x0170, 13);
332   addKey("previous", Previous_Key, 0x0171, 13);
333   addKey("MONITOR", Unmapped_Key, 0x017A, 13);
334   addKey("tuner", TunerInput_Key, 0x017D, 13);
335   addKey("cass", Eject_Key, 0x017E, 13); // might be wrong
336
337   addKey("0", Zero_Key, 0x1140, 13);
338   addKey("1", One_Key, 0x1141, 13);
339   addKey("2", Two_Key, 0x1142, 13);
340   addKey("3", Three_Key, 0x1143, 13);
341   addKey("4", Four_Key, 0x1144, 13);
342   addKey("5", Five_Key, 0x1145, 13);
343   addKey("6", Six_Key, 0x1146, 13);
344   addKey("7", Seven_Key, 0x1147, 13);
345   addKey("8", Eight_Key, 0x1148, 13);
346   addKey("9", Nine_Key, 0x1149, 13);
347   addKey("SELECT", Enter_Key, 0x114B, 13); // "selvps"
348   addKey("standby", Power_Key, 0x114C, 13); // "OFF"
349   addKey("tracking", AutoTracking_Key, 0x114E, 13);
350
351   addKey("TIMER", Timer_Key, 0x115D, 13);
352
353   // Just guessing at what + and - mean here:
354   addKey("+", ChannelUp_Key, 0x1160, 13);
355   addKey("-", ChannelDown_Key, 0x1161, 13);
356   addKey("REW", Rewind_Key, 0x1165, 13);
357   addKey("FF", FastForward_Key, 0x1166, 13);
358
359   addKey("CLEAR", Clear_Key, 0x1171, 13);
360   addKey("PLAY", Play_Key, 0x1175, 13);
361   addKey("pausestop", Pause_Key, 0x1176, 13); // "STOP"
362   addKey("pausestop", Stop_Key, 0x1176, 13); // "STOP"
363   addKey("RECORD", Record_Key, 0x1177, 13);
364   addKey("SP/LP", VHSSpeed_Key, 0x117A, 13);
365 }
366
367
368 GrundigVCR1a::GrundigVCR1a(
369   unsigned int index)
370   : GrundigVCR1(index)
371 {
372   setKeysetName("VCR Keyset 1a");
373 }
374
375
376 void GrundigVCR1a::populateProtocol(
377   QObject *guiObject)
378 {
379   if (threadableProtocol)
380   {
381     // If the pointer is not null, the keyset must already be populated.
382     return;
383   }
384
385   GrundigVCR1::populateProtocol(guiObject);
386
387   addKey("INDEX", Unmapped_Key, 0x0170, 13);
388   addKey("PAUSE", Pause_Key, 0x1169, 13);
389 }
390
391
392 GrundigTV1::GrundigTV1(
393   unsigned int index)
394   : PIRKeysetMetaData(
395       "TV Keyset 1",
396       Grundig_Make,
397       index)
398 {
399   addControlledDevice(Grundig_Make, "ST 55-908", TV_Device);
400 }
401
402
403 void GrundigTV1::populateProtocol(
404   QObject *guiObject)
405 {
406   if (threadableProtocol)
407   {
408     // If the pointer is not null, the keyset must already be populated.
409     return;
410   }
411
412   threadableProtocol = new RC5Protocol(guiObject, index);
413
414   addKey("leer", Unmapped_Key, 0x0000, 13);
415   addKey("POWER", Power_Key, 0x017F, 13);
416   addKey("1", One_Key, 0x00EF, 13);
417   addKey("2", Two_Key, 0x016F, 13);
418   addKey("3", Three_Key, 0x006F, 13);
419   addKey("4", Four_Key, 0x01AF, 13);
420   addKey("5", Five_Key, 0x00AF, 13);
421   addKey("6", Six_Key, 0x012F, 13);
422   addKey("7", Seven_Key, 0x002F, 13);
423   addKey("8", Eight_Key, 0x1CF, 13);
424   addKey("9", Nine_Key, 0x00CF, 13);
425   addKey("0", Zero_Key, 0x01EF, 13);
426   addKey("AUX2", Unmapped_Key, 0x014F, 13);
427   addKey("BR+", BrightnessUp_Key, 0x015F, 13);
428   addKey("BR-", BrightnessDown_Key, 0x005F, 13);
429   addKey("COLOR+", ColorUp_Key, 0x019F, 13);
430   addKey("COLOR-", ColorDown_Key, 0x009F, 13);
431   addKey("AUX", AuxInput_Key, 0x003F, 13);
432   addKey("I", Info_Key, 0x0097, 13); // "Info"
433   addKey("TXT", Teletext_Key, 0x01E7, 13);
434   addKey("P+", ChannelUp_Key, 0x0157, 13);
435   addKey("P+", Up_Key, 0x0157, 13);
436   addKey("VOL-", VolumeDown_Key, 0x00DF, 13);
437   addKey("VOL-", Left_Key, 0x00DF, 13);
438   addKey("OK", Select_Key, 0x01FF, 13);
439   addKey("VOL+", VolumeUp_Key, 0x01DF, 13);
440   addKey("VOL+", Right_Key, 0x01DF, 13);
441   addKey("P-", ChannelDown_Key, 0x0057, 13);
442   addKey("P-", Down_Key, 0x0057, 13);
443   addKey("MUTE", Mute_Key, 0x00FF, 13);
444   addKey("BLUE", Blue_Key, 0x0117, 13);
445   addKey("YELLOW", Yellow_Key, 0x0047, 13);
446   addKey("GREEN", Green_Key, 0x0107, 13);
447   addKey("RED", Red_Key, 0x0147, 13);
448 }
449
450
451 GrundigTV2::GrundigTV2(
452   unsigned int index)
453   : PIRKeysetMetaData(
454       "TV Keyset 2",
455       Grundig_Make,
456       index)
457 {
458 }
459
460
461 void GrundigTV2::populateProtocol(
462   QObject *guiObject)
463 {
464   if (threadableProtocol)
465   {
466     // If the pointer is not null, the keyset must already be populated.
467     return;
468   }
469
470   threadableProtocol = new RC5Protocol(guiObject, index);
471
472   addKey("P+", ChannelUp_Key, 0x0010, 13);
473   addKey("P+", Up_Key, 0x0010, 13);
474   addKey("P-", ChannelDown_Key, 0x0011, 13);
475   addKey("P-", Down_Key, 0x0011, 13);
476   addKey("info", Info_Key, 0x0012, 13);
477   addKey("<-", VolumeDown_Key, 0x0015, 13);
478   addKey("<-", Left_Key, 0x0015, 13);
479   addKey("+>", VolumeUp_Key, 0x0016, 13);
480   addKey("+>", Right_Key, 0x0016, 13);
481   addKey("OK", Select_Key, 0x0017, 13);
482
483   addKey("NEXT", Next_Key, 0x0170, 13);
484   addKey("PREV", Previous_Key, 0x0171, 13);
485
486   addKey("0AV", Zero_Key, 0x1000, 13); // also AV?
487   addKey("1", One_Key, 0x1001, 13);
488   addKey("2", Two_Key, 0x1002, 13);
489   addKey("3", Three_Key, 0x1003, 13);
490   addKey("4", Four_Key, 0x1004, 13);
491   addKey("5", Five_Key, 0x1005, 13);
492   addKey("6", Six_Key, 0x1006, 13);
493   addKey("7", Seven_Key, 0x1007, 13);
494   addKey("8", Eight_Key, 0x1008, 13);
495   addKey("9", Nine_Key, 0x1009, 13);
496   addKey("power", Power_Key, 0x100C, 13);
497   addKey("mute", Mute_Key, 0x100D, 13);
498
499   addKey("br+", BrightnessUp_Key, 0x1012, 13);
500   addKey("br-", BrightnessDown_Key, 0x1013, 13);
501   addKey("col+", ColorUp_Key, 0x1014, 13);
502   addKey("col-", ColorDown_Key, 0x1015, 13);
503
504   addKey("PC/CL", Unmapped_Key, 0x1031, 13);
505
506   addKey("TXT", Teletext_Key, 0x115D, 13);
507   addKey("<<", Rewind_Key, 0x1165, 13);
508   addKey(">>", FastForward_Key, 0x1166, 13);
509   addKey("||", Pause_Key, 0x1169, 13);
510   addKey(">", Play_Key, 0x1175, 13);
511   addKey("stop", Stop_Key, 0x1176, 13);
512   addKey("REC", Record_Key, 0x1177, 13);
513 }
514
515
516 GrundigTV3::GrundigTV3(
517   unsigned int index)
518   : PIRKeysetMetaData(
519       "TV/VDR Keyset 3",
520       Grundig_Make,
521       index)
522 {
523 }
524
525
526 void GrundigTV3::populateProtocol(
527   QObject *guiObject)
528 {
529   if (threadableProtocol)
530   {
531     // If the pointer is not null, the keyset must already be populated.
532     return;
533   }
534
535   threadableProtocol = new RC5Protocol(guiObject, index);
536
537   addKey("USR4", Unmapped_Key, 0x0205, 13);
538   addKey("INFO", Info_Key, 0x0206, 13);
539   addKey("BACK", Exit_Key, 0x020F, 13);
540   addKey("UP", Up_Key, 0x0210, 13);
541   addKey("DOWN", Down_Key, 0x0211, 13);
542   addKey("LEFT", Left_Key, 0x0215, 13);
543   addKey("RIGHT", Right_Key, 0x0216, 13);
544   addKey("OK", Select_Key, 0x0217, 13);
545
546   addKey("RED", Red_Key, 0x022B, 13);
547   addKey("GREEN", Green_Key, 0x022C, 13);
548   addKey("YEL", Yellow_Key, 0x022D, 13);
549   addKey("BLU", Blue_Key, 0x022E, 13);
550   addKey("USR2", Unmapped_Key, 0x0235, 13);
551   addKey("USR1", Unmapped_Key, 0x023E, 13);
552
553   addKey("0", Zero_Key, 0x1200, 13);
554   addKey("1", One_Key, 0x1201, 13);
555   addKey("2", Two_Key, 0x1202, 13);
556   addKey("3", Three_Key, 0x1203, 13);
557   addKey("4", Four_Key, 0x1204, 13);
558   addKey("5", Five_Key, 0x1205, 13);
559   addKey("6", Six_Key, 0x1206, 13);
560   addKey("7", Seven_Key, 0x1207, 13);
561   addKey("8", Eight_Key, 0x1208, 13);
562   addKey("9", Nine_Key, 0x1209, 13);
563
564   addKey("MUTE", Mute_Key, 0x120D, 13);
565   addKey("REC", Record_Key, 0x120E, 13);
566   addKey("VOL+", VolumeUp_Key, 0x1210, 13);
567   addKey("VOL-", VolumeDown_Key, 0x1211, 13);
568   addKey("NEXT", Next_Key, 0x121E, 13);
569   addKey("PREV", Previous_Key, 0x121F, 13);
570   addKey("CHANNEL+", ChannelUp_Key, 0x1220, 13);
571   addKey("CHANNEL-", ChannelDown_Key, 0x1221, 13);
572   addKey("CEC", Unmapped_Key, 0x1222, 13);
573   addKey("USR3", Unmapped_Key, 0x1223, 13);
574   addKey("REW", Rewind_Key, 0x122C, 13);
575   addKey("FF", FastForward_Key, 0x122E, 13);
576
577   addKey("PAUSE", Pause_Key, 0x1230, 13);
578   addKey("PLAY", Play_Key, 0x1235, 13);
579   addKey("STOP", Stop_Key, 0x1236, 13);
580   addKey("MENU", Menu_Key, 0x123C, 13);
581 }
582
583
584 GrundigDVD1::GrundigDVD1(
585   unsigned int index)
586   : PIRKeysetMetaData(
587       "DVD Keyset 1",
588       Grundig_Make,
589       index)
590 {
591   addControlledDevice(Grundig_Make, "GDV 130", DVD_Device);
592 }
593
594
595 void GrundigDVD1::populateProtocol(
596   QObject *guiObject)
597 {
598   if (threadableProtocol)
599   {
600     // If the pointer is not null, the keyset must already be populated.
601     return;
602   }
603
604   threadableProtocol = new NECProtocol(guiObject, index, false, true);
605
606   setPreData(0x10, 8);
607
608   addKey("POWER", Power_Key, 0x00, 8);
609   addKey("FF_SF", FastForward_Key, 0x01, 8);
610   addKey("OPEN_CLOSE", Eject_Key, 0x02, 8);
611   addKey("ARROW_LEFT", Left_Key, 0x03, 8);
612   addKey("STEP", StepForward_Key, 0x04, 8);
613   addKey("PREV", Previous_Key, 0x05, 8);
614   addKey("DISPLAY", Info_Key, 0x06, 8);
615   addKey("NEXT", Next_Key, 0x07, 8);
616   addKey("1", One_Key, 0x08, 8);
617   addKey("2", Two_Key, 0x09, 8);
618   addKey("3", Three_Key, 0x0A, 8);
619   addKey("ARROW_UP", Up_Key, 0x0B, 8);
620   addKey("FR_SR", Rewind_Key, 0x0C, 8);
621   addKey("SETUP", Menu_Key, 0x0D, 8);
622   addKey("TITLE", DiscTitle_Key, 0x0E, 8);
623   addKey("MENU", DiscMenu_Key, 0x0F, 8);
624
625   addKey("4", Four_Key, 0x10, 8);
626   addKey("5", Five_Key, 0x11, 8);
627   addKey("6", Six_Key, 0x12, 8);
628   addKey("SELECT", Select_Key, 0x13, 8);
629   addKey("DIGEST", Unmapped_Key, 0x14, 8);
630   addKey("ANGLE", Angle_Key, 0x15, 8);
631   addKey("SUBTITLE", Captions_Key, 0x16, 8);
632   addKey("AUDIO", Audio_Key, 0x17, 8);
633   addKey("7", Seven_Key, 0x18, 8);
634   addKey("8", Eight_Key, 0x19, 8);
635   addKey("9", Nine_Key, 0x1A, 8);
636   addKey("ARROW_RIGHT", Right_Key, 0x1B, 8);
637   addKey("PROGRAM", Program_Key, 0x1C, 8);
638   addKey("VOLUME_UP", VolumeUp_Key, 0x1D, 8);
639   addKey("ZOOM", Zoom_Key, 0x1E, 8);
640   addKey("3D_SOUND", Surround_Key, 0x1F, 8);
641
642   addKey("CLEAR", Clear_Key, 0x40, 8);
643   addKey("0", Zero_Key, 0x41, 8);
644   addKey("PCB", Unmapped_Key, 0x42, 8);
645   addKey("ARROW_DOWN", Down_Key, 0x43, 8);
646   addKey("SHUFFLE", Random_Key, 0x44, 8);
647   addKey("VOLUME_DOWN", VolumeDown_Key, 0x45, 8);
648   addKey("REPEAT", Repeat_Key, 0x46, 8);
649   addKey("A-B", RepeatAB_Key, 0x47, 8);
650   addKey("STOP/RETURN", Stop_Key, 0x48, 8);
651   addKey("STOP/RETURN", Exit_Key, 0x48, 8);
652   addKey("PLAY/PAUSE", Play_Key, 0x49, 8);
653   addKey("PLAY/PAUSE", Pause_Key, 0x49, 8);
654   addKey("MARKER", Unmapped_Key, 0x4A, 8);
655 }