Immediately Hide Player Controls using Keyboard Shortcut

If your requirements are similar to

  1. hide player controls via a keyboard short cut BUT
  2. display the control bar when mouse moves

this code snippet can help you get started

    document.addEventListener('keyup', event => {
      if (event.code === 'Space') {
        console.log('Space pressed');

    function hideControls() {
      var element = document.querySelector('.bmpui-ui-controlbar')

hope it helps!