Last Updated: February 25, 2016
· jamesgecko

alt+arrow keys produce [C [D

When using irb in iTerm, trying to jump by word via alt+right and alt+left produced [C and [D. The issue was that the terminal was sending key codes irb didn't like. Fortunately, the fix is easy.

  • Open iTerm's preferences and edit profile shortcut keys.


  • For alt+right, send the escape sequence f.
  • For alt+left, send the escape sequence b.

2 Responses
Add your response


This helped me so much, thanks!

over 1 year ago ·

Thank you! I had accepted this as something I would just have to deal with. Never would have known how to fix it!

over 1 year ago ·