问题
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