Make virtual keyboard play nice with a real one

Closes #38