I got the code for Shift-F1 (1b 5b 31 3b 32 50) and Enter (0a) as follows:
Code:
$ cat - |hexdump
^[[1;2P
0000000 5b1b 3b31 5032 000a
From an ASCII table this is the 6 characters: Esc [ 1 ; 2 P
The value might depend on other things like terminal settings, though.