Revert "Revert "KeyAdapter""

This reverts commit c38fd5f59e160ce9cc8d7a4544ca7ddc2d41ee79.