Question: what does command q do on mac?
Answer: Control-Command-Q: Immediately lock your screen. Shift-Command-Q: Log out of your macOS user account. You will be asked to confirm. To log out immediately without confirming, press Option-Shift-Command-Q.