There is a bug in the example 'Keypad' widget linked from Web Developer's Library here:

Reported values for key events 'onkeydown' and 'onkeypress' are swapped - leading to a possible confusion.
Well, at least I was confused when debugging my widget and getting wrong results.

Anyway, the fastest way to fix this is to swap lines
<div class="status1">onkeydown event</div>
<div class="status1">onkeypress event</div>
in enclosed 'widget.html'

If somebody sets out to fix this widget, they might as well remove unnecessary extra files 'Thumbs.db' and 'Keypad.wgz' (yes, a widget inside a widget :-) ) from the archive.