forked from http://0xcc.net/ttyrec/ to add some shortcut key functions for ttyplay