DEV Community

Ojyawamaru
Ojyawamaru

Posted on

Prevent Accidental Sends on Mac! How I Built "EnterGuard" with Gemini (Hold Enter to Send)

Intro: Do You Fear the Enter Key? 😱

Do you ever find yourself accidentally hitting Enter and sending a message before you're finished typing on Slack, Discord, or LINE?

It happens to me all the time lol. I try to create a new line like I do on my smartphone, but—bam!—message sent.
The worst moment was during an important Zoom meeting, when I accidentally fired off a half-written message in the real-time chat. It was so awkward.

Also, as a heavy AI user, accidentally sending an incomplete prompt to ChatGPT or Gemini is a nightmare. It ruins the context, the AI starts answering a half-finished question, and it’s incredibly stressful.

I searched everywhere for a solution, but the only answer I found online was:

"Just get used to hitting Shift + Enter."

But I couldn't get used to it. That's just not how my brain works lol.
Since I couldn't find a tool that solved this, I thought, "If it doesn't exist, why not build it myself?"

I'm an architecture student, not a coder. I can't write a single line of code from scratch.
So, I teamed up with Gemini Pro, bounced ideas back and forth, and built this Mac app.

Meet "EnterGuard" 🛡️

Here is the menu bar app I built.

EnterGuard Demo

It's Simple

I changed the behavior of the Enter key:

  • Tap Enter = ↵ New Line (Confirm)
  • Hold Enter = ➤ Send

That's it.
But this simple change completely eliminated the fear of accidental sends.
It works globally on macOS, including Slack, Discord, LINE, Messenger, and browser-based chats (and of course, AI interfaces).

Download for Free 📥

It is completely free to use. If you share this frustration, please give it a try!

👉 Download EnterGuard on Gumroad


Behind the Scenes: Pair Programming with Gemini

Here’s a little backstory on how a non-engineer built this.

Prompt Engineering = Architectural Design?

I have zero coding knowledge, but I felt that the process of "prompting" Gemini was surprisingly similar to the architectural design process.

  1. Requirement Definition: Verbalize exactly "what I want."
  2. Structuring Conditions: Design the order in which necessary conditions are assembled to achieve that.
  3. Correction: When an error occurs, feed the log directly to AI and say, "Fix it like this."
  4. Implementation: Paste the generated code, check the behavior, provide feedback, and refine it step by step.

Initially, I tried to run it with Python, but based on Gemini's advice, we switched to Swift and made it a menu bar resident app. We shaped it together through dialogue.

About the Source Code

Since the code was generated with Gemini, I haven't open-sourced the code itself yet, but I've created a project home on GitHub to verify that this is a legitimate project (and not a suspicious app).

📂 GitHub Repository

Wrapping Up

I hope this small tool helps reduce the "accidental send" stress, even if just a little.

If you have any feedback or find any bugs, please let me know in the comments!

Top comments (0)