Looking to see what the terminal gets when you press keystrokes such as alt+a or whatever.

I remember there was a really simple way to do this with a one line command and without installing any extra software, but I can't seem to find it again.

Any one know?

  • This is under program/application control. It is on by default for most shell programs like bash and zsh. Are you using telnet or ssh? Some other program?
    – Mike
    Commented Jul 19, 2015 at 14:00

1 Answer 1


Found it

sed -n l

Really useful for debugging problems with terminal programs that benefit from complex bindings like vim.

Or just use cat or sed

  • 2
    This just gets sed to echo its input, but doesn't execute any commands. You can get the same result with just running cat.
    – nohillside
    Commented Jul 19, 2015 at 14:10
  • @patrix I'm including this in the answer, or if you want to make your own answer I'll accept it. Thanks! Commented Jul 19, 2015 at 14:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .