terminfo database contains entries, describing "application mode". By convention, entries which correspond to buttons, pressed on keyboard, start with \EO
(this is done so that applications which do not perform initialization will know in which mode terminal is initialized by default - "normal" or "application") and are named with k prefix. But for example, on Debian 10 ( /lib/terminfo/x/xterm-256color
) this is not true:
$ infocmp -1|grep 'kf[0-9]='
kf1=\EOP,
kf2=\EOQ,
kf3=\EOR,
kf4=\EOS,
kf5=\E[15~,
kf6=\E[17~,
kf7=\E[18~,
kf8=\E[19~,
kf9=\E[20~,
Is this a bug in terminfo database?
\EO
.\E[
is a very common prefix,\EO
is a bit of a legacy one.