cleanup
add keycode table; support single-char strings as keys