Keyboard refactored