IR code help

I understand how IR works that's not my problem, my problem is what is the code to declare what the signal is? When button 1 is pressed I want it to send out one wave that tells the sensor that button one is pressed and when button 2 is pressed the sensor will know that button 2 is pressed. Basically I want the IR led to be able to send out different messages, that is where I'm stuck on how to code it.