iTerm2 - macOS Terminal Replacement
目的是讓 iTerm2 的鍵盤可以跟macOS系統操作的邏輯一致,將會有以下設置
鍵盤設置參考: https://stackoverflow.com/questions/6205157/how-to-set-keyboard-shortcuts-to-jump-to-beginning-end-of-line
選項一、下載此檔案:
選項二:將下列文字儲存,檔名隨意,副檔名為.itermkeymap
{"Key Mappings":{"0xf700-0x300000-0x0":{"Label":"","Action":7,"Text":""},"0xf72d-0x100000-0x0":{"Label":"","Action":8,"Text":""},"0xf703-0x300000-0x0":{"Label":"","Action":11,"Text":"0x05"},"0xf702-0x280000-0x0":{"Label":"","Action":11,"Text":"0x1b 0x62"},"0xf72b-0x100000-0x0":{"Label":"","Action":4,"Text":""},"0x19-0x60000-0x0":{"Label":"","Action":39,"Text":""},"0x9-0x40000-0x30":{"Label":"","Action":32,"Text":""},"0xf72c-0x100000-0x0":{"Label":"","Action":9,"Text":""},"0x7a-0x100000-0x0":{"Label":"","Action":11,"Text":"0x1f"},"0xf701-0x300000-0x0":{"Label":"","Action":6,"Text":""},"0xf703-0x280000-0x0":{"Label":"","Action":11,"Text":"0x1b 0x66\\n"},"0x7f-0x100000-0x0":{"Label":"","Action":11,"Text":"0x15"},"0xf702-0x300000-0x0":{"Label":"","Action":11,"Text":"0x01"},"0xf729-0x100000-0x0":{"Label":"","Action":5,"Text":""},"0x7f-0x80000-0x0":{"Label":"","Action":11,"Text":"0x1b 0x08"}},"Touch Bar Items":{}}
接著進入iTerm2:Setting → Keys → Key Bindings 下面選擇 import
若 ⌥ + 方向鍵
遇到衝突,把 Profiles→Keys裡面的 ⌥ + 方向鍵
刪除即可
備註:切換標籤快捷鍵為 ⇧ + ⌘ + [ 或 ⇧ + ⌘ + ],可以將設定在 logitech options 裡面