In MacOS, is there a way to prevent unwanted input when the screen is locked?
Did you set your Mac to lock by going to System Preferences &gt; Security &amp; Privacy &gt; General, and then select Require Password, as shown below?