If you want to:
- add Unix-key word operations
- add
option-bandoption-fto move by word - add
option-delandoption-backspaceto delete by word - add your own custom keys to iTerms
then please read on.
- Open iTerm2's Preferences
- Switch to
Profilestab - Select your profile on the left and switch to tab
Keyson the right - Add your custom keys by click on
+button - Focus on input
Keyboard Shortcutin the new dialog and press the target key - Select action
Send Hex CodeorSend Escape Sequence - Add the hex code
For the most common Hex Code:
- Move backward:
Send Escape Sequence+b - Move forward:
Send Escape Sequence+f - Backspace word:
0x1b 0x08 - Delete word(forward):
Send Escape Sequence+d
Here is the Full ASCII Table