When the keyboard is set to terminal mode the following sequences are returned when non-character keys are pressed. These codes are based on the AIX values.

Note: The Esc[q values are returned with leading zeros for AIX compatibility. Note that ANSI parsing states that Esc[1q and Esc[001q are equivalent.