Question: I'm trying to listen on keydown event on search input field in google's search box
but when I type 'enter' key I can't see any output. Is there any way to handle this?

```
window.addEventListener('keydown', (e) => {
  console.log(e)
})

```

Answer: 
Window doesn't leason for keydown event you have to attach it to your input

```js
document.getElementById('input').addEventListener('keydown',(e) => {
  console.log(e.which)
})
```

```html
<input type="text" id="input">
```
You need check your event, if keydown (example) "Enter" and focus on input, then console.log(e.target.value); // for see your value.