-
Notifications
You must be signed in to change notification settings - Fork 592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
micro:bit sim - not firing all button events #2445
Comments
The simulator thing is definitely a bug. We probably skip a lot of runtime events that we should fire. |
I put too many things in this ticket. If we say it's about simulator handling of button events: MICROBIT_BUTTON_EVT_DOWN - not simulated |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I was looking for a "button down" event (to make games more responsive). It seemed like it should be possible with the Control blocks, but it's not on the list.
On further searching, MICROBIT_BUTTON_EVT_DOWN=1 gets fired. If I switch into JavaScript and write the number 1, it does actually work on the real micro:bit (though not on the simulator). This code moves the sprite to the left on A "pressed", and moves it to the right on B "button down".
There might be other really useful things that also haven't made it onto the list of values.On the other hand, it's pretty long already, so if the menu could somehow tell which were relevant from the "from" field, that would be even better.The text was updated successfully, but these errors were encountered: