Fix keyboard speed (fixes issue #1130)

Various fixes to improve the speed when interacting with the on-screen keyboard. Note that I have not yet run a full suite with this fix, however I have run all tests locally that use the keyboard app object. It would be great to get an ad-hoc run from this pull and compare failures with the master branch.

Duration of test_keyboard_basic without this patch
Inari: 121.123s
Desktop: 72.798s

Duration of test_keyboard_basic with this patch
Inari: 61.959s
Desktop: 22.251s