The keys F2-F4 in byobu are disfunction in Gentoo.
I found the reason and a fix. Appearently the section
XTERM TWEAKS in /etc/screenrc does something to these keys via
termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~'
Replacing that with
termcapinfo xterm 'k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS'
It might also work properly if you simply deleted the line.