In 2009, a man named Barry Beck suffered a series of strokes, which caused extensive damage to his right occipital lobe and to the brain stem. The geologist and author of several books was left completely unable to communicate, in a state known as locked-in syndrome.

The condition was famously described by Jean-Dominique Bauby in his memoir The Diving Bell And The Butterfly, which he dictated by blinking.

But thanks to a team of researchers and some technological advances, Beck had another option.

"When I first saw him, he had a little bit of eye movement and that was really the only way he could communicate," says Eric Sellers, who directs the Brain-Computer Interface Laboratory at East Tennessee State University. His lab studies how brain activity can be measured and used to control computers, helping people with severe motor disabilities to communicate.

Beck's wife heard about Sellers' research and contacted him. Ten months after Beck's strokes, Sellers and his team start started working with the patient, setting him up with a brain-computer interface.

Sellers describes the technology as a virtual keyboard: "It's basically, instead of using your hands to press keys on the keyboard, you're using brain waves to press the keys."

To use the system, you wear a non-invasive electrode cap and sit in front of a monitor that has a picture of the keyboard. Groups of letters will flash at random.

"If you want to choose the A, you pay attention to the A and then every time the A flashes, your brain produces this response," Sellers explains.

That response is called a P300. "This P300 is like an 'aha' response, so your brain kind of says, 'Aha, that's the one I want to select.' "

The technology has been used to help people with Lou Gehrig's disease compose messages. It's also allowed people to control wheelchairs and prosthetic limbs, just by thinking.

But Beck was one of the first patients with a severe brainstem injury to use it successfully. Sellers' research about his work with Beck was published in October in the journal Science Translational Medicine.

Sellers and his team started slow, with just four letters — Y for yes, N for no, P for pass, and E for end.

"The first major interaction we had was a 25-question dialogue that ended up in us determining that he wanted more information regarding his prognosis," Sellers says.

Once they knew he was able to use that, they fine-tuned the settings and eventually presented him with the full alphabet so he could spell out words.

"One of the first messages that he spelled was to his wife. He spelled out 'Thank you for all of your hard work,' " Sellers says. "He, on a couple of occasions, also asked me to make the system go faster. And I, of course, told him that I was trying — I'm doing my best."

Still, the system is very slow. It took Beck 38 seconds to select each character.

Much of Sellers' research is focused on making the machine faster and more accurate; his lab has experimented with predictive spelling programs, like those found in many smartphones, which anticipate what words the user is trying to spell.

But for Beck, the painstaking task was worth it.

"In addition to helping him communicate, it was also something that gave his wife a lot of satisfaction knowing that he was still in there and for the most part, cognitively intact. His kids would visit while he used the BCI, so it had a really large effect on the family as well."

Sellers and his team worked with Beck for over 13 months, conducting therapy sessions in the nursing home where he lived.

Beck died in November 2011, at the age of 67. In those months before he died, he helped contribute to making this technology more accessible for other locked-in patients.

"For the people who are participating in our research program, they understand that they may not benefit from this technology, but they also realize how important it could be for people who are in similar situations," says Sellers.

Sellers imagines a future where BCIs are available in hospitals.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.