UNIX shell tricks: find the escape sequence a keypress
Posted in General on Mar 2nd, 2008
If you ever need to figure out what escape code is generated when you press Ctrl-Left Arrow on a random terminal process, try the following:
cat > /dev/null
<press your random key sequence here, followed by enter>
You’ll end up with the escape sequence being printed directly to the terminal window. This is useful when you’re setting up [...]