In addition, there is a keypress event that is similar to the keydown event, but cannot be mixed. The difference between keydown and keypress is:
1 Only character keys can trigger the keypress event, and any key can trigger the keydown event. For example: F1-F12, direction keys, etc. can only use keydown.
2 keydown returns the keyboard code, keypress returns the ASCII character, taking the character a as an example, keydown returns 65, and keypress returns 97.
If you want to detect Ctrl, Shift and other key combinations to determine whether these objects are true: e.shiftKey, e.ctrlKey