In Terminal, how to exit the two fingers history scrolling mode?
If you want to exit the history scrolling mode and switch to the command output scrolling mode go to the menu View -&gt; Hide Alternate Screen.

If you want to exit the command output scrolling mode and switch to the history output scrolling mode go to the menu View -&gt; Show Alternate Screen.

When you are in history scrolling mode holding Shift allows you to scroll the command output. The reverse is not true.

This whole behavior can be disabled in 

Terminal -&gt; Preferences... -&gt; Profiles -&gt; Keyboard

by unchecking Scroll alternate screen

Under the checkbox, it's indicated:


  When the alternate screen is displayed, send input instead of scrolling the terminal view. Press Shift to temporarily reverse this setting.


I still don't know how the history scrolling mode is sometimes accidentally activated.