KeyboardEvent altKey Property in JavaScript
KeyboardEvent altKey Property in JavaScript
The altKey property is a read-only property and it is used to return a Boolean value that indicates whether the ALT key was pressed when a key event was triggered or not. On Mac, it is sometimes replaced with Option or Opt Key.
Syntax:-
Its syntax is:- event.altKey
Return:-
Its return is:- true if the ALT key is pressed else false