Nowadays, for instance Hall and Obstacle sensors are increasingly used as a 'contactless' replacement for traditional push buttons. An alternative to human-operated switches or push buttons could also be a touch switch. A big advantace of the TTP223 Touch Switch Sensor, is that it be used directly in digital circuits without 'interference'.
More information about this project on https://www.whizzbizz.com/en/ttp223-touch-switch-sensor