keyDown and keyUp are what you should be using. `keyPress` is not recommended according to MDN
keyDown
keyUp
To know which key was pressed, use key.
key
The possible values for `key` are listed in the first column from MDN Key Values page.