Red Hat Bugzilla – Bug 16925
man page bug regarding F1 and F2 translation
Last modified: 2008-05-01 11:37:58 EDT
There is a documentation bug in the screen man page.
( screen 3.9.5-11 from RC1 )
It says that the termcap codes F1 and F2 are translated to
^[[22~ and ^[[23~ , but both the actual behavior and the screen
entry in /etc/termcap say ^[[23~ and ^[[24~
yep, it is. Will investigate.
same in screen-3.9.9-1 ( and also in 3.9.9-2 )
F1 = ^[[[A
F2 = ^[[[B
Best way to find out is to press <ctrl-V> (capital V) then strike F1
Some will say ^[OP others ^[[A. It depends on your terminal type so the
information isn't wrong per se, it's simply neglecting to opint out that it's
terminal enviroment specific.
There is reality and there is documentation, whose purpose is to describe
reality. In the case of sceen man page , it fails to do that.
Here is the fix :
< F1 ^[[22~
< F2 ^[[23~
> F1 ^[[23~
> F2 ^[[24~
About your message , Phil :
> F1 = ^[[[A
> F2 = ^[[[B
On some terminal types, maybe , in TERM=screen not
> Best way to find out is ...
There is nothing to find out. I stated all the relevant facts in my first
> It depends on your terminal type so the
> information isn't wrong per se, it's simply
> neglecting to opint out that it's
> terminal enviroment specific.
No it is not. The code for F1 is _always_
translated to "^[[23~" ( and F2 to "^[[24~" ),
independent of the physical terminal type.
As this is a clear case of documentation bug ( it says ^[[22~,
when in reality it is ^[[23~ ), I am reopening this bug.
The current screen man page is correct (3.9.11-8)
Function key 10 k; stuff \033[21~
Function key 11 F1 stuff \033[23~
Function key 12 F2 stuff \033[24~
Home kh stuff \033[1~