Enter key has no effect inside vnc console

when i use stuff like nano or vi inside linux vms or micro-vms, the enter key has no effect and i essentially can’t save my work. any solution for that?