Set input focus instead of grabbing keyboard

This should fix #16 and fix #8