I thought it might be handy to post this list. These are for keys with non-printable characters.
keycode_Left -2
keycode_Right -3
keycode_Up -4
keycode_Down -5
keycode_Return -6 (Enter)
keycode_Delete -7 (Backspace)
keycode_Escape -8
keycode_Tab -9
keycode_PageUp -10
keycode_PageDown -11
keycode_Home -12
keycode_End -13
keycode_Func1 -17
keycode_Func2 -18
...
keycode_Func12 -28
I think some interpreters return different values for some of these, but these are the “official” values.
(Edit: Fixed an error.)