Exit Man opened from the touch bar
It might have to do with the order of keys that you were typing that prevented q from working when you were trying to find the key to exit out of the manual. 

If you press the ESC key it writes to the screen and the last line goes from END to ESC. If you then press q it doesn't close the manual but it will switch it back to END. Press q again and it should exit you out. Keep pressing q.