Remocode
Telegram Remote3 min read

Submit and Enter: Sending Keystrokes to Your Terminal Remotely

How to use Remocode's submit and enter commands to send a standalone Enter keypress to your terminal from Telegram. Essential for stuck prompts and unsubmitted input.

submitenterkeypressterminaltelegramremocode

The Simplest Yet Most Useful Command

The submit command (aliased as enter) does exactly one thing: it sends an Enter keypress to your terminal. No text, no special characters, just Enter.

This sounds trivial, but it solves a surprisingly common problem in remote terminal workflows.

Why You Need a Standalone Enter Key

When AI coding agents present prompts, the expected response is sometimes just pressing Enter to accept a default value or continue. From your desk keyboard, this is effortless. From Telegram, you cannot send an "empty message" — Telegram requires at least one character.

The submit command bridges this gap. It sends the keypress that Telegram's interface does not support sending on its own.

Common Use Cases

Accepting default values — Many CLI tools present prompts like Continue? [Y/n] where pressing Enter accepts the default (Yes in this case). Send submit to accept.

Unblocking stuck prompts — Sometimes an AI agent is waiting for a final Enter keypress after you already sent your response text. If peek shows your text is in the buffer but it has not been submitted, submit pushes it through.

Scrolling through output — Some terminal programs use Enter to advance through paginated output (like less or more). Send submit to advance to the next page.

Confirming multi-step prompts — Installation scripts and configuration wizards often have a series of prompts where Enter confirms each step. Submit lets you step through them remotely.

Using Submit in Via Mode

While in via mode, use the escape prefix:

!submit

or

!enter

This sends the Enter keypress without leaving via mode and without typing "submit" into the terminal.

Submit vs. Sending a Space

You might think sending a space character achieves the same result. It does not. A space character followed by Enter sends " \n" (space + newline) to the terminal, which many programs interpret differently from a bare "\n" (newline). Using submit ensures you send exactly one Enter keypress with no preceding characters.

The Peek-Submit Workflow

The most effective pattern combines peek and submit:

  • Send input via Telegram or via mode.
  • Wait for a response. If none comes after 30 seconds, use peek.
  • If peek confirms your text is in the buffer, send submit to push Enter.
  • The input is submitted and the terminal responds.

This two-step diagnostic approach prevents the common mistake of retyping input that was already in the buffer, which would result in doubled text being sent to the application.

Timing Considerations

Submit sends the Enter keypress immediately, on the next polling cycle. There is no retry logic for submit because it is a single keypress, not a text-plus-Enter sequence. If the terminal application is in a state where it cannot receive input (for example, during a redraw cycle), the keypress may be buffered by the operating system's terminal layer and delivered when the application is ready.

The submit command is a small tool that fills a specific gap in the remote terminal experience. You will not use it every day, but when you need it, nothing else works as cleanly.

Ready to try Remocode?

Start with a 7-day Pro trial — no credit card required. Download now and start coding with AI from anywhere.

Download Remocodefor macOS

Related Articles