Sending Shift-Enter not just Enter or Return

I need a snippet that inserts a blank line without submitting the message in the app I’m typing into. This is Claude.ai’s web chat, tested in Firefox, though the behavior doesn’t seem to be specific to that browser.

Three separate observations, all pointing at the same missing feature:

  1. If I use the Enter or Return key Keyboard Macro in the snippet editor, it submits/sends the message instead of just inserting a line break.

  2. If I instead put a literal blank line directly in the snippet content, with no macro at all, that blank line gets stripped out when the snippet expands. It just disappears.

  3. This isn’t unique to TextExpander either. If I copy text containing blank lines from somewhere like Notepad++ and paste it directly into that same app with Ctrl+V, the blank lines get stripped out there too.

Manually pressing Shift+Enter in that app works correctly. It produces a real blank line without submitting anything and without getting stripped. So Shift+Enter is the one input method that actually works, but I can’t find a way to make a snippet send it.

Looking at the Keyboard Macro menu in the snippet editor, the only key press options available are Enter, Esc, Return, and Tab. There’s no option to add a Shift modifier to any of these.

I’m on Windows, so AppleScript isn’t an option for me either.

Is there any way, through a macro, script, or hidden feature, to have a snippet send an actual Shift+Enter keystroke rather than a plain Enter or Return? I need two of these in a row, back to back, within a single snippet.

Any guidance would be appreciated. Thanks!

2 Likes

HI @Amarand ,

I’m so glad we were able to connect via support@textexpander.com!

For anyone following this thread I just wanted to post our solution :slight_smile:

Try a non-breaking space on the “blank” lines. Claude’s input field strips lines that are truly empty, but it keeps lines that contain a character. A non-breaking space looks blank but counts as content.

Here’s how to do it.

  1. In your snippet, click on each blank line between sections
  2. Fill each section by going to the special characters menu
  3. Epand away!
=== Section 1 ===
Text
[non-breaking space goes here]
=== Section 2 ===
Text

I hope you have a great day!

All the best,
-Nick