Restructured keypress event handling.
Added play/pause key detection for entry pages.