setting up keyboard listeners