Replace Keymap interface with standard Map interface. Wrap keyboard event state in a KeyboardEvent class.