The KeyboardEvent.getModifierState() method returns the current state of the specified modifier key: true if the modifier is active (that is the modifier key is pressed or locked), otherwise, false.
The KeyboardEvent.altKey read-only property is a Boolean indicates if the alt key (Option or ⌥ on OS X) was pressed (true) or not (false) when the event occured.
The KeyboardEvent.code property represents a physical key on the keyboard (as opposed to the character generated by pressing the key). In other words, this property returns a value which isn't altered by keyboard layout or the state of the modifier keys.
The KeyboardEvent.ctrlKey read-only property returns a Boolean that indicates if the control key was pressed (true) or not (false) when the event occured.
The KeyboardEvent.isComposing read-only property returns a Boolean value indicating if the event is fired after compositionstart and before compositionend.