Workshop › Connect Four › Step 17 of 38
A faster way to play: the number keys 1 to 7 drop a disc straight into that column.
```js
if (event.key >= '1' && event.key <= '7') hoverCol = Number(event.key) - 1
if (event.key === ' ' || event.key === 'Enter' || (event.key >= '1' && event.key <= '7')) {
```event.key >= '1' && event.key <= '7' is true for the keys 1 to 7.Number('3') - 1 is 2: columns are counted from 0.ArrowRight line write the number line.|| (event.key >= '1' && event.key <= '7') to the drop condition.Skills: Keyboard and mouse input
← Playing with the keyboard A disc on its way →