@josh agree. It’s a focus issue but I think related to
@jkeays if you comment out the
hideElement lines for the start button and instructions, you get keydown activity back.
So what I suspect is happening - is a bug - is that
hideElement hides but in so doing gives focus to the now hidden element, which in HTML5 means it can’t trigger, or listen for events anymore. What I don’t totally understand is why the screen would entirely lose focus in the first place.
So, knowing this I tried all sorts of shenanigans to give focus back to the screen. In the end I made a second screen with the character on it, but none of the buttons. So now when the start button is clicked, rather than hiding the button and instructions, it just switches screens. It’s a kluge and a work around but achieves the effect.