added whenSpecialKeyPressed, renamed whenPressed to whenCharPressed, and changed quit command key from 'q' to Escape