Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The bindkey keyword in .screenrc is preceded by some cryptic keys that correspond to some keybouard binding. How can I figure out what these are? Google and GNU Screen Documentation did not show the results I was looking for.
For example, how would you found the bindings below without someone specifically telling you what the binding is?
bindkey "^[[1;5I" next
bindkey "^[[1;6I" prev

share|improve this question
up vote 4 down vote accepted

The keycodes vary somewhat from terminal to terminal, but check out this resource.

share|improve this answer
I am guessing this binding also works for .minttyrc too. How come it does not apply to... say .inputrc? Also how did you know that these keys are mintty binding? Do you use mintty? – Forethinker Mar 9 '13 at 20:50
They should work just fine in .inputrc, you might have to replace ^[ with \e though, since ^[ is just a representation of ESCAPE and \e is interpreted as an actual ESCAPE character. mintty sends xterm keycodes which are pretty much the standard for modern terminal emulators. No, I don't even use Windows, but their wiki does a pretty good job at explaining how the keycodes are put together IMO – kyrias Mar 9 '13 at 21:03
What is the difference between a representation of ESC and the actual ESC character? – Forethinker Sep 7 '13 at 22:46
\e is an escape code that turns into an escape character while ^[ is just a way to show one on screen. – kyrias Sep 10 '13 at 15:15

Those are escape secuences, the starting ^[ is a dead giveaway, control-[ is a way of generating the ASCII control character ESC on most keyboards. Terminals use those for moving the cursor, changing text color, and such. Almost all terminals (that certainly includes the terminal emulators like xterm or similar under X, but also others) handle the ANSI escape secuences, in turn standardized/extended from those handled by the venerable (and wildly successful) VT-100.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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