我试图学习如何bind-key [-cnr] [-t key-table] key command [arguments]
更好地使用,但在弄清楚命令的“有效密钥”是什么时遇到了一些麻烦bind-key
。
我也试过做man tmux
和谷歌,但我找不到任何有用的东西。
man
页面?例如,我试图弄清楚以下命令重新映射的含义:
bind-key -n M-S-Left resize-pane -L 2
bind-key -n M-S-Right resize-pane -R 2
bind-key -n M-S-Up resize-pane -U 2
bind-key -n M-S-Down resize-pane -D 4
Run Code Online (Sandbox Code Playgroud)
该-n
很容易的找到man
页(无需前缀)。但我无法弄清楚M-S-Left
关键是什么意思。
我猜它的映射移位和左箭头加上命令的任何M
含义resize-pane -L 2
。
M
意思?C
?vim
?问题是vim
它自己的语言似乎有不同的脚本,因为它有时需要和东西。
pol*_*lym 32
看看man tmux
,搜索/为KEY BINDINGS
:
tmux 允许将命令绑定到大多数键,带或不带前缀键。
指定键时,大多数代表他们自己(例如“A”到“Z”)。Ctrl 键可能以“C-”或“^”为前缀,而 Alt(元)以“M-”为前缀。
此外,还接受以下特殊键名:
Up, Down, Left, Right, BSpace, BTab, DC (Delete), End, Enter, Escape, F1 to F20, Home, IC (Insert), NPage/PageDown/PgDn, PPage/PageUp/PgUp, Space, and Tab . 请注意,要绑定 '"' 或 ''' 键,必须使用引号 [...]
MS-左应Alt+ Shift+Left例如。
要列出所有键绑定,只需在会话中按Ctrl-b然后。?tmux
这也记录man tmux
在部分EXAMPLES
:
键入“Cb?” 列出当前窗口中的当前键绑定;up 和 down 可用于导航列表或 'q' 退出列表。
您还可以通过 列出所有键绑定tmux list-keys
。如果你想检查已经设置的键,你可以grep
输出来检查它是否已经设置。
要通过 Google 查找更多信息,请在其中搜索部分名称man tmux
- 只需输入tmux default key bindings
例如 :)。但往往man tmux
就足够了。
tmux
如果您在 Google 中搜索所述字符串,该站点是一个非常好的文档,并且会弹出。
Arch wiki也总是好的。
小智 12
这是 tmux 2.2 中可用的“扩展”键名的完整列表(从源代码中提取):
/* Function keys. */
F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
F11
F12
IC
DC
Home
End
NPage
PageDown
PgDn
PPage
PageUp
PgUp
Tab
BTab
Space
BSpace
Enter
Escape
/* Arrow keys. */
Up
Down
Left
Right
/* Numeric keypad. */
KP/
KP*
KP-
KP7
KP8
KP9
KP+
KP4
KP5
KP6
KP1
KP2
KP3
KPEnter
KP0
KP.
/* Mouse keys. */
MouseDown1Pane
MouseDown1Status
MouseDown1Border
MouseDown2Pane
MouseDown2Status
MouseDown2Border
MouseDown3Pane
MouseDown3Status
MouseDown3Border
MouseUp1Pane
MouseUp1Status
MouseUp1Border
MouseUp2Pane
MouseUp2Status
MouseUp2Border
MouseUp3Pane
MouseUp3Status
MouseUp3Border
MouseDrag1Pane
MouseDrag1Status
MouseDrag1Border
MouseDrag2Pane
MouseDrag2Status
MouseDrag2Border
MouseDrag3Pane
MouseDrag3Status
MouseDrag3Border
MouseDragEnd1Pane
MouseDragEnd1Status
MouseDragEnd1Border
MouseDragEnd2Pane
MouseDragEnd2Status
MouseDragEnd2Border
MouseDragEnd3Pane
MouseDragEnd3Status
MouseDragEnd3Border
WheelUpPane
WheelUpStatus
WheelUpBorder
WheelDownPane
WheelDownStatus
WheelDownBorder
Run Code Online (Sandbox Code Playgroud)
这些除了可以ASCII可打印字符组一起使用,并与组合M-
,C-
以及S-
前缀。
归档时间: |
|
查看次数: |
42569 次 |
最近记录: |