Workshop › Endless Runner › Step 7 of 19
On a phone there is no Space key. Pressing on the canvas jumps and lifting the finger ends the jump, just like the key.
```js
canvas.addEventListener('pointerdown', jump)
canvas.addEventListener('pointerup', endJump)
```addEventListener directly: jump runs on every press, endJump on every release.Under the keyup listener, write the two lines.
Skills: Keyboard and mouse input
← Short hops Things that come at you →