eventually this page will have a nice coherent set of information on the superkeyboard project, but until then, here's some code:
superkeyboard.pde - http://pastebin.com/gBLXpT4n
scancodes.h - http://pastebin.com/zsQ5itnR
for more info, scan through everything with the tag "keyboard" on this blog.