Split up keyboard command processing and allow for external registration of commands