tmux의 키 조합을 변경하다 보니 C-- (control과 -를 함께 입력)를 사용할 수 없다는 것을 알게 되었다.

C-_는 되는데 C--는 왜 안되는 걸까?

이유를 찾아보았더니 stackexchange에 나와 똑같은 궁금증을 갖고 질문한 사람이 있었다.

그리고 꽤 멋진 답변이 달렸기에 번역해 보았다.

The C- notation doesn't refer to actual keyboard hardware combinations. They refer to ASCII control codes.

C- 표기법은 키보드의 하드웨어적 조합을 의미하는 것이 아니라, ASCII control 코드를 의미합니다.

Historically, the notation was used to indicate ASCII characters between 0 and 31 by subtracting 64 from the ASCII value of the character used in conjunction with C-. For example, C-@ represents ASCII 0 (NUL) because @ is ASCII 64; C-G represents ASCII 7 (BEL) because G is ASCII 71; etc. In other words, you generate ASCII x (for x between 0 and 31) by holding the Control key while pressing the key for ASCII x+64.

역사적으로 이 표기법은 C- 와 조합된 문자의 ASCII 값에서 64를 뺀 값으로, 0 ~ 31의 ASCII 문자를 나타내는 데에 사용되었습니다. 예를 들어, @는 ASCII 64이므로, C-@는 ASCII 0 (NUL)을 나타냅니다. G는 ASCII 71이므로, C-G는 ASCII 7 (BEL)을 나타냅니다. 즉, ASCII x+64의 키와 control 키를 함께 누르면 ASCII x (x는 0~31 사이)가 생성된다는 것입니다.

You'll notice that - (ASCII 45) is too small to subtract 64 from! So technically, C– does not exist as a character. The only "real" control characters are C-@ though C-_. However, having to hold down the shift key is a little cumbersome, so typically you can type the lowercase letter instead (that is, Control-Shift-a and Control-a are equivalent). Since - and _ are on the same key (at least on my US QWERTY keyboard), C-_ can be used to represent the character generated by either Control-Shift– or Control-_.

ASCII 45는 64보다 작기 때문에 뺄 수 없습니다. 그러므로 기술적으로, C--는 존재하지 않는 character입니다. "진짜로" 존재하는 control character는 C-@C-_ 뿐이죠. 하지만, shift 키를 누르고 있는 건 번거로운 일이므로, 보통은 소문자를 대신 입력해도 됩니다(말하자면, Control-Shift-a 와 Control-a가 같다는 말입니다.). (적어도 US QUERTY 키보드에서는) -와 가 같은 키에 있기 때문에 C-_는 Control-Shift– 나 Control- 가 생성하는 character를 나타내는 데 사용할 수 있습니다.

(This doesn't explain why C– and C-_ are not equivalent while C-a and C-A are. I suspect that while nearly every keyboard will have a and A on the same key, the same is not true for -/_.)

오케이. 이제 알겠다. 시험삼아 .tmux.conf에 아래와 같이 작성한 라인을 추가해 보았다.

bind-key -n C-_ resize-pane -D

그랬더니 정말 C--로도 작동하고, C-_로도 작동한다.