Keynote presentation view
When that occurs, you can move your cursor to the screen with the presenter view (in this case the one that everyone could see); some options will appear, including the ability to swap the displays. This will cause your computer's display to become the presenter display and for the "public" display to just show the slide content.