added options to disable keyboard grabbing