in reply to Re^4: Capture Keystroke
in thread Capture Keystroke

On Unix:
> script Script started, file is typescript > ls -ld /typo^H^H^H^Hetc drwxr-xr-x 117 root root 12288 2009-04-13 16:22 /etc > exit Script done, file is typescript

and then perl -pe 's/\e([^\[\]]|\[.*?[a-zA-Z]|\].*?\a)//g' typescript

filters the escape codes, and prints this out as-is:

Script started on Tue 14 Apr 2009 10:48:10 AM PDT > ls -ld /etc drwxr-xr-x 117 root root 12288 2009-04-13 16:22 /etc > exit Script done on Tue 14 Apr 2009 10:48:22 AM PDT