A surgical device including a surgical generator configured to provide energy for an energy based surgical instrument; a functional device configured to provide a function in its activated state; a switch for activating and deactivating the surgical generator a capacitive sensor including at least one measuring electrode that is arranged at the switch, wherein the capacitive sensor is configured to measure a capacity change or a capacity at the measuring electrode and activate or deactivate the functional device as a function of a measured capacity change or capacity.