Byobu + GNU screen でFunction Key割り当てを無効にする

Byobuの既定値ではFunction Keyに機能が割り当てられています.

/usr/share/byobu/keybindings/f-keys.screen

自分は使わないし,別のFunction Keyを利用するアプリケーションで利用できなくなるので無効にしています.
無効にする方法をメモしておきます.

適当なテキストエディタで~/.byobu/keybindingsを開きます.viなどの編集モードのあるエディタの場合は編集モードにして,Ctrl+a !(aは設定してあるescape key)を押すと以下のラインが出てくるので頭の:を消して保存します.他にsourceの行がある場合はそれよりも下に書かないと上書きされるので注意.

:source /usr/share/byobu/keybindings/f-keys.screen.disable

環境(Ubuntu 16.04 LTS arm64)によってはこうなりました.$BYOBU_PREFIX/usrだったので実態は同じですね.

:source $BYOBU_PREFIX/share/byobu/keybindings/f-keys.screen.disable

Byobuを起動し直すと反映されているはずです.
Ctrl+a !を使わず同じテキストを書いても問題ないようでした.

Tmuxは利用してないので未検証ですが以下のあたりのファイルで同じような設定ができそうな気がします.

~/.byobu/keybindings.tmux
/usr/share/byobu/keybindings/f-keys.tmux.disable

以下の環境で確認しました.

  • Debian sid amd64
  • Debian stretch armhf/arm64
  • Ubuntu 16.04 LTS amd64/arm64
  • Ubuntu 17.10 amd64
追記)この記事はByobu GNU screenで,以下はByobu Tmux

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)