0

I would like to add a keyboard shortcut in iTerm2 for an action that is not displayed in the "Action" dropdown, in Preferences > Keys > + in iTerm2.

enter image description here

The action I want is "delete a word before cursor" and "delete a word after cursor".

Notes:

  • I know there is a shortcut (Ctrl+U/K) for those actions, but I want to replace them for another shortcut.

  • There is an option in the "Action" dropdown which consists in sending an hexadecimal code corresponding to an action. But how do I know which hexa code means that specific action? Is there any hexa-action mapping for me to able to do that?

samthegolden
  • 1,366
  • 1
  • 10
  • 26
  • What about this answer? https://stackoverflow.com/questions/6205157/iterm-2-how-to-set-keyboard-shortcuts-to-jump-to-beginning-end-of-line/29403520#29403520 – Tonio Gela Jul 17 '19 at 09:31

1 Answers1

0

Delete one word to left of cursor

+ Delete Send Hex Codes:

0x1b 0x08 Breaks in Elixir's IEX, seems to work fine everywhere else

or

0x17 Works everywhere, but doesn't stop at normal word breaks in IRB and will instead delete until it sees a literal space.

Delete one word to right of cursor

+fn←Delete or +Delete→ Send Hex Codes: 0x1b 0x64

Tonio Gela
  • 85
  • 8