重新映射 Boybu 的 Chromebook 按键绑定

重新映射 Boybu 的 Chromebook 按键绑定

我正在尝试重新映射 byobu 中的 F 键以匹配我的 chrome book 上的图标。我首先编辑了我的键绑定,如下所示:

$ cat ~/.byobu/keybindings
source $BYOBU_PREFIX/share/byobu/keybindings/common
escape ^Bb

# F-keys seem to work well in both gnome-terminal and tty consoles
bindkey -k k1 eval 'prev' 'fit'               # F1  | Previous Window
bindkey -k k2 eval 'next' 'fit'               # F2  | Next Window
bindkey -k k3 copy                            # F3  | Enter copy/scrollback mode
bindkey -k k4 $BYOBU_BACKEND                  # F4  | Create new window
bindkey -k k5 eval 'process x' 'process t'    # F5  | Re-title a window
bindkey -k k6 eval 'process x' 'process r'    # F6  | Reload profile

但是当我重新启动 byobu 时,似乎没有任何改变。

$ byobu -v
byobu version 5.17
tmux 1.6
$ lsb_release -a
LSB Version:    core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:cxx-3.0-amd64:cxx-3.0-noarch:cxx-3.1-amd64:cxx-3.1-noarch:cxx-3.2-amd64:cxx-3.2-noarch:cxx-4.0-amd64:cxx-4.0-noarch:desktop-3.1-amd64:desktop-3.1-noarch:desktop-3.2-amd64:desktop-3.2-noarch:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.0-amd64:graphics-3.0-noarch:graphics-3.1-amd64:graphics-3.1-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-3.2-amd64:printing-3.2-noarch:printing-4.0-amd64:printing-4.0-noarch:qt4-3.1-amd64:qt4-3.1-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.2 LTS
Release:        12.04
Codename:       precise

如能得到任何指点我将非常感激。

答案1

显然我需要在 keybindings.tmux 中进行编辑。

$ cat ~/.byobu/keybindings.tmux 
set -g prefix F12
unbind-key -n C-a

bind-key -n F1 previous-window
bind-key -n F2 next-window
bind-key -n F3 copy-mode
bind-key -n F4 new-window \; rename-window ""
bind-key -n C-F4 display-panes \; split-window -h
bind-key -n S-F4 display-panes \; split-window -v
bind-key -n F5 command-prompt -p "(rename-window)" "rename-window %%"
unbind-key -n F6

效果很好,并且映射的按键与 chromebook 像素 F 键上的图标大致匹配。

相关内容