Why is terminfo[kcuu1] = '\\EOA'?

老子叫甜甜 提交于 2019-12-02 02:23:56
melpomene

Arrow and other special keys (terminfo refers to them as "keypad") send different codes depending on whether the terminal is in "application mode" or not. An application that wants to make use of the various k* keys is supposed to output smkx first (and rmkx at the end to restore the old behavior).

You can try Ctrl+V Up in vi (or a similar terminal application) to see that Up does indeed send \EOA there.

See these links for more details:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!