I am not familiar with Vanya Sergeev's program, but I have modified Shine's IrDA sample to operate as a simple hex display of raw IrDA data. You can download the program (with source) from here:
IrDAmon.zip
Using this program, I am getting fairly predictable results with my Belkin keyboard. I get 4 bytes per key-down and another 4 per key-up. It seems that the keyboard is sending raw scan codes, as the values sent do not seem to be affected by holding down the Shift key, etc.
Next I will map out the scan codes to see if I can make a simple text input program for this keyboard. Hopefully, we can eventually incorporate support for all of the commonly-available PDA keyboards in any driver that might get written.
As this is my first published homebrew application, I welcome any feedback.
UPDATE:
Ok, I'm on a sleepless roll. I mapped out the scan codes for the Belkin keyboard, and wrote a simple typing program. This is just a quick-and-dirty application that doesn't support backspace, delete, or arrow keys, and simply echoes keystrokes to the screen. It does track the state of the Shift and Caps Lock keys, although it doesn't handle Shifted Caps Lock combinations correctly at all. The table in this program contains the codes for all keys and buttons on the keyboard, although some are not supported (or even scanned for) by this program.
The keyboard is made by Belkin, Model No: F8U1500-E, and is available at Staples for about $60. It is a fairly decent design, the keyboard folds in half and includes a PDA stand that does a nice job holding the PSP. The stand has a metal reflector that can (and must!) be carefully positioned to mirror the IR from the keyboard into the PSP's IrDA port. Once you get it adjusted, the comms are reasonably reliable.
You can download the application (with source) at:
IrDAtype.zip
I have not yet attempted to incorporate this into AgoIn's Keyboard Demo application, although the basic concept is the same. Although I haven't looked at his source code in awhile, I wouldn't be surprised to find out that my code is very similar to his. I seem to recall that somebody made a library out of his program, so I'll see if I can find that and add what I have learned.
I did notice that at times, the PSP would start receiving a stream of random crap, depending on how I positioned the keyboard and PSP. I think there is some form of IR interference around here, either off my desk lamp, or perhaps off my laptop computer. I am pretty sure that my laptop doesn't have an IrDA port, but sometimes those things are easy to overlook!
Again, any comments or suggestions are welcome.
EDIT:
Apologies to Vanya Sergeev, who wrote the original IrDA program upon which Shine based his program, upon which I based my program...
Also not sure why I thought AgoIn wrote the keyboard demo. The demo I was referring to was actually written by Tim Underwood.
EDIT #2:
I found a stupid mistake in the original program that limited the rate of input from the IrDA serial port to one byte per vsync, which limited the program to receiving about 15 keystrokes per second, max. (Keyboard input would slowly trickle in if you typed faster.) The link above now points to the updated project that processes all available IrDA bytes, for immediate keyboard response.