Mac is flashing screen when pressing keys

Solution 1:

I think there's an option in System Preferences. Go toSystem Preferences > Accessibility > Audio and uncheck the box that says Flash the screen when an alert occurs.

Hope this helped!