2012-10-19 4 views
2

방금 ​​tmux를 사용하기 시작했습니다. 나는 지금까지 그것을 정말로 좋아한다 - 스크린을위한 단단한 보충. 내가 가지고있는 하나의 단점은 tmux가 Alt (meta) 키 프레스를 그 내부에서 실행중인 Midnight Commander에서 훔치는 것입니다.tmux - Midnight Commander에서 Alt 키를 훔치고, 이맥스

나는 접두사 키 C를 만들었습니다. [잘 작동합니다. 그러나 tmux는 또한 Alt + anykey를 Midnight Commander를 사용할 때 C- [+ anykey]와 동일하게 해석합니다. MC에는 많은 Alt + 키 스트로크가 있기 때문에 매우 귀찮습니다.

그래서 tmux에서 실행중인 모든 응용 프로그램 (예 : Midnight Commander, emacs 등)에 대해 Alt + 키 입력을 무시해야합니다.

내 .tmux.conf 파일은 아래와 같습니다. 어떤 도움이라도 대단히 감사하겠습니다.

감사합니다. Madeleine.


# Turn on the status bar and change the coloring to my preference. 
# It is handy to highlight in red the active window. 
set -g status on 
set -g status-bg black 
set -g status-fg white 
set -g status-left ‘#[fg=green]#H’ 
set-window-option -g window-status-current-bg red 

# Use emacs keys 
set -g status-keys emacs 

# Makes the prefix key immediately available. There 
# is no pause necessary for an escape sequence 
set -s escape-time 0 

# Make our prefix key: [ 
unbind C-b 
set -g prefix C-[ 

# Split windows using emacs keys 
unbind % 
bind 2 split-window -v 
bind 3 split-window -h 

# Allow a mouse click to switch panes 
set-option -g mouse-select-pane on 

# Set up a key to switch to the last active window 
bind-key C-l last-window 

답변

4

문제는 Ctrl 키[Alt 키를 단말로 동일한 문자를 보내는 두 가지 방식 (ASCII 33 ESC)되어있다. 단말기가 문자를 생성 한 물리적 키를 알 수있는 방법이 없습니다. tmux은 터미널과 Midnight Commander 사이에 위치하기 때문에 항상 ESC를보고 소비합니다. 나는 유일한 옵션이 tmux에 다른 접두사를 사용하는 것이라고 생각합니다.

+0

chepner - 솔루션을 제공해 주셔서 감사합니다. 대신 C-]로 전환하겠습니다. –

관련 문제