Grab keyboard and hide window with Esc