There is no sane reason to be logging your keystrokes in this format. Not only will you get a bunch of BS output, "dumping the opcodes" will be sporadic and stupid.
A far niftier trick is to execute something like the scripts linked (which I still find hilarious), or do what I do, and run "hexdump -C /dev/random" in an embedded console window. It will look a lot "l33t"er, and (if you're like me) you start to see patterns in a so-called random system.
On the topic of system monitoring, spend some time getting to know how... *ahem*... "hackers" are monitored by those who are in the know, who actively spend time rolling around in honey pots (as it were). They even have a proper tool for that sort of thing.
In short, find a decent reason to be logging keystrokes, and use a proper tool for it after doing a decent amount of research on the topic.



