Double-clicking the left mouse button on an empty inventory or chest slot. Typing out a new /sort or /sortme command. If you have the Mod Menu mod installed, you will be able to see other settings ...