ppc*_*ppc 6 keyboard-shortcuts terminal tmux x11
我想将tmux find-window提示绑定到按下和释放Shift两次。
我已经试过了
bind-key -n S-S command-prompt "find-window -N '%%'"
Run Code Online (Sandbox Code Playgroud)
这会导致没有错误消息,使用 进行检查:show-messages,但在双击 时不会触发操作Shift。
您可以在x11下使用xcape配置以在点击和释放时发出例如+ + + 。然后你可以将它声明为辅助转义键,并为“ + + + ”分配一个键绑定ShiftAltCtrlShiftF12tmuxAltCtrlShiftF12command-prompt "find-window -N '%%'"
命令的确切顺序:
在 shell 提示符下:
$ xcape -e 'Shift_L=Alt_L|Control_R|Shift_L|F12'
Run Code Online (Sandbox Code Playgroud)
在 tmux 提示符下:
:set-option prefix2 "M-C-S-F12"
:bind M-C-S-F12 command-prompt "find-window -N '%%'"
Run Code Online (Sandbox Code Playgroud)
现在双击Shift_L,tmux您将在左下角看到(find-window)。
有了Shift_R=Alt_L|Control_R|Shift_L|F11你可以使用Shift_L的内部tmux,并Shift_R为外tmux,如果你嵌套它们。
注意:我之前已经用 发布了这个答案F15,但是没有按预期工作,因为@Gilles 说:F13-F20需要在terminfo.