2 | Ascii
of char
| Code
of int | Ctrl
of int | Fn
of int
3 | Backspace
| Delete
| Escape
| Insert
| Enter
4 | Up
| Down
| Left
| Right
| Next
| Prior
| Home
| End
7 let to_string = function
8 | Ascii c
-> Printf.sprintf
"'%c'" c
9 | Code c
-> string_of_int c
10 | Ctrl c
-> Printf.sprintf
"ctrl(%#x)" c
11 | Fn n
-> "F" ^ string_of_int n
12 | Backspace
-> "backspace"