I'd like to know how to change the behaviors of the power button of the MacBook Pro to have "turn off display" function. (As far as I know, default setting of a single press of the button gives you nothing or switching users depending on situations.)
I noticed a similar question was asked many years ago in the link below.
However, this terminal tip is outdated (press to sleep is not default anymore) and I want to have the display turned off instead of hibernating the whole system or popping up a dialogue. My university Ethernet disconnects any hibernated devices and that's why I'd just like to have the display off (and locked simultaneously).
(I added "turn off display" button at the far-right side of the Touch Bar, but it's definitely a waste of Touch Bar real estate. More Touch Bar space for scribbling videos is desired...)
As I couldn't find anything that satisfies my situations above, let me ask you all. 🙇🏻♂️