In general, if you're stuck in a minor mode that you don't know the name of, you can run:
M-x describe-mode
This will list all currently active major and minor modes, with a description of each. From this, you should be able to figure out which one you need to deactivate.