Libraries are good.
If you roll-your-own, you can use something like:
int key = getIRKey(); //Fetch the key
if(key != 0) //Ignore keys that are zero
{
switch(key)
{
case 128: Serial.print("1"); break;
case 129: Serial.print("2"); break;
case 130: Serial.print("3"); break;
case 131: Serial.print("4"); break;
case 132: Serial.print("5"); break;
case 133: Serial.print("6"); break;
case 134: Serial.print("7"); break;
case 135: Serial.print("8"); break;
case 136: Serial.print("9"); break;
case 137: Serial.print("0"); break;
case 144: Serial.print("A"); break; // CH Up
case 145: Serial.print("B"); break; // CH Down
case 146: Serial.print("C"); break; // VOL Right
case 147: Serial.print("D"); break; // VOL Left
case 148: Serial.print("E"); break; // Mute
case 165: Serial.print("F"); break; // AV/TV
case 149: Serial.print("P"); // Power == MENU ACTIVE
//This toggles the statLED every time power button is hit
if(digitalRead(statLED) != 1)
digitalWrite(statLED, HIGH);
else
digitalWrite(statLED, LOW);
break;
//default: Serial.println(key); // for inspection of keycode
}
128... 129... 130 is the decimal value of the HEX. You can also simply use the HEX directly.
This may be a little help in understanding the Arduino C++ data types:
There are good articles out on the Net about "Arduino Data Types", just Google.
Ray