Don't know about the keycode mapping, but the bios on my mobo has an option to "power on on PS2" which essentially means that if that option is ON, then if there is any activity on the PS2 ports (either mouse or keyboard), the PC comes on.
This worked a treat for me when I had the IPAC4 plugged into the PS2 port, but when I moved it to USB, no more workee.
Oh well, got other ways to turn it on and off now, though.