binding keys only if there is no modal visible