Explain what pressed events do (#469)
This commit is contained in:
committed by
Peli de Halleux
parent
1ac227fb7f
commit
39071b5626
@ -5,6 +5,9 @@ This handler works when button `A` or `B` is pressed, or `A` and `B` together.
|
||||
When you are using this function in a web browser, click the buttons on the screen instead of the ones
|
||||
on the @boardname@.
|
||||
|
||||
* For button `A` or `B`: This handler works when the button is pushed down and released within 1 second.
|
||||
* For `A` and `B` together: This handler works when `A` and `B` are both pushed down, then one of them is released within 1.5 seconds of pushing down the second button.
|
||||
|
||||
```sig
|
||||
input.onButtonPressed(Button.A, () => {})
|
||||
```
|
||||
|
@ -2,8 +2,9 @@
|
||||
|
||||
Start an [event handler](/reference/event-handler) (part of the
|
||||
program that will run when something happens, like when a button is
|
||||
pressed). This handler works when you press pin `0`, `1`, or `2`
|
||||
together with `GND`. When you are using this function in a web
|
||||
pressed). This handler works when you touch pin `0`, `1`, or `2`
|
||||
together with `GND`, and release it within 1 second.
|
||||
When you are using this function in a web
|
||||
browser, click the pins on the screen instead of the ones on the
|
||||
@boardname@.
|
||||
|
||||
|
Reference in New Issue
Block a user