Wait for keyboard before typing.

Alternative fix for #340.