Workshop › Sudoku › Step 26 of 28
Phones have no number keys on screen, so under the board there is a row of ten buttons: 1 to 9 and one to erase.
```js
const PAD_Y = TOP + 9 * SIZE + 16 // the row of number buttons for touch screens
const PAD_W = (9 * SIZE) / 10
const PAD_H = 44
for (let i = 0; i < 10; i++) {
const x = LEFT + i * PAD_W
ctx.fillStyle = '#e0e7ff'
ctx.fillRect(x + 2, PAD_Y, PAD_W - 4, PAD_H)
ctx.fillStyle = '#3730a3'
ctx.font = 'bold 22px sans-serif'
ctx.textAlign = 'center'
ctx.fillText(i === 9 ? '⌫' : String(i + 1), x + PAD_W / 2, PAD_Y + 30)
}
```x + 2, PAD_W - 4).⌫, the erase sign.TOP, write the three PAD_ constants.draw, between the lines loop and the time, draw the buttons.Skills: Drawing on a canvas
← N for a new puzzle Tap the pad →