When I write a document (https://developer.mozilla.org/en/DOM/Event/UIEvent/KeyEvent#Order_of_key_events), I found an inconsistency issue across platforms.
On Windows, CapsLock, NumLock and ScrollLock don't dispatch keypress event.
On Linux, CapsLock, NumLock and ScrollLock dispatch keypress event.
On Mac, CapsLock dispatches only keydown event, NumLock key (without Fn key, i.e., external keyboard's NumLock key) dispatches keydown, keypress and keyup events. NumLock key with Fn key and ScrollLock key don't dispatch any key events.
The CapsLock of Mac doesn't send keyup event is a limitation of platform. I'm not sure the ScrollLock on Mac. But that isn't a matter of this bug.
The main issue of this bug is whether we should dispatch keypress event for these keys or not.
The keys don't generate any characters, so, we shouldn't dispatch keypress event at that time.
Note that NumLock key has been obsoleted on Mac. Please ignore the NumLock issue on Mac mentioned in the comment 0.
This was completely fixed by other bugs.