Escape sequences for function keys (F1-F12), especially F11 and F12

1,269

tput tells you what the terminal advertises as its function keys. Terminals often don't advertise all the function keys and keychords that they support. To see what escape sequences the terminal actually sends, use the Ctrl+V method mentioned in that same answer: press Ctrl+V in a terminal application that doesn't rebind the Ctrl+V key (such as the shell). Ctrl+V inserts the next character (which will be the escape character) literally, and you'll be able to see the rest of the sequence, which consists of ordinary characters.

If Byobu doesn't detect your terminal's escape sequences correctly, copy the corresponding definitions from /usr/share/byobu/keybindings/f-keys.screen to ~/.byobu/.screenrc and modify the escape sequences to match your terminal. For example, if Ctrl+V F12 inserts ^[[24~, add

bindkey "^[[24~" process x
Share:
1,269

Related videos on Youtube

James Oravec
Author by

James Oravec

Updated on September 18, 2022

Comments

  • James Oravec
    James Oravec over 1 year

    Curious of anyone knows of an easy, quick way to do regular expressions using UnicodeString in C++ Builder 2009.

    Particularly for an IPv4 IP address.

    • James Oravec
      James Oravec over 10 years
      I used the boost regex stuff shown in: stackoverflow.com/questions/5804453/…
    • bluish
      bluish over 7 years
      @VenomFans please post it as an answer and accept it, so other people can see which is the solution
    • James Oravec
      James Oravec over 7 years
      @bluish, the solution with the most up votes is what I used plus the url reference. I no longer have access to c++ builder (different job) otherwise I'd post the exact answer for you.
  • James Oravec
    James Oravec over 10 years
    I ended up using the boost solution, but gave you an up vote.
  • eikonal
    eikonal almost 9 years
    Thanks. What does the x stand for?
  • Gilles 'SO- stop being evil'
    Gilles 'SO- stop being evil' almost 9 years
    @Andrew Register x, which is set to the escape sequence at the top of f-keys.screen. Thus binding a key to process x effectively makes that key a prefix for screen commands.
  • eikonal
    eikonal almost 9 years
    By any chance, do you have time to chat for a minute? I'm having difficulty knowing what to do.
  • Gilles 'SO- stop being evil'
    Gilles 'SO- stop being evil' almost 9 years
    @Andrew I do now. Even if I'm not around, there's often someone in the chatroom.