Add some logging about keyboard focus.

This should help with debugging #218 if it occurs again.