Locked-in syndrome is classified as having mental awareness but complete paralysis except for up and down eye movements and blinking. In such cases, patients can communicate using simple blinking systems.
However, if all eye movements are lost, as in the case of patients in the study, the condition is referred to as complete locked-in syndrome.
But the new device was able to pick up the changes happening in the brain and read thoughts. All four patients were suffering from ALS - a progressive motor neuron disease that leads to complete destruction of the part of the nervous system responsible for movement.
Scientists asked questions which they already knew the answer to.
The researchers said they were amazed to find that all the participants reported being happy most of the time.
Birbaumer added: "All four had accepted artificial ventilation in order to sustain their life when breathing became impossible so, in a sense, they had already chosen to live.
The research was published in the journal PLOS Biology.