Keyboard has setEnabled(). When it is shown, it gets enabled; when it is hidden, it gets disabled. So no more than one key can be pressed.