Terminal Emulator - Trasnmit or F15 not working

I am working on Terminal Emulator, use case is I have to edit the file and then move out of the file using “quit” command or using F15 followed by trasnmit.
None of the options are working due to this when I am logging to the MainFrame system next time it is stuck as file is in edit mode(I have to manually close it and proceed)
Appreciate if someone can guide me, i have used below activities

Any takeaways for this?
May I get solution here
After quit command, in certain position followed by Transmit(which is enter) returning my cursor again at original position from where I have type quit

Looks like Terminal emulator which is getting launch from UI path not able to handle edit file case
Is there any other way to handle the case of file is in edit mode and move out of the file
tried with quit command followed by transmit send control keys but still it is in edit mode.

@Amol_Datar1

Try with send keys and send [enter] instead of transmit

Cheers

tried with below options
image

with this option on Terminal emulator it shows as quit[enter] still file is in edit mode.