Moved space bar press handling code to handleDocumentKeyDownEvents() for more immediate response when flipping cards in study mode.