如何将tmux热键设置为Ctrl-,即Ctrl +逗号 [英] How can I set tmux hotkey as Ctrl-, that is, Ctrl+comma
问题描述
在Mac OS X上设置首选的tmux热键时遇到了麻烦。
I've got some trouble when setting my preferred tmux hotkey on Mac OS X.
调用tmux魔术的最常见的热键是 CTRL + A 和 CTRL + B 。但是由于以下原因,我宁愿选择其他击键:C-a是跳转到行首的全局热键; C - b 用于向后移动和在Vim中向上翻页。我不想破坏tmux中的这些好规则。
The most common hotkeys that invokes tmux's magics are CTRL+A and CTRL+B. But I would rather select other keystrokes for the following reasons: C-a is the global hot key for "jumping to the beginning of a line"; C-b is for "moving backward on a line" and "Page UP in Vim". I don't want to break these nice rules in tmux.
因此,我尝试为tmux热键设置一些不常用的击键。我选择的是 CTRL -,, CTRL -。或 CTRL - ;
So, I try to set some non-so-frequently-used keystrokes for tmux hotkey. What I choose is CTRL-, , CTRL-., or CTRL-;
我在.tmux.conf文件中编写以下语句:
I write this statement in my .tmux.conf file:
set-option -g prefix C-,
我启动tmux 。哦,它说坏钥匙。我将C-替换为C-。或C-;。
I start tmux. Oh, it says "bad key". I replace C-, with C-. or C-;. It doesn't work either.
那么,如何将tmux热键设置为 CTRL -,?
So, how can I set tmux hotkey to CTRL-,?
推荐答案
必须深入研究该源代码。控制键只能应用于字母,@,空格和? (C- @似乎等效于C-space)。抱歉,至少在tmux-1.6中,看起来不太像C-。
Had to dig into the source code for this one. The control key can only be applied to letters, @, space and ? (and C-@ seems to be equivalent to C-space). Sorry, doesn't look like C-, is possible, at least in tmux-1.6.
这篇关于如何将tmux热键设置为Ctrl-,即Ctrl +逗号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!