W.T. added partial code to listen for keyboard press events.