add debugging on keypress