csh bindkey what is "\346"

0

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 :)

Thanks!

user1861088

Posted 2013-02-22T15:59:30.593

Reputation: 111

My guess is that \3xx is Meta+\0xx, so \346 is Meta-F. – Barmar – 2013-02-22T16:05:06.223

and you guess is based on what? – None – 2013-02-22T16:19:34.293

1Based on the assumption that the default bindings are Emacs-like, and 046 is ASCII F. – Barmar – 2013-02-22T16:29:20.173

Answers

1

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.

chepner

Posted 2013-02-22T15:59:30.593

Reputation: 5 645

what about '[' or '[['? – None – 2013-02-22T17:35:39.940

'^[' 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 – 2013-02-22T19:39:32.600