It looks like I cannot use Ctrl+right_arrow to forward word on my c shell. After some effort I found out that the all the key bindings can be found with bindkey command and I get these:

"\306"         ->  forward-word
"\316"         ->  history-search-forward
"\346"         ->  forward-word
"\356"         ->  history-search-forward
"^[[C"         -> forward-char
"^[OC"         -> forward-char
"^[F"          -> forward-word

Any idea what these all mean? It would be AWESOME if you can point me to where I can learn what these characters mean :)


migrated from stackoverflow.com Feb 23 '13 at 14:21

This question came from our site for professional and enthusiast programmers.

  • My guess is that \3xx is Meta+\0xx, so \346 is Meta-F. – Barmar Feb 22 '13 at 16:05
  • and you guess is based on what? – user1861088 Feb 22 '13 at 16:19
  • 1
    Based on the assumption that the default bindings are Emacs-like, and 046 is ASCII F. – Barmar Feb 22 '13 at 16:29

As specified in the csh man page, "\nnn" is the ASCII character corresponding to the octal number nnn. The octal (base-8) number in decimal is 198. Barmer is correct, as "F" (ASCII 046, decimal 70) becomes 306 when you set the high bit.

  • what about '[' or '[['? – user1861088 Feb 22 '13 at 17:35
  • '^[' is Control-[, or ESC. The first two aren't meant to be typed literally; various non-printable keys (arrow keys, HOME, END, function keys, etc) generate escape sequences. The last one is ESC-F, which is simply the escape key followed by F. – chepner Feb 22 '13 at 19:39

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.