improved waitForUnpress