Greg Reagle <greg.rea...@umbc.edu> writes: > Hello. If there are any man pages or articles or FAQs about this topic > that would be good to read, please refer to them. > > Running Xubuntu 12.04 and the latest st on a ThinkPad laptop, these are > the results I get, correlated with the results of infocmp. I got the > output from the keys by running cat and hitting the keys. > > st, TERM is st-256color > > | home | end | insert | delete | up | down | left | right | > | ^[[H | ^[[4~ | ^[[4h | ^[[P | ^[[A | ^[[B | ^[[D | ^[[C | > | home | kc1, kend | smir | dch1 | cuu1 | | | cuf1 | > > Why do the escape sequences produced by down and left arrow keys have no > match in infocmp? Why does home key not produce khome (\E[1~) escape > sequence?
The character sequences in the terminfo entry are meant to match those which are sent when keypad mode (tput smkx) is enabled. Try "tput smkx; cat". I note that you called out down and left, I suspect this is because you've incorrectly matched up and right against cuu1 and cuf1, whereas the latter are control sequences, not input sequences. You should be looking exclusively at terminfo strings whose name begins with "k" (khome, kend, kich1, kdch1, kcuu1, kcud1, kcub1, kcuf1).