Documentation work.
Fixed hidden cursor mode for focus events.
Put synthetic key releases after defocus event.

This allows the application to separate actual from synthetic key
release events.