added event listener with new keyboard function