Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
add comment

2 Answers

up vote 2 down vote accepted

The keycodes varies somewhat from terminal to terminal, but check out http://code.google.com/p/mintty/wiki/Keycodes

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
1  
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 –  Demizey 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. –  Demizey Sep 10 '13 at 15:15
add comment

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
add comment

Your Answer

 
discard

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.