A method of providing user input involves detecting voluntary movement 12 of ear structures by a sensor 1 located in or near to the ear canal 2. Detected motion is communicated to a processor to generate an output which affects the function of a connected device such as triggering an electronic switch or controlling a user interface. Preferably, a voluntary contraction of a middle ear muscle 5b is determined by detecting movement of the tympanic membrane 3 (eardrum) or malleus bone 4. The sensor 1 may be an infra-red camera detecting motion by analysing a two-dimensional image of the surface of the tympanic membrane 3. The sensor 1 may detect change in the three-dimensional structure of the ear drum complex 5a by optical coherence tomography, laser holography or ultrasound. Preferably, the processor determines that movement is voluntary based on the degree and duration of movement. The processor output may adjust hearing aid volume or control the selection of menu items to handle incoming calls from a connected mobile telephone.