Text this: Decoding and generating synergy-based hand movements using electroencephalography during motor execution and motor imagery