To prevent a Mac from sleeping immediately, move the mouse or press a key on the keyboard to indicate that a user is still present. If you want to make changes to the settings, go to the Energy Saver section ...