A system for sharing an electrode between gesture detection and touch detection comprising: a capacitive touch controller configured to detect a touch at a particular location using a single touch electrode, a three-dimensional gesture detection controller configured to detect a three-dimensional gesture made by an object using at least one transmission electrode and at least three detection electrodes, a capacitive sensor having at least one first and at least one second electrode, wherein the at least one first electrode forms the at least one transmission electrode and is coupled with a controllable generator for supplying an AC signal to said first electrode and wherein the second electrode is shared between the capacitive touch controller and the three-dimensional gesture detection controller; and a configurable coupling between the at least one second electrode, an input of the touch controller and an input of the gesture detection controller, wherein in a first configuration mode, the configurable coupling is configured to allow the system to perform a touch detection by evaluating a capacitance of said second electrode by the touch controller and wherein said controllable generator is turned off and in which the input of the touch controller is coupled with the second electrode and, in a second configuration mode, to use signals received from said second electrode for a three-dimensional gesture detection by the gesture detection controller wherein said controllable generator is turned on and said second electrode is coupled with the gesture detection controller and is used as one of the at least three detection electrodes. a capacitive touch controller configured to detect a touch at a particular location using a single touch electrode, a three-dimensional gesture detection controller configured to detect a three-dimensional gesture made by an object using at least one transmission electrode and at least three detection electrodes, a capacitive sensor having at least one first and at least one second electrode, wherein the at least one first electrode forms the at least one transmission electrode and is coupled with a controllable generator for supplying an AC signal to said first electrode and wherein the second electrode is shared between the capacitive touch controller and the three-dimensional gesture detection controller; and a configurable coupling between the at least one second electrode, an input of the touch controller and an input of the gesture detection controller, wherein in a first configuration mode, the configurable coupling is configured to allow the system to perform a touch detection by evaluating a capacitance of said second electrode by the touch controller and wherein said controllable generator is turned off and in which the input of the touch controller is coupled with the second electrode and, in a second configuration mode, to use signals received from said second electrode for a three-dimensional gesture detection by the gesture detection controller wherein said controllable generator is turned on and said second electrode is coupled with the gesture detection controller and is used as one of the at least three detection electrodes.