How to dim screen on Mac before going to sleep
…so that I can hit a key to keep it unlocked if desired. Currently, there is no way to keep it from locking if it's started to turn off the screen.


It sounds like you don't need the old dimming action so much as you need a delay on the password lock following sleep or screensaver. 

Open "System Preferences → Security &amp; Privacy → General", and change the "Require password … after sleep or screen saver begins" dropdown from "immediately" to "5 seconds" or "1 minute" or longer even.