The BrainGate system uses electrodes implanted in the brain to register the user’s intended movements, and translates those neural signals into commands for a computer cursor.
Article about the tech: http://spectrum.ieee.org/tech-talk/biomedical/bionics/better-brainreading-software-compensates-for-squishy-brains-and-vacuum-cleaner-noise