Slightly better keycode hackery.