Bugfixes and Keysets
[pierogi] / keysets / sony.cpp
index bab2747..1940c01 100644 (file)
@@ -1,38 +1,53 @@
 #include "sony.h"
-#include "sircprotocol.h"
+#include "protocols/sircprotocol.h"
 
 
 SonyTV1::SonyTV1(
-  QObject *guiObject,
   unsigned int index)
   : PIRKeysetMetaData(
       "TV Keyset 1",
       Sony_Make,
       index)
 {
-  addControlledDevice(Sony_Make, "Trinitron KV-2184MT", TV_Device);
   addControlledDevice(Sony_Make, "KV-M1420D", TV_Device);
   addControlledDevice(Sony_Make, "KV-20FV10", TV_Device);
+  addControlledDevice(Sony_Make, "KV-2167MT", TV_Device);
+  addControlledDevice(Sony_Make, "KV-2184MT", TV_Device);
   addControlledDevice(Sony_Make, "KV-27FX210", TV_Device);
   addControlledDevice(Sony_Make, "KV-32FS210", TV_Device);
   addControlledDevice(Sony_Make, "KV-36FS210", TV_Device);
   addControlledDevice(Sony_Make, "KV-36FS13", TV_Device);
+  addControlledDevice(Sony_Make, "KDL-23B4030", TV_Device);
+  addControlledDevice(Sony_Make, "KDL-40EX403", TV_Device);
+  addControlledDevice(Sony_Make, "KDL-40EX520", TV_Device);
+  addControlledDevice(Sony_Make, "KDL-40X2000", TV_Device);
   addControlledDevice(Sony_Make, "KDL-52X2000", TV_Device);
   addControlledDevice(Sony_Make, "KDL-46X2000", TV_Device);
-  addControlledDevice(Sony_Make, "KDL-40X2000", TV_Device);
+  addControlledDevice(Sony_Make, "KP-46WT520", TV_Device);
+}
+
+
+void SonyTV1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
 
   threadableProtocol = new SIRCProtocol(guiObject, index);
 
-  addSIRC12Key("1", One_Key, 0x01, 0x0);
-  addSIRC12Key("2", Two_Key, 0x01, 0x1);
-  addSIRC12Key("3", Three_Key, 0x01, 0x2);
-  addSIRC12Key("4", Four_Key, 0x01, 0x3);
-  addSIRC12Key("5", Five_Key, 0x01, 0x4);
-  addSIRC12Key("6", Six_Key, 0x01, 0x5);
-  addSIRC12Key("7", Seven_Key, 0x01, 0x6);
-  addSIRC12Key("8", Eight_Key, 0x01, 0x7);
-  addSIRC12Key("9", Nine_Key, 0x01, 0x8);
-  addSIRC12Key("0", Zero_Key, 0x01, 0x9);
+  addSIRC12Key("1", One_Key, 0x01, 0x00);
+  addSIRC12Key("2", Two_Key, 0x01, 0x01);
+  addSIRC12Key("3", Three_Key, 0x01, 0x02);
+  addSIRC12Key("4", Four_Key, 0x01, 0x03);
+  addSIRC12Key("5", Five_Key, 0x01, 0x04);
+  addSIRC12Key("6", Six_Key, 0x01, 0x05);
+  addSIRC12Key("7", Seven_Key, 0x01, 0x06);
+  addSIRC12Key("8", Eight_Key, 0x01, 0x07);
+  addSIRC12Key("9", Nine_Key, 0x01, 0x08);
+  addSIRC12Key("0", Zero_Key, 0x01, 0x09);
   addSIRC12Key("enter", Enter_Key, 0x01, 0x0B);
   addSIRC12Key("1-", Unmapped_Key, 0x01, 0x0C);
   addSIRC12Key("2-", Unmapped_Key, 0x01, 0x0D);
@@ -45,13 +60,13 @@ SonyTV1::SonyTV1(
   addSIRC12Key("POWER", Power_Key, 0x01, 0x15);
   addSIRC12Key("normalise", Reset_Key, 0x01, 0x16); // "reset"
   addSIRC12Key("a/b", Audio_Key, 0x01, 0x17); // "mts", "sap", "language"
-  addSIRC12Key("picture_up", Unmapped_Key, 0x01, 0x18); // "Contrast Up"
-  addSIRC12Key("picture_down", Unmapped_Key, 0x1, 0x19); // "Contrast Down"
+  addSIRC12Key("picture_up", ContrastUp_Key, 0x01, 0x18); // "Contrast Up"
+  addSIRC12Key("picture_down", ContrastDown_Key, 0x1, 0x19); // "Contrast Down"
   addSIRC12Key("-/--", DoubleDigit_Key, 0x01, 0x1D);
   addSIRC12Key("tv/video", Input_Key, 0x01, 0x25);
   addSIRC12Key("bucket", Unmapped_Key, 0x01, 0x28);
   addSIRC12Key("stereo", Surround_Key, 0x01, 0x29);
-  addSIRC12Key("ANT", Unmapped_Key, 0x01, 0x2A);
+  addSIRC12Key("ANT", AntennaInput_Key, 0x01, 0x2A);
   addSIRC12Key("time", Clock_Key, 0x01, 0x2B);
   addSIRC12Key("timer/block", Timer_Key, 0x01, 0x30);
   addSIRC12Key("right", Right_Key, 0x01, 0x33);
@@ -63,7 +78,8 @@ SonyTV1::SonyTV1(
   addSIRC12Key("off/repeat", Repeat_Key, 0x01, 0x3C);
   addSIRC12Key("TELETXT", Teletext_Key, 0x01, 0x3F);
   addSIRC12Key("favourite", Unmapped_Key, 0x01, 0x4A); // separate keyset?
-  addSIRC12Key("cable", Unmapped_Key, 0x01, 0x4E);
+  addSIRC12Key("cable", CableInput_Key, 0x01, 0x4E);
+  addSIRC12Key("Sat", SatInput_Key, 0x01, 0x51);
   addSIRC12Key("pip_ch+", PIPChannelUp_Key, 0x01, 0x58);
   addSIRC12Key("pip_ch-", PIPChannelDown_Key, 0x01, 0x59);
   addSIRC12Key("piptv_video", PIPSource_Key, 0x01, 0x5A);
@@ -71,8 +87,6 @@ SonyTV1::SonyTV1(
   addSIRC12Key("pipfreeze", PIPPause_Key, 0x01, 0x5C);
   addSIRC12Key("PIP_POSITION", PIPMove_Key, 0x01, 0x5E);
   addSIRC12Key("PIP_SWAP", PIPSwap_Key, 0x01, 0x5F);
-  addSIRC12Key("PIP_SOURCE", Unmapped_Key, 0x01, 0x67); // separate keyset?
-  addSIRC12Key("Sat", Unmapped_Key, 0x01, 0x51);
   addSIRC12Key("MENU", Menu_Key, 0x01, 0x60);
   addSIRC12Key("Settup_V", Unmapped_Key, 0x01, 0x61); // alternate pic mode
   addSIRC12Key("Settup_A", Unmapped_Key, 0x01, 0x62); // alternate sound mode
@@ -80,6 +94,7 @@ SonyTV1::SonyTV1(
   addSIRC12Key("picturemode", PictureMode_Key, 0x01, 0x64);
   addSIRC12Key("OK", Select_Key, 0x01, 0x65); // "return", "select", "enter"
   addSIRC12Key("output", Unmapped_Key, 0x01, 0x66);
+  addSIRC12Key("PIP_SOURCE", Unmapped_Key, 0x01, 0x67); // separate keyset?
   addSIRC12Key("asterisk", Unmapped_Key, 0x01, 0x68); // "TV System"
   addSIRC12Key("auto_program", Unmapped_Key, 0x01, 0x6B);
   addSIRC12Key("setup", Program_Key, 0x01, 0x6C);
@@ -132,13 +147,25 @@ SonyTV1::SonyTV1(
 
 
 SonyTV1a::SonyTV1a(
-  QObject *guiObject,
   unsigned int index)
-  : SonyTV1(guiObject, index)
+  : SonyTV1(index)
 {
   setKeysetName("TV Keyset 1a");
 
-  addControlledDevice(Sony_Make, "Trinitron KDW-25", TV_Device);
+  addControlledDevice(Sony_Make, "KDW-25", TV_Device);
+}
+
+
+void SonyTV1a::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
+  SonyTV1::populateProtocol(guiObject);
 
   addSIRC12Key("LEFT/-/RED", Left_Key, 0x03, 0x4C);
   addSIRC12Key("UP/GREEN", Up_Key, 0x03, 0x4D);
@@ -148,11 +175,23 @@ SonyTV1a::SonyTV1a(
 
 
 SonyTV1b::SonyTV1b(
-  QObject *guiObject,
   unsigned int index)
-  : SonyTV1a(guiObject, index)
+  : SonyTV1a(index)
 {
   setKeysetName("TV Keyset 1b");
+}
+
+
+void SonyTV1b::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
+  SonyTV1a::populateProtocol(guiObject);
 
   addSIRC12Key("clear", Unmapped_Key, 0x01, 0x34); // "Clock Clear"
   addSIRC12Key("level_plus", Unmapped_Key, 0x01, 0x74);
@@ -163,11 +202,23 @@ SonyTV1b::SonyTV1b(
 
 // Not sure about these codes:
 SonyTV1c::SonyTV1c(
-  QObject *guiObject,
   unsigned int index)
-  : SonyTV1(guiObject, index)
+  : SonyTV1(index)
 {
   setKeysetName("TV Keyset 1c");
+}
+
+
+void SonyTV1c::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
+  SonyTV1::populateProtocol(guiObject);
 
   addSIRC12Key(">>", FastForward_Key, 0x01, 0x58);
   addSIRC12Key("<<", Rewind_Key, 0x01, 0x59);
@@ -187,13 +238,24 @@ SonyTV1c::SonyTV1c(
 // These controls don't quite match other SIRC data.  (some do, some don't)
 // This all taken from LIRC "AMPIR" config file.
 SonyAmp1::SonyAmp1(
-  QObject *guiObject,
   unsigned int index)
   : PIRKeysetMetaData(
       "Amp Keyset 1",
       Sony_Make,
       index)
 {
+}
+
+
+void SonyAmp1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
   threadableProtocol = new SIRCProtocol(guiObject, index);
 
   addSIRC12Key("1", One_Key, 0x0C, 0x00);
@@ -214,32 +276,43 @@ SonyAmp1::SonyAmp1(
   addSIRC12Key("VOL-", VolumeDown_Key, 0x0C, 0x13);
   addSIRC12Key("MUTE", Mute_Key, 0x0C, 0x14);
   addSIRC12Key("POWER", Power_Key, 0x0C, 0x15);
-  addSIRC12Key("LD", Unmapped_Key, 0x0C, 0x19);
-  addSIRC12Key("TV", Unmapped_Key, 0x0C, 0x18);
+  addSIRC12Key("LD", LDInput_Key, 0x0C, 0x19);
+  addSIRC12Key("TV", CableInput_Key, 0x0C, 0x18);
   addSIRC12Key("VIDEO2", Unmapped_Key, 0x0C, 0x1E);
-  addSIRC12Key("PHONO", Unmapped_Key, 0x0C, 0x20);
-  addSIRC12Key("TUNER", Unmapped_Key, 0x0C, 0x21);
+  addSIRC12Key("PHONO", PhonoInput_Key, 0x0C, 0x20);
+  addSIRC12Key("TUNER", TunerInput_Key, 0x0C, 0x21);
   addSIRC12Key("VIDEO1", Unmapped_Key, 0x0C, 0x22);
-  addSIRC12Key("TAPE", Unmapped_Key, 0x0C, 0x23);
-  addSIRC12Key("CD", Unmapped_Key, 0x0C, 0x25);
+  addSIRC12Key("TAPE", TapeInput_Key, 0x0C, 0x23);
+  addSIRC12Key("CD", CDInput_Key, 0x0C, 0x25);
   addSIRC12Key("DAT", Unmapped_Key, 0x0C, 0x46);
   addSIRC12Key("SLEEP", Sleep_Key, 0x0C, 0x60);
-  addSIRC12Key("MD", Unmapped_Key, 0x0C, 0x69);
+  addSIRC12Key("MD", MDInput_Key, 0x0C, 0x69);
   addSIRC12Key("TV2", Unmapped_Key, 0x0C, 0x6A);
   addSIRC12Key("5.1CH", Unmapped_Key, 0x0C, 0x72);
-  addSIRC12Key("DVD", Unmapped_Key, 0x0C, 0x7D);
+  addSIRC12Key("DVD", DVDInput_Key, 0x0C, 0x7D);
 }
 
 
 // These taken from LIRC config file "RM-AV2100T".
 SonyAmp2::SonyAmp2(
-  QObject *guiObject,
   unsigned int index)
   : PIRKeysetMetaData(
       "Amp Keyset 2",
       Sony_Make,
       index)
 {
+}
+
+
+void SonyAmp2::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
   threadableProtocol = new SIRCProtocol(guiObject, index);
 
   addSIRC12Key("up", Up_Key, 0x0C, 0x78);
@@ -266,30 +339,41 @@ SonyAmp2::SonyAmp2(
   addSIRC12Key("vol_-", VolumeDown_Key, 0x10, 0x13);
   addSIRC12Key("mute", Mute_Key, 0x10, 0x14);
   addSIRC12Key("power", Power_Key, 0x10, 0x15);
-  addSIRC12Key("aux/vdp", Unmapped_Key, 0x10, 0x1D);
+  addSIRC12Key("aux/vdp", AuxInput_Key, 0x10, 0x1D);
   addSIRC12Key("video2", Unmapped_Key, 0x10, 0x1E);
-  addSIRC12Key("phono", Unmapped_Key, 0x10, 0x20);
-  addSIRC12Key("tuner", Unmapped_Key, 0x10, 0x21);
+  addSIRC12Key("phono", PhonoInput_Key, 0x10, 0x20);
+  addSIRC12Key("tuner", TunerInput_Key, 0x10, 0x21);
   addSIRC12Key("video1", Unmapped_Key, 0x10, 0x22);
-  addSIRC12Key("tape", Unmapped_Key, 0x10, 0x23);
-  addSIRC12Key("cd", Unmapped_Key, 0x10, 0x25);
+  addSIRC12Key("tape", TapeInput_Key, 0x10, 0x23);
+  addSIRC12Key("cd", CDInput_Key, 0x10, 0x25);
   addSIRC12Key("power_on", PowerOn_Key, 0x10, 0x2E);
   addSIRC12Key("video3", Unmapped_Key, 0x10, 0x42);
-  addSIRC12Key("tv", Unmapped_Key, 0x10, 0x6A);
-  addSIRC12Key("dvd", Unmapped_Key, 0x10, 0x7D);
+  addSIRC12Key("tv", CableInput_Key, 0x10, 0x6A);
+  addSIRC12Key("dvd", DVDInput_Key, 0x10, 0x7D);
 
-  addSIRC15Key("md/dat", Unmapped_Key, 0x10, 0x69);
+  addSIRC15Key("md/dat", MDInput_Key, 0x10, 0x69);
 }
 
 
 SonyAudio1::SonyAudio1(
-  QObject *guiObject,
   unsigned int index)
   : PIRKeysetMetaData(
       "Audio Keyset 1",
       Sony_Make,
       index)
 {
+}
+
+
+void SonyAudio1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
   threadableProtocol = new SIRCProtocol(guiObject, index);
 
   addSIRC12Key("tv_video", Input_Key, 0x01, 0x25);
@@ -297,20 +381,20 @@ SonyAudio1::SonyAudio1(
   addSIRC12Key("DSG", Unmapped_Key, 0x0C, 0x31);
 
   addSIRC12Key("MEMORY", Program_Key, 0x0D, 0x0E);
-  addSIRC12Key("TUNER-BAND", TunerBand_Key, 0x0D, 0x0F);
+  addSIRC12Key("TUNER-BAND", TunerInput_Key, 0x0D, 0x0F);
   addSIRC12Key("TUNING_MODE", Unmapped_Key, 0x0D, 0x17);
-  addSIRC12Key("STEREO-MONO", Audio_Key, 0x0D, 0x21);
+  addSIRC12Key("STEREO-MONO", FMMode_Key, 0x0D, 0x21);
 
   addSIRC12Key("DIR_MODE", Unmapped_Key, 0x0E, 0x14);
   addSIRC12Key("REC", Record_Key, 0x0E, 0x1E);
-  addSIRC12Key("TAPE", Unmapped_Key, 0x0E, 0x34);
+  addSIRC12Key("TAPE", TapeInput_Key, 0x0E, 0x34);
 
-  addSIRC12Key("tuner", Unmapped_Key, 0x10, 0x0F); // "Tune Up"
+  addSIRC12Key("tuner", ChannelUp_Key, 0x10, 0x0F); // "Tune Up"
   addSIRC12Key("VOL+", VolumeUp_Key, 0x10, 0x12);
   addSIRC12Key("VOL-", VolumeDown_Key, 0x10, 0x13);
   addSIRC12Key("ON-OFF", Power_Key, 0x10, 0x15);
   addSIRC12Key("effect_on_off", Unmapped_Key, 0x10, 0x1F);
-  addSIRC12Key("cd", Unmapped_Key, 0x10, 0x25);
+  addSIRC12Key("cd", CDInput_Key, 0x10, 0x25);
   addSIRC12Key("DISPLAY", Info_Key, 0x10, 0x4B);
   addSIRC12Key("dimmer", Unmapped_Key, 0x10, 0x4D);
   addSIRC12Key("karaoke_mpx", Unmapped_Key, 0x10, 0x5F);
@@ -363,7 +447,7 @@ SonyAudio1::SonyAudio1(
   addSIRC20Key("KEY_NEXT", FastForward_Key, 0x39, 0x1A, 0x34); // "Fast Forward"
   addSIRC20Key("KEY_STOP", Stop_Key, 0x39, 0x1A, 0x38);
   addSIRC20Key("KEY_PAUSE", Pause_Key, 0x39, 0x1A, 0x39);
-  addSIRC20Key("d_skip", DiscSelect_Key, 0x39, 0x1A, 0x3E);
+  addSIRC20Key("d_skip", NextDisc_Key, 0x39, 0x1A, 0x3E);
   addSIRC20Key("up", Up_Key, 0x39, 0x1A, 0x78);
   addSIRC20Key("down", Down_Key, 0x39, 0x1A, 0x79);
   addSIRC20Key("left", Left_Key, 0x39, 0x1A, 0x7A);
@@ -373,13 +457,25 @@ SonyAudio1::SonyAudio1(
 
 
 SonyAudio1a::SonyAudio1a(
-  QObject *guiObject,
   unsigned int index)
-  : SonyAudio1(guiObject, index)
+  : SonyAudio1(index)
 {
   setKeysetName("Audio Keyset 1a");
+}
 
-  addSIRC12Key("tape", Unmapped_Key, 0x10, 0x23);
+
+void SonyAudio1a::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
+  SonyAudio1::populateProtocol(guiObject);
+
+  addSIRC12Key("tape", TapeInput_Key, 0x10, 0x23);
 
 //  addSIRC20Key("select", Select_Key, 0x39, 0x1A, 0x32); // Doesn't make sense
   addSIRC20Key("play", Play_Key, 0x39, 0x1A, 0x32);
@@ -389,13 +485,24 @@ SonyAudio1a::SonyAudio1a(
 
 
 SonyDAT1::SonyDAT1(
-  QObject *guiObject,
   unsigned int index)
   : PIRKeysetMetaData(
       "DAT Keyset 1",
       Sony_Make,
       index)
 {
+}
+
+
+void SonyDAT1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
   threadableProtocol = new SIRCProtocol(guiObject, index);
 
   setPostData(0x07, 5);
@@ -432,13 +539,26 @@ SonyDAT1::SonyDAT1(
 
 
 SonyDVD1::SonyDVD1(
-  QObject *guiObject,
   unsigned int index)
   : PIRKeysetMetaData(
       "DVD Keyset 1",
       Sony_Make,
       index)
 {
+  addControlledDevice(Sony_Make, "DVP-CX985V", DVD_Device);
+  addControlledDevice(Sony_Make, "DVP-NS608P", DVD_Device);
+}
+
+
+void SonyDVD1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
   threadableProtocol = new SIRCProtocol(guiObject, index);
 
   addSIRC20Key("1", One_Key, 0x49, 0x1A, 0x00);
@@ -467,6 +587,10 @@ SonyDVD1::SonyDVD1(
   addSIRC20Key("top_menu", DiscTitle_Key, 0x49, 0x1A, 0x1A); // "Title"
   addSIRC20Key("dvd_menu", DiscMenu_Key, 0x49, 0x1A, 0x1B);
   addSIRC20Key("program", Program_Key, 0x49, 0x1A, 0x1F);
+  addSIRC20Key("step/search -", StepBack_Key, 0x49, 0x1A, 0x20);
+  addSIRC20Key("step/search +", StepForward_Key, 0x49, 0x1A, 0x21);
+  addSIRC20Key("scan/slow -", SlowMinus_Key, 0x49, 0x1A, 0x22);
+  addSIRC20Key("scan/slow +", SlowPlus_Key, 0x49, 0x1A, 0x23);
   addSIRC20Key("INDEX-", Unmapped_Key, 0x49, 0x1A, 0x26);
   addSIRC20Key("INDEX+", Unmapped_Key, 0x49, 0x1A, 0x27);
   addSIRC20Key("TIME", Unmapped_Key, 0x49, 0x1A, 0x28);
@@ -486,12 +610,12 @@ SonyDVD1::SonyDVD1(
   addSIRC20Key("X2_FORWARD", Unmapped_Key, 0x49, 0x1A, 0x37);
   addSIRC20Key("stop", Stop_Key, 0x49, 0x1A, 0x38);
   addSIRC20Key("pause", Pause_Key, 0x49, 0x1A, 0x39);
-  addSIRC20Key("STEP_BACK", StepBack_Key, 0x49, 0x1A, 0x3A); // "Jog Rev"
-  addSIRC20Key("STEP_FORWARD", StepForward_Key, 0x49, 0x1A, 0x3B); // "Jog Fwd"
+  addSIRC20Key("STEP_BACK", Unmapped_Key, 0x49, 0x1A, 0x3A); // "Jog Rev"
+  addSIRC20Key("STEP_FORWARD", Unmapped_Key, 0x49, 0x1A, 0x3B); // "Jog Fwd"
   addSIRC20Key("RecStop", RecordStop_Key, 0x49, 0x1A, 0x3D);
   addSIRC20Key("RecPause", RecordPause_Key, 0x49, 0x1A, 0x3E);
 
-  addSIRC20Key("DNR", Unmapped_Key, 0x49, 0x1A, 0x48);
+  addSIRC20Key("DNR", NoiseReduction_Key, 0x49, 0x1A, 0x48);
   addSIRC20Key("SEARCH_MODE", Unmapped_Key, 0x49, 0x1A, 0x4B);
   addSIRC20Key("Picture_Navi", Unmapped_Key, 0x49, 0x1A, 0x50);
   addSIRC20Key("TV_DVD", Unmapped_Key, 0x49, 0x1A, 0x51);
@@ -518,11 +642,17 @@ SonyDVD1::SonyDVD1(
   addSIRC20Key("Guide", Guide_Key, 0x62, 0x1A, 0x16);
   addSIRC20Key("Options", Unmapped_Key, 0x62, 0x1A, 0x17); // "Tools"
   addSIRC20Key("Dot", Unmapped_Key, 0x62, 0x1A, 0x1D);
+  addSIRC20Key("file", Unmapped_Key, 0x62, 0x1A, 0x20);
+  addSIRC20Key("sort", Unmapped_Key, 0x62, 0x1A, 0x21);
+  addSIRC20Key("edit", Unmapped_Key, 0x62, 0x1A, 0x22);
   addSIRC20Key("ALBUM-MINUS", Unmapped_Key, 0x62, 0x1A, 0x29);
   addSIRC20Key("ALBUM-PLUS", Unmapped_Key, 0x62, 0x1A, 0x2A);
   addSIRC20Key("F1", Unmapped_Key, 0x62, 0x1A, 0x2E); // "HDD"
   addSIRC20Key("F2", Unmapped_Key, 0x62, 0x1A, 0x2F); // "DVD"
-  addSIRC20Key("DiscSkip", DiscSelect_Key, 0x62, 0x1A, 0x3E);
+  addSIRC20Key("picture memory", Unmapped_Key, 0x62, 0x1A, 0x3C);
+  addSIRC20Key("disc skip -", PrevDisc_Key, 0x62, 0x1A, 0x3D);
+  addSIRC20Key("DiscSkip", NextDisc_Key, 0x62, 0x1A, 0x3E); // "disc skip +"
+  addSIRC20Key("folder", Unmapped_Key, 0x62, 0x1A, 0x40);
   addSIRC20Key("Favorites", Favorites_Key, 0x62, 0x1A, 0x5E);
   addSIRC20Key("Purple", Blue_Key, 0x62, 0x1A, 0x66);
   addSIRC20Key("Red", Red_Key, 0x62, 0x1A, 0x67);
@@ -533,11 +663,23 @@ SonyDVD1::SonyDVD1(
 
 
 SonyDVD1a::SonyDVD1a(
-  QObject *guiObject,
   unsigned int index)
-  : SonyDVD1(guiObject, index)
+  : SonyDVD1(index)
 {
   setKeysetName("DVD Keyset 1a");
+}
+
+
+void SonyDVD1a::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
+  SonyDVD1::populateProtocol(guiObject);
 
   addSIRC20Key("STEP_BACK", StepBack_Key, 0x49, 0x1A, 0x20);
   addSIRC20Key("STEP_FORWARD", StepForward_Key, 0x49, 0x1A, 0x21);
@@ -547,11 +689,23 @@ SonyDVD1a::SonyDVD1a(
 
 
 SonyDVD1b::SonyDVD1b(
-  QObject *guiObject,
   unsigned int index)
-  : SonyDVD1(guiObject, index)
+  : SonyDVD1(index)
 {
   setKeysetName("DVD Keyset 1b");
+}
+
+
+void SonyDVD1b::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
+  SonyDVD1::populateProtocol(guiObject);
 
   addSIRC20Key("SLOW-", SlowMinus_Key, 0x49, 0x1A, 0x72);
   addSIRC20Key("SLOW+", SlowPlus_Key, 0x49, 0x1A, 0x73);
@@ -559,11 +713,23 @@ SonyDVD1b::SonyDVD1b(
 
 
 SonyDVD1c::SonyDVD1c(
-  QObject *guiObject,
   unsigned int index)
-  : SonyDVD1(guiObject, index)
+  : SonyDVD1(index)
 {
   setKeysetName("DVD Keyset 1c");
+}
+
+
+void SonyDVD1c::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
+  SonyDVD1::populateProtocol(guiObject);
 
   addSIRC20Key("up", Up_Key, 0x49, 0x1A, 0x39);
   addSIRC20Key("down", Down_Key, 0x49, 0x1A, 0x38);
@@ -574,14 +740,143 @@ SonyDVD1c::SonyDVD1c(
 }
 
 
+SonyDVD2::SonyDVD2(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "DVD Keyset 2",
+      Sony_Make,
+      index)
+{
+  addControlledDevice(Sony_Make, "RDR-GX360", DVD_Device);
+}
+
+
+void SonyDVD2::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new SIRCProtocol(guiObject, index);
+
+  addSIRC20Key("Title List", Unmapped_Key, 0x0B, 0x1A, 0x10);
+  addSIRC20Key("Original playlist", Unmapped_Key, 0x0B, 0x1A, 0x11);
+  addSIRC20Key("Thumbnail", Unmapped_Key, 0x0B, 0x1A, 0x12);
+  addSIRC20Key("Chapter Mark", Unmapped_Key, 0x0B, 0x1A, 0x13);
+  addSIRC20Key("Instant Advance", Advance_Key, 0x0B, 0x1A, 0x14);
+  addSIRC20Key("Tools", Unmapped_Key, 0x0B, 0x1A, 0x17);
+  addSIRC20Key("Cursor Mode", Unmapped_Key, 0x0B, 0x1A, 0x18);
+  addSIRC20Key("Zoom -", Unmapped_Key, 0x0B, 0x1A, 0x19);
+  addSIRC20Key("Mark Erase", Unmapped_Key, 0x0B, 0x1A, 0x1A);
+  addSIRC20Key("Timer", Timer_Key, 0x0B, 0x1A, 0x1C);
+  addSIRC20Key("Timer List", Unmapped_Key, 0x0B, 0x1A, 0x37);
+  addSIRC20Key("Synchro Rec", Unmapped_Key, 0x0B, 0x1A, 0x77);
+  addSIRC20Key("Zoom", Zoom_Key, 0x0B, 0x1A, 0x79); // "Zoom +"
+
+  addSIRC20Key("1", One_Key, 0xFA, 0x1A, 0x00);
+  addSIRC20Key("2", Two_Key, 0xFA, 0x1A, 0x01);
+  addSIRC20Key("3", Three_Key, 0xFA, 0x1A, 0x02);
+  addSIRC20Key("4", Four_Key, 0xFA, 0x1A, 0x03);
+  addSIRC20Key("5", Five_Key, 0xFA, 0x1A, 0x04);
+  addSIRC20Key("6", Six_Key, 0xFA, 0x1A, 0x05);
+  addSIRC20Key("7", Seven_Key, 0xFA, 0x1A, 0x06);
+  addSIRC20Key("8", Eight_Key, 0xFA, 0x1A, 0x07);
+  addSIRC20Key("9", Nine_Key, 0xFA, 0x1A, 0x08);
+  addSIRC20Key("0", Zero_Key, 0xFA, 0x1A, 0x09);
+  addSIRC20Key("Select", Select_Key, 0xFA, 0x1A, 0x0B);
+  addSIRC20Key("Set", Unmapped_Key, 0xFA, 0x1A, 0x0D);
+  addSIRC20Key("Return", Exit_Key, 0xFA, 0x1A, 0x0E);
+  addSIRC20Key("Clear", Clear_Key, 0xFA, 0x1A, 0x0F);
+  addSIRC20Key("Input Select", Input_Key, 0xFA, 0x1A, 0x12);
+  addSIRC20Key("Channel +", ChannelUp_Key, 0xFA, 0x1A, 0x13);
+  addSIRC20Key("Channel -", ChannelDown_Key, 0xFA, 0x1A, 0x14);
+  addSIRC20Key("Power", Power_Key, 0xFA, 0x1A, 0x15);
+  addSIRC20Key("Eject", Eject_Key, 0xFA, 0x1A, 0x16);
+  addSIRC20Key("Record", Record_Key, 0xFA, 0x1A, 0x19);
+  addSIRC20Key("Top Menu", DiscTitle_Key, 0xFA, 0x1A, 0x1A);
+  addSIRC20Key("menu", DiscMenu_Key, 0xFA, 0x1A, 0x1B);
+  addSIRC20Key("Rec Mode", Unmapped_Key, 0xFA, 0x1A, 0x1E);
+  addSIRC20Key("Step Reverse", StepBack_Key, 0xFA, 0x1A, 0x20);
+  addSIRC20Key("Step Fwd", StepForward_Key, 0xFA, 0x1A, 0x21);
+  addSIRC20Key("Slow Forward", SlowPlus_Key, 0xFA, 0x1A, 0x23);
+  addSIRC20Key("Time/Text", Unmapped_Key, 0xFA, 0x1A, 0x28);
+  addSIRC20Key("Power On", PowerOn_Key, 0xFA, 0x1A, 0x2E);
+  addSIRC20Key("Power Off", PowerOff_Key, 0xFA, 0x1A, 0x2F);
+  addSIRC20Key("Track - (prev)", Previous_Key, 0xFA, 0x1A, 0x30);
+  addSIRC20Key("Track + (next)", Next_Key, 0xFA, 0x1A, 0x31);
+  addSIRC20Key("Play", Play_Key, 0xFA, 0x1A, 0x32);
+  addSIRC20Key("rewind", Rewind_Key, 0xFA, 0x1A, 0x33);
+  addSIRC20Key("Fast Forward", FastForward_Key, 0xFA, 0x1A, 0x34);
+  addSIRC20Key("stop", Stop_Key, 0xFA, 0x1A, 0x38);
+  addSIRC20Key("Pause", Pause_Key, 0xFA, 0x1A, 0x39);
+  addSIRC20Key("Record Stop", RecordStop_Key, 0xFA, 0x1A, 0x3D);
+  addSIRC20Key("Record Pause", RecordPause_Key, 0xFA, 0x1A, 0x3E);
+  addSIRC20Key("System Menu", Menu_Key, 0xFA, 0x1A, 0x53);
+  addSIRC20Key("Display", Info_Key, 0xFA, 0x1A, 0x54);
+  addSIRC20Key("Surround", Surround_Key, 0xFA, 0x1A, 0x5A);
+  addSIRC20Key("Instant Replay", Replay_Key, 0xFA, 0x1A, 0x5C);
+  addSIRC20Key("Subtitle", Captions_Key, 0xFA, 0x1A, 0x63);
+  addSIRC20Key("Audio", Audio_Key, 0xFA, 0x1A, 0x64);
+  addSIRC20Key("angle", Angle_Key, 0xFA, 0x1A, 0x65);
+  addSIRC20Key("Up", Up_Key, 0xFA, 0x1A, 0x79);
+  addSIRC20Key("Down", Down_Key, 0xFA, 0x1A, 0x7A);
+  addSIRC20Key("Left", Left_Key, 0xFA, 0x1A, 0x7B);
+  addSIRC20Key("Right", Right_Key, 0xFA, 0x1A, 0x7C);
+}
+
+
+SonyDVD2a::SonyDVD2a(
+  unsigned int index)
+  : SonyDVD2(index)
+{
+  setKeysetName("DVD Keyset 2a");
+
+  addControlledDevice(Sony_Make, "RDR-GX257", DVD_Device);
+}
+
+
+void SonyDVD2a::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  SonyDVD2::populateProtocol(guiObject);
+
+  addSIRC20Key("top menu / title List", DiscTitle_Key, 0x0B, 0x1A, 0x10);
+  addSIRC20Key("marker", Unmapped_Key, 0x0B, 0x1A, 0x34);
+  addSIRC20Key("search", Unmapped_Key, 0x0B, 0x1A, 0x35);
+
+  addSIRC20Key("discrete off", PowerOff_Key, 0xFA, 0x1A, 0x29);
+  addSIRC20Key("play mode", Unmapped_Key, 0xFA, 0x1A, 0x31);
+}
+
+
 SonyVCR1::SonyVCR1(
-  QObject *guiObject,
   unsigned int index)
   : PIRKeysetMetaData(
       "VCR Keyset 1",
       Sony_Make,
       index)
 {
+}
+
+
+void SonyVCR1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
   threadableProtocol = new SIRCProtocol(guiObject, index);
 
   addSIRC12Key("VOL_UP", VolumeUp_Key, 0x01, 0x12);
@@ -615,7 +910,7 @@ SonyVCR1::SonyVCR1(
   addSIRC12Key("<<", Rewind_Key, 0x0B, 0x1B);
   addSIRC12Key(">>", FastForward_Key, 0x0B, 0x1C);
   addSIRC12Key("rec", Record_Key, 0x0B, 0x1D);
-  addSIRC12Key("ant/sw", Unmapped_Key, 0x0B, 0x2A);  // "tv/vcr"
+  addSIRC12Key("ant/sw", AntennaInput_Key, 0x0B, 0x2A);  // "tv/vcr"
   addSIRC12Key("power_on", PowerOn_Key, 0x0B, 0x2E);
   addSIRC12Key("Power Off", PowerOff_Key, 0x0B, 0x2F);
   addSIRC12Key("menu", Menu_Key, 0x0B, 0x4D);
@@ -632,11 +927,23 @@ SonyVCR1::SonyVCR1(
 
 
 SonyVCR1a::SonyVCR1a(
-  QObject *guiObject,
   unsigned int index)
-  : SonyVCR1(guiObject, index)
+  : SonyVCR1(index)
 {
   setKeysetName("VCR Keyset 1a");
+}
+
+
+void SonyVCR1a::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
+  SonyVCR1::populateProtocol(guiObject);
 
   // These are the expected cursor keys:
   addSIRC12Key("up", Up_Key, 0x0B, 0x42);
@@ -651,11 +958,23 @@ SonyVCR1a::SonyVCR1a(
 
 // Extra codes off of hifi-remote website:
 SonyVCR1b::SonyVCR1b(
-  QObject *guiObject,
   unsigned int index)
-  : SonyVCR1a(guiObject, index)
+  : SonyVCR1a(index)
 {
   setKeysetName("VCR Keyset 1b");
+}
+
+
+void SonyVCR1b::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
+  SonyVCR1a::populateProtocol(guiObject);
 
   addSIRC12Key("Volume Up", VolumeUp_Key, 0x0B, 0x12);
   addSIRC12Key("Volume Down", VolumeDown_Key, 0x0B, 0x13);
@@ -676,13 +995,24 @@ SonyVCR1b::SonyVCR1b(
 
 
 SonyReceiver1::SonyReceiver1(
-  QObject *guiObject,
   unsigned int index)
   : PIRKeysetMetaData(
       "Receiver Keyset 1",
       Sony_Make,
       index)
 {
+}
+
+
+void SonyReceiver1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
   threadableProtocol = new SIRCProtocol(guiObject, index);
 
   addSIRC15Key("1", One_Key, 0x30, 0x00);
@@ -701,16 +1031,16 @@ SonyReceiver1::SonyReceiver1(
   addSIRC15Key("MUTING", Mute_Key, 0x30, 0x14);
   addSIRC15Key("POWER", Power_Key, 0x30, 0x15);
   addSIRC15Key("VIDEO2", Unmapped_Key, 0x30, 0x1E);
-  addSIRC15Key("TUNER", Unmapped_Key, 0x30, 0x21);
+  addSIRC15Key("TUNER", TunerInput_Key, 0x30, 0x21);
   addSIRC15Key("VIDEO1", Unmapped_Key, 0x30, 0x22);
   addSIRC15Key("SA_CD", Unmapped_Key, 0x30, 0x25);
   addSIRC15Key("VIDEO3", Unmapped_Key, 0x30, 0x42);
   addSIRC15Key("DISPLAY", Info_Key, 0x30, 0x4B);
   addSIRC15Key("SLEEP", Sleep_Key, 0x30, 0x60);
   addSIRC15Key("TV", Unmapped_Key, 0x30, 0x6A);
-  addSIRC15Key("DVD", Unmapped_Key, 0x30, 0x7D);
+  addSIRC15Key("DVD", DVDInput_Key, 0x30, 0x7D);
 
-  addSIRC15Key("SAT", Unmapped_Key, 0xB0, 0x03);
+  addSIRC15Key("SAT", SatInput_Key, 0xB0, 0x03);
   addSIRC15Key("2CH", Unmapped_Key, 0xB0, 0x09);
   addSIRC15Key("AFD", Unmapped_Key, 0xB0, 0x0A);
   addSIRC15Key("MOVIE", Unmapped_Key, 0xB0, 0x0B);
@@ -722,3 +1052,285 @@ SonyReceiver1::SonyReceiver1(
   addSIRC15Key("LEFT", Left_Key, 0xB0, 0x7A);
   addSIRC15Key("RIGHT", Right_Key, 0xB0, 0x7B);
 }
+
+
+SonyCD1::SonyCD1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "CD Keyset 1",
+      Sony_Make,
+      index)
+{
+}
+
+
+void SonyCD1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new SIRCProtocol(guiObject, index);
+
+  addSIRC12Key("1", One_Key, 0x11, 0x00);
+  addSIRC12Key("2", Two_Key, 0x11, 0x01);
+  addSIRC12Key("3", Three_Key, 0x11, 0x02);
+  addSIRC12Key("4", Four_Key, 0x11, 0x03);
+  addSIRC12Key("5", Five_Key, 0x11, 0x04);
+  addSIRC12Key("6", Six_Key, 0x11, 0x05);
+  addSIRC12Key("7", Seven_Key, 0x11, 0x06);
+  addSIRC12Key("8", Eight_Key, 0x11, 0x07);
+  addSIRC12Key("9", Nine_Key, 0x11, 0x08);
+  addSIRC12Key("ENTER", Enter_Key, 0x11, 0x0B);
+  addSIRC12Key("check", Unmapped_Key, 0x11, 0x0D);
+  addSIRC12Key("clear", Clear_Key, 0x11, 0x0F);
+
+  addSIRC12Key("vol+", VolumeUp_Key, 0x11, 0x12);
+  addSIRC12Key("vol-", VolumeDown_Key, 0x11, 0x13);
+  addSIRC12Key("mute", Mute_Key, 0x11, 0x14);
+  addSIRC12Key("power", Power_Key, 0x11, 0x15);
+  addSIRC12Key("eject", Eject_Key, 0x11, 0x16);
+  addSIRC12Key("C.INDEX", Unmapped_Key, 0x11, 0x18);
+  addSIRC12Key("FILE", Memory_Key, 0x11, 0x19);
+  addSIRC12Key("BANK", Call_Key, 0x11, 0x1A); // "file recall"
+  addSIRC12Key("continue", Unmapped_Key, 0x11, 0x1D);
+  addSIRC12Key("single", Unmapped_Key, 0x11, 0x1E);
+  addSIRC12Key("pgm", Program_Key, 0x11, 0x1F);
+
+  addSIRC12Key("10", Zero_Key, 0x11, 0x20); // "0"
+  addSIRC12Key(">10", DoubleDigit_Key, 0x11, 0x27);
+  addSIRC12Key("DISPLAY", Info_Key, 0x11, 0x28); // "time"
+  addSIRC12Key("a-b", RepeatAB_Key, 0x11, 0x2A);
+  addSIRC12Key("repeat", Repeat_Key, 0x11, 0x2C);
+  addSIRC12Key("POWER_ON", PowerOn_Key, 0x11, 0x2E);
+  addSIRC12Key("POWER_OFF", PowerOff_Key, 0x11, 0x2F);
+
+  addSIRC12Key("|<<", Previous_Key, 0x11, 0x30);
+  addSIRC12Key(">>|", Next_Key, 0x11, 0x31);
+  addSIRC12Key("play", Play_Key, 0x11, 0x32);
+  addSIRC12Key("<<", Rewind_Key, 0x11, 0x33);
+  addSIRC12Key(">>", FastForward_Key, 0x11, 0x34);
+  addSIRC12Key("shuffle", Random_Key, 0x11, 0x35);
+  addSIRC12Key("cd_ind_dec", Unmapped_Key, 0x11, 0x36);
+  addSIRC12Key("cd_ind_inc", Unmapped_Key, 0x11, 0x37);
+  addSIRC12Key("stop", Stop_Key, 0x11, 0x38);
+  addSIRC12Key("PAUSE", Pause_Key, 0x11, 0x39);
+  addSIRC12Key("SLOW--", SlowMinus_Key, 0x11, 0x3A);
+  addSIRC12Key("SLOW++", SlowPlus_Key, 0x11, 0x3B);
+  addSIRC12Key("musicscan", Unmapped_Key, 0x11, 0x3C); // "intro"
+  addSIRC12Key("prevDisc", PrevDisc_Key, 0x11, 0x3D);
+  addSIRC12Key("disc_skip", NextDisc_Key, 0x11, 0x3E);
+
+  addSIRC12Key("disc_1", Unmapped_Key, 0x11, 0x40);
+  addSIRC12Key("disc_2", Unmapped_Key, 0x11, 0x41);
+  addSIRC12Key("disc_3", Unmapped_Key, 0x11, 0x42);
+  addSIRC12Key("disc_4", Unmapped_Key, 0x11, 0x43);
+  addSIRC12Key("disc_5", Unmapped_Key, 0x11, 0x44);
+  addSIRC12Key("DISC", Unmapped_Key, 0x11, 0x4A);
+  addSIRC12Key("AUTO_SPACE", Unmapped_Key, 0x11, 0x4E);
+
+  addSIRC12Key("fader", Unmapped_Key, 0x11, 0x5F); // "mute"
+
+  addSIRC12Key("LEVEL_FILE", Unmapped_Key, 0x11, 0x68);
+}
+
+
+SonyCD1a::SonyCD1a(
+  unsigned int index)
+  : SonyCD1(index)
+{
+  setKeysetName("CD Keyset 1a");
+}
+
+
+void SonyCD1a::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  SonyCD1::populateProtocol(guiObject);
+
+  addSIRC12Key("a-b", RepeatAB_Key, 0x11, 0x2D);
+}
+
+
+SonyCD1b::SonyCD1b(
+  unsigned int index)
+  : SonyCD1(index)
+{
+  setKeysetName("CD Keyset 1b");
+}
+
+
+void SonyCD1b::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  SonyCD1::populateProtocol(guiObject);
+
+  addSIRC12Key("display", Info_Key, 0x11, 0x56);
+}
+
+
+SonyProjector1::SonyProjector1(
+  unsigned int index)
+  : PIRKeysetMetaData(
+      "Projector Keyset 1",
+      Sony_Make,
+      index)
+{
+  addControlledDevice(Sony_Make, "RM-1271", Other_Device);
+  addControlledDevice(Sony_Make, "VPL-SC50", Other_Device);
+  addControlledDevice(Sony_Make, "VPL-HS10", Other_Device);
+  addControlledDevice(Sony_Make, "VPL-HS20", Other_Device);
+  addControlledDevice(Sony_Make, "VH11HT", Other_Device);
+}
+
+
+void SonyProjector1::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  threadableProtocol = new SIRCProtocol(guiObject, index);
+
+  addSIRC15Key("Switcher 1", Unmapped_Key, 0x54, 0x0A);
+  addSIRC15Key("Switcher 2", Unmapped_Key, 0x54, 0x0B);
+  addSIRC15Key("Switcher 3", Unmapped_Key, 0x54, 0x0C);
+  addSIRC15Key("Switcher 4", Unmapped_Key, 0x54, 0x0D);
+  addSIRC15Key("Switcher 5", Unmapped_Key, 0x54, 0x0E);
+  addSIRC15Key("Switcher 6", Unmapped_Key, 0x54, 0x0F);
+  addSIRC15Key("Switcher 7", Unmapped_Key, 0x54, 0x10);
+  addSIRC15Key("Switcher 8", Unmapped_Key, 0x54, 0x11);
+  addSIRC15Key("vol up", VolumeUp_Key, 0x54, 0x12);
+  addSIRC15Key("vol down", VolumeDown_Key, 0x54, 0x13);
+  addSIRC15Key("mute", Mute_Key, 0x54, 0x14);
+  addSIRC15Key("power", Power_Key, 0x54, 0x15);
+  addSIRC15Key("Contrast+", ContrastUp_Key, 0x54, 0x18);
+  addSIRC15Key("Contrast-", ContrastDown_Key, 0x54, 0x19);
+  addSIRC15Key("Color+", ColorUp_Key, 0x54, 0x1A);
+  addSIRC15Key("Color-", ColorDown_Key, 0x54, 0x1B);
+  addSIRC15Key("Brightness+", BrightnessUp_Key, 0x54, 0x1E);
+  addSIRC15Key("Brightness-", BrightnessDown_Key, 0x54, 0x1F);
+  addSIRC15Key("Hue+", Unmapped_Key, 0x54, 0x20);
+  addSIRC15Key("Hue-", Unmapped_Key, 0x54, 0x21);
+  addSIRC15Key("Sharpness+", Unmapped_Key, 0x54, 0x22);
+  addSIRC15Key("Sharpness-", Unmapped_Key, 0x54, 0x23);
+  addSIRC15Key("Pic Mute", Unmapped_Key, 0x54, 0x24);
+  addSIRC15Key("Status ON", Unmapped_Key, 0x54, 0x25);
+  addSIRC15Key("Status OFF", Unmapped_Key, 0x54, 0x26);
+  addSIRC15Key("Secam", Unmapped_Key, 0x54, 0x27);
+  addSIRC15Key("Clear Blue", Unmapped_Key, 0x54, 0x28);
+  addSIRC15Key("menu", Menu_Key, 0x54, 0x29);
+  addSIRC15Key("video 1 input", CompositeInput_Key, 0x54, 0x2A);
+  addSIRC15Key("Input A", AuxInput_Key, 0x54, 0x2B);
+  addSIRC15Key("video 2 input", Composite2Input_Key, 0x54, 0x2C);
+  addSIRC15Key("power on", PowerOn_Key, 0x54, 0x2E);
+  addSIRC15Key("power off", PowerOff_Key, 0x54, 0x2F);
+  addSIRC15Key("Position +", Unmapped_Key, 0x54, 0x31);
+  addSIRC15Key("Position -", Unmapped_Key, 0x54, 0x32);
+  addSIRC15Key("right arrow", Right_Key, 0x54, 0x33);
+  addSIRC15Key("left arrow", Left_Key, 0x54, 0x34);
+  addSIRC15Key("up arrow", Up_Key, 0x54, 0x35);
+  addSIRC15Key("down arrow", Down_Key, 0x54, 0x36);
+  addSIRC15Key("Adjust Red", Unmapped_Key, 0x54, 0x41);
+  addSIRC15Key("Adjust Green", Unmapped_Key, 0x54, 0x42);
+  addSIRC15Key("Adjust Blue", Unmapped_Key, 0x54, 0x43);
+  addSIRC15Key("Cutoff Red", Unmapped_Key, 0x54, 0x44);
+  addSIRC15Key("Cutoff Green", Unmapped_Key, 0x54, 0x45);
+  addSIRC15Key("Cutoff Blue", Unmapped_Key, 0x54, 0x46);
+  addSIRC15Key("H Size", Unmapped_Key, 0x54, 0x47);
+  addSIRC15Key("Shift", Unmapped_Key, 0x54, 0x48);
+  addSIRC15Key("Center Red", Unmapped_Key, 0x54, 0x49);
+  addSIRC15Key("Center Green", Unmapped_Key, 0x54, 0x4A);
+  addSIRC15Key("Center Blue", Unmapped_Key, 0x54, 0x4B);
+  addSIRC15Key("Size", Unmapped_Key, 0x54, 0x4C);
+  addSIRC15Key("Linearity", Unmapped_Key, 0x54, 0x4D);
+  addSIRC15Key("Skew", Unmapped_Key, 0x54, 0x4E);
+  addSIRC15Key("Bow", Unmapped_Key, 0x54, 0x4F);
+  addSIRC15Key("Keystone", Unmapped_Key, 0x54, 0x50);
+  addSIRC15Key("Pin Cushion", Unmapped_Key, 0x54, 0x51);
+  addSIRC15Key("Gain", Unmapped_Key, 0x54, 0x52);
+  addSIRC15Key("Bias", Unmapped_Key, 0x54, 0x53);
+  addSIRC15Key("Zone", Unmapped_Key, 0x54, 0x56);
+  addSIRC15Key("tv/vcr", Input_Key, 0x54, 0x57);
+  addSIRC15Key("Blanking", Unmapped_Key, 0x54, 0x58);
+  addSIRC15Key("select", Select_Key, 0x54, 0x5A);
+  addSIRC15Key("Enter", Unmapped_Key, 0x54, 0x5E);
+  addSIRC15Key("Svideo 1", SVideoInput_Key, 0x54, 0x5F);
+  addSIRC15Key("Index Second / 0 (All)", Unmapped_Key, 0x54, 0x60);
+  addSIRC15Key("Index 1", Unmapped_Key, 0x54, 0x61);
+  addSIRC15Key("Index 2", Unmapped_Key, 0x54, 0x62);
+  addSIRC15Key("Index 3", Unmapped_Key, 0x54, 0x63);
+  addSIRC15Key("Index 4", Unmapped_Key, 0x54, 0x64);
+  addSIRC15Key("Index 5", Unmapped_Key, 0x54, 0x65);
+  addSIRC15Key("Index 6", Unmapped_Key, 0x54, 0x66);
+  addSIRC15Key("Index 7", Unmapped_Key, 0x54, 0x67);
+  addSIRC15Key("Index 8", Unmapped_Key, 0x54, 0x68);
+  addSIRC15Key("Index 9", Unmapped_Key, 0x54, 0x69);
+  addSIRC15Key("Svideo 2", SVideo2Input_Key, 0x54, 0x6F);
+  addSIRC15Key("Component Input", ComponentInput_Key, 0x54, 0x70);
+  addSIRC15Key("Focus+", Unmapped_Key, 0x54, 0x74);
+  addSIRC15Key("Focus-", Unmapped_Key, 0x54, 0x75);
+  addSIRC15Key("Zoom+", Unmapped_Key, 0x54, 0x77);
+  addSIRC15Key("Zoom-", Unmapped_Key, 0x54, 0x78);
+  addSIRC15Key("reset", Reset_Key, 0x54, 0x7B);
+  addSIRC15Key("Right and Left Arrows", Unmapped_Key, 0x54, 0x7C);
+  addSIRC15Key("Normal", Unmapped_Key, 0x54, 0x7D);
+  addSIRC15Key("Test", Unmapped_Key, 0x54, 0x7E);
+
+  addSIRC20Key("ms slide", Unmapped_Key, 0x2A, 0x1A, 0x3C);
+  addSIRC20Key("side shot +", Unmapped_Key, 0x2A, 0x1A, 0x3E); //"Keystone+"
+  addSIRC20Key("side shot -", Unmapped_Key, 0x2A, 0x1A, 0x3F); //"Keystone-"
+  addSIRC20Key("dynamic", One_Key, 0x2A, 0x1A, 0x51);
+  addSIRC20Key("standard", Two_Key, 0x2A, 0x1A, 0x52);
+  addSIRC20Key("cinema", Three_Key, 0x2A, 0x1A, 0x53);
+  addSIRC20Key("user 1", Four_Key, 0x2A, 0x1A, 0x54);
+  addSIRC20Key("user 2", Five_Key, 0x2A, 0x1A, 0x55);
+  addSIRC20Key("user 3", Six_Key, 0x2A, 0x1A, 0x56);
+  addSIRC20Key("apa", Unmapped_Key, 0x2A, 0x1A, 0x60);
+  addSIRC20Key("wide mode", AspectRatio_Key, 0x2A, 0x1A, 0x6E);
+  addSIRC20Key("lens", Unmapped_Key, 0x2A, 0x1A, 0x78);
+}
+
+
+SonyProjector1a::SonyProjector1a(
+  unsigned int index)
+  : SonyProjector1(index)
+{
+  setKeysetName("Projector Keyset 1a");
+
+  addControlledDevice(Sony_Make, "VPL-VH11HT", Other_Device);
+}
+
+
+void SonyProjector1a::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // Keyset already populated.
+    return;
+  }
+
+  SonyProjector1::populateProtocol(guiObject);
+
+  addSIRC15Key("input toggle", Input_Key, 0x54, 0x2C);
+  addSIRC15Key("shift-left", Unmapped_Key, 0x54, 0x2F);
+}