How To Ignore All Keyboard & Mouse Input / Modal Overlay?

How can I implement a blocking overlay which stops all mouse/keyboard input to a web page being shown?
Or how to block/ignore all input at certain times so a user does not click or interact with anything on a web page being browsed?

You could create a

that covers everything you don’t want to be touched with position: absolute, left: 0 and top: 0. This way no event listeners for the elements behind the div will be triggered. Is that what you’re looking for?