How to find out keystroke bash associated textual representation?

僤鯓⒐⒋嵵緔 提交于 2019-12-25 18:51:08

问题


As described in this answer is possible to map keystrokes to commands in a terminal. And to do this, there is a specific bash syntax for describes each key, as \e[11~ for F1 or Control-o for ControlO

How not everyone is deductible, I would like to find a way to discover each key associated string. If I just press it in terminal nothing happens for most of non-alphanumeric keys


回答1:


I think you can alternatively install expect, start autoexpect and see what are the codes for your key strokes in generated file.



来源:https://stackoverflow.com/questions/59384704/how-to-find-out-keystroke-bash-associated-textual-representation

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