Fixed widget's key event handling.
Added some more Javadocs.