I may be wrong on this, but I think that pressing esc while space is held down cancels the button press, like moving the mouse off the key while holding down the click does. I'd need to test this, though.