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
6 let to_string = function
7 | Ascii c
-> Printf.sprintf
"'%c'" c
8 | Code c
-> string_of_int c
9 | Ctrl c
-> Printf.sprintf
"ctrl(%#x)" c
10 | Fn n
-> "F" ^ string_of_int n
11 | Backspace
-> "backspace"