Byobu's F-keys keybindings were not working for me in virtual console a.k.a TTY. However, the Byobu F-keys keybindings were working fine in X Window terminals (LXTerminal, Sakura, Terminology, Xfce-Terminal) under X-Window-System. It was perplexing. 'byobu-keybindings' script written by Byobu author Dustin Kirkland to check the Byobu keybindings was giving me "Byobu keybindings: [ON]" message but F-keys were failing me in virtual console (TTY). Very perplexing indeed, mysterious even. I changed Byobu backend from tmux to screen and back but alas no joy. Google and DuckDuckGo also decided to left me high & dry this time. So it was time for soul-searching and man-page reading. After traveling through a gazillion man-pages, wrestling with escape codes & sequences, here, ladies & gentlemen is the holy grail.
If you use Bash as your login shell, add following code to your ~/.bashrc or /etc/bashrc or /etc/bash.bashrc
shopt -q login_shell
RETVAL=$?
if [[ "$RETVAL" == 0 ]] ; then
export TERM='linux'
else
export TERM='xterm-256color'
fi
If you don't use Bash as the log in shell but instead use some other "sh compatible" shell, add following code to the configuration file (.cshrc, .kshrc, .tcshrc, .zshrc, .etc) of your log in shell. This will work fine for Bash as well.
tty="$(tty)"
if test "${tty%%[1-64]*}" = "/dev/tty" ; then
export TERM='linux'
else
export TERM='xterm-256color'
fi
Cheers!!!