added debugging lines to see keycode/which/keypress issues