So I'm quite confused with the concept of escape sequences in a terminal (or terminal emulator to be more precise) and how they relate to the screen bindkey command. I was looking at some sample .screenrc file that I found on the internet where I saw the following configuration:
# switch windows with F3 (prev) and F4 (next)
bindkey "^[OR" prev
bindkey "^[OS" next
# switch layouts with Ctrl+F3 (prev layout) and Ctrl+F4 (next)
bindkey "^[O1;5R" layout prev
bindkey "^[O1;5S" layout next
I have no idea why, for example, the sequence ^[0R means F3 and the sequence ^[01;5R means Ctrl+F3. Is there a table for such sequences?
Also these sequences remind me of the sequences used to configure the colors in a terminal prompt (e.g using the $PS1 env variable) like \[\033[0m\] for reset and \[\033[30m\] for foreground black. Is there actually any relationship between these two "code sequences" or is it just my pure imagination?