IF the computer is not used by people, it would probably be somewhat easier to use a PIC microcontroller with USB built in, and simulate a usb keyboard with the pic. you'd just open a command prompt and leave it open, windows would detect pic transmissions as key presses and everything works smoothly.
Otherwise, yes, you would have to code a small monitoring app that connects to rs232 and reconnects on timeout and depending on what it receives, it does crap.
May be useful, may be not so much : do some searches for WinLIRC (
http://winlirc.sourceforge.net/ ) , which is some software implementation of something for remote controls - i'm thinking you connect an infrared sensor to pc using rs232 or usb and such software monitors for remote control button presses and then converts the infrared messages to hotkeys and buttons which are caught by various programs.
Could be useful to have a peek at the source code, or make your PIC send data to the rs232 port as if it's a remote control stream of bits (what the infrared led would catch from the remote control) and use already written WinLIRC on the computer.