fix spacebar capture

fixes #1885