Sample Header Ad - 728x90

How to convert an escape sequence to a human-readable keystroke?

2 votes
0 answers
266 views
I am looking for a Linux command, or a zsh command, or at least an online service that given: - an escape sequence like "^^[[1~", "\M-C\M-^X" or "^[[1;5F" (these are not made up, but output from my bindkey) - and my setup (PC keyboard, Konsole terminal and any other info that can have effect on generation of escape sequences) can show me a corresponding keystroke or their combination. Bonus points if it can explain colors etc, but my main interest is keyboard shortcuts. Context: I am learning zsh key bindings that are heavily customized in [zsh4humans (thus most of online zsh cheatsheets do not apply). I know that bindkey can show me a list of all shortcuts, and info zsh provides a widget's meaning. I know that I can convert a keystroke to an escape sequence myself using showkey -a (but ofc it uses the caret notation that may not match a notation shown by zsh). So, basically I'm looking for a command that performs an opposite function of showkey. Thanks in advance.
Asked by Radagast (41 rep)
Feb 18, 2024, 01:23 PM
Last activity: Mar 1, 2025, 07:49 AM