I'd say your problem is caused by console input - you can't capture keystrokes from the command line because the command line is typically editable: you don't *input* characters until you press...