IT story

iTerm이 다른 OS와 동일한 방식으로 '메타 키'를 번역하도록 만들기

hot-time 2020. 5. 25. 08:12
반응형

iTerm이 다른 OS와 동일한 방식으로 '메타 키'를 번역하도록 만들기


emacs 키 바인딩이있는 bash 쉘에서 Mf, Mb와 같은 키 조합을 사용하여 쉘 프롬프트에서 각각 한 단어를 앞뒤로 이동할 수 있습니다. 일반적으로 메타 키는 Windows 및 Linux에서 Alt 키에 매핑됩니다. 그러나 iTerm에서는이 메타 키를 MacBook Pro의 Option 또는 Command 키에 매핑하는 방법을 찾지 못했습니다.

OS X에서 메타 키는 기본적으로 ESC 키에 매핑 된 것으로 보입니다. 따라서 iTerm에서 ESC-f, ESC-b를 사용할 수 있습니다. 그러나 ESC 키는 사용하기에 실용적이지 않습니다. 또한 iTerm에는 메타 키 (책갈피> 프로파일> 키보드 프로파일> 글로벌> 옵션 키 ...)에 대한 수정 자 매핑을 허용하는 옵션이있어이 설정이 전혀 작동하지 않는 것 같습니다.

따라서 누군가이 문제의 해결책을 알고 있다면 알려주십시오.

최신 릴리스 0.9.6.1012로 업그레이드했으며이 동작은 계속 유지됩니다.

편집 : 내 질문에 대한 설명. 내가 말하는 키 바인딩은 emacs가 아닌 bash 쉘을위한 것입니다. 기본적으로 bash 쉘은 emacs와 동일한 키 바인딩을 사용합니다.


Cmd+., Profiles, Keys를 선택합니다 Left option Key acts as: +Esc.

emacs에서 저에게 효과적이지만 다른 바람직하지 않은 영향이 있는지 확실하지 않습니다.


책갈피> 프로파일 관리로 이동 하십시오 . 그런 다음 키보드 프로파일> 전역 을 선택하고 옵션 키를 메타로 선택하십시오 . 이것은 0.9.6.1201 버전에서 작동합니다.


메뉴 막대 Iterm2 => 기본 설정 => 프로필에서 키 탭을 선택하고

왼쪽 Option 키는 + Esc로 작동

여기에 이미지 설명을 입력하십시오

irssi에서도 저를 위해 일했습니다.


Alt 키를 작동시킬 수는 없지만 커서 키를 통한 단어 탐색을 위해 적어도 기능을 수행하는 해결 방법이 있습니다.

Alt / Option + 왼쪽 또는 오른쪽 화살표 키를 사용하여 iTerm에서 다음 또는 이전 단어로 건너 뛰기


모든 좀비 부활을 여기로 가지만 후손을 위해

이 게시물 은 Mb와 Mf에서 원하는대로 작동합니다 .'Option Key as Meta '를 설정 한 상태에서 수정자를 희생하지 않도록하십시오 (개인적으로 메타를 사용하는 vim 매핑이 있습니다).

요약하면, Global Keyboard Profile (글로벌 키보드 프로필)에서 설정을 사용하여 두 가지 새로운 매핑을 추가합니다.

  1. 헥스 코드 F 대 B (66)에 대한 62의 값과 같은 키 ( man ascii)
  2. 옵션 인 수정 자
  3. 송신 이스케이프 시퀀스로 동작, 값 b 또는 f

The only thing I still miss from Terminal.app is Opt-Backspace to delete by word. There are other workarounds for that, but I'm just trying to train myself to use Ctrl-w.


It's easier in iTerm2. Go to preferences->bookmark->keyboard and select Option sends +ESC. In iTerm2 you can configure the left and right option keys separately, so remember to change both if that's what you want. Link for iTerm2: http://sites.google.com/site/iterm2home/


Go to Bookmarks > Manage Profiles. Then select Keyboard Profiles > Global and choose Option Key as +ESC.

Works in iTerm Build 0.9.5.0611 & Build 0.9.6.20090415


I found some solution on stackoverflow also, just go to keyboard profile and in "Global" change "Option key as" +ESC

that works for me perfectly =) btw some iterm patch exists also look here: http://www.emacswiki.org/emacs/EmacsForMacOS


Try "export LANG=C". I'm not emacs expert, but I found this enables emacs on OS X to recognize the Option key as the Meta key in iTerm,


I don't know about iTerm, but you can do this in Terminal. Instructions can be found here:

Emacs on Mac OS X Leopard key bindings


Here is what worked for me: Bookmarks > Manage Profiles > Keyboard Profiles > Global/xterm > Option Key as +Esc. With this, I can use Option+Enter in Midnight Commander and the currently selected file/directory name shows up in the command string, as it should. Option Key as Meta did not work for me. My build of iTerm is 0.10.

참고 : https://stackoverflow.com/questions/196357/making-iterm-to-translate-meta-key-in-the-same-way-as-in-other-oses

반응형