added debug for keycodes