Thanks for looking into the USB keyboard driver. As far as the original problem, I found out how to add standard PS/2 ports, so I'm in no rush to get results.
But it would be great to find, fix and document what is wrong with the original IBM USB keyboard. I will try to help and test.
I have a Microsoft Ergonomic keyboard I'm still using after my bicycle accident. That's pretty much a standard USB keyboard without the multi-media keys found on some new keyboards, but with the extra Microsoft keys. On this keyboard, SysRq is a key that is also PrtScn.
The 122-key keyboard only shows F13-F24 when plugged into PS/2 port. I have now shipped the machine to which I added the PS/2 port, so I'll now be testing on an older machine with a PS/2 port. I hope the PS/2 ports are equivalent.
Still to do is to get a standard IBM PS/2 keyboard and test that in the PS/2 port.
The code for my REXX utility is below. Please feel free to improve it.
/* program to test keyboard input */
CALL RxFuncAdd 'SysGetKey','RexxUtil','SysGetKey'
SAY 'Press q to quit:'
SAY
do while key <> 'q'
key=SysGetKey()
say ''
SAY 'Key (' || Length(key) || '): '
DO j=1 TO Length(key)
say ' '||C2X(SubStr(key,j,1))
END j
SAY
END
return