For keys uses KeyboardEvent.key. For mouse buttons it will label them Button x where x is MouseEvent.button, and for the mouse wheel, WheelEvent.deltaY is used to label them Wheel Up/Wheel Down.
This is intended to be used for labeling keys as they are pressed or as a fallback to labelWithKeyboardMap. See it for the recommended labeling strategy.
A filter can be provided to avoid labeling some keys.
Labels keys using events.
For keys uses
KeyboardEvent.key
. For mouse buttons it will label themButton x
where x isMouseEvent.button
, and for the mouse wheel,WheelEvent.deltaY
is used to label themWheel Up
/Wheel Down
.This is intended to be used for labeling keys as they are pressed or as a fallback to labelWithKeyboardMap. See it for the recommended labeling strategy.
A filter can be provided to avoid labeling some keys.