Switches and push buttons need debouncing. It is straightforward to do this with software, using a library. The advantages of the Switch library are: External pull-up resistors are not required.
I was looking for a simple solution to trigger functions of a web application by not using a normal keyboard or mouse. My main use case is a badminton tournament ...