The primary motor and primary somatosensory areas of the brain are involved in controlling immediate motor movements in real-time, while the premotor area appears to control planned, sequential movements as well as reacting to and adjusting the sequence when faced with unexpected changes.
The anterior lateral motor cortex appears to play a significant role in context-based decision making.
Researchers have developed a BMI that allows primates to control a robotic wheelchair with their thoughts alone.