Keyboard improvements and added a mode menu