IR Remote with Morse code

I don't know the name specifically, it was a kit I bought with the Arduino mega 2560, it just says Infrared Receiver. I have it all hooked up, all I need is some of the code or to understand how to do the code.

I already have all the HEX values for all the buttons on the remote.

But now I want to get the 0 and use that as dot and the 1 has a dash and input that to the serial monitor and then click the power button to say that I am finished

for example, I will click 001 Power button

the serial monitor would say ..- and then the letter 'A'

I don't know if that makes sense lol