Refactor keybindings using EventEmitter.