KeyboardEvent code Property
Return the key that was pressed:
Definition and Usage
The code property returns the key that triggered the event.
Note: This property returns different values for different keyboard layouts.
Tip: To make sure you return the correct character, use
|Return Value:||A String, representing the key that was pressed|
HTML DOM reference: KeyboardEvent key Property
HTML DOM reference: KeyboardEvent charCode Property
HTML DOM reference: KeyboardEvent keyCode Property