Imagine the following vehicle:
At the top, a seat similar to a bicycle or unicycle seat.
Below that, pedals attached to a sproket.
The chain then transmits power to a much smaller sproket, below, which is connected to an electrical alternator.
The alternator is then connected to a charge
controller, which charges the vehicle's batteries.
The batteries supply power for a segway-like system of two motors, two wheels, an accelerometer and a gyroscope.
Just like in a segway (or a eunicycle), one can speed up by leaning forward, and slow down by leaning backwards -- the motors and wheels automatically keep the vehicle balanced.
A torque or force sensor on the column that supports the seat and pedals detects if the rider is leaning to the left or right, and turns the vehicle in the appropriate direction.
Electronic controls under the seat determine how much mechanical resistance (caused by the alternator producing electrical power) the rider will feel as he pedals -- typically, this will be set once, to whatever's most comfortable for the rider, and left there.
Pedalling of course would be optional, since the battery pack could of course be charged by plugging it into a household electrical socket. However, pedalling would of course extend the vehicle's range.