Pressing enter no longer submits

I have to manually click the little paper airplane to submit my prompt. Enter no longer works. I tried a lot of stuff, even clearing my cache. I’m going to try restarting my browser/computer next, but this seems to keep coming back.

At first this seemed to be intermittent but now it just flat out doesn’t work.

3 Likes

Same here, but… if my browser window is full screen, it works just fine. If my browser is resized / or on mobile, it doesn’t work. I can only assume it is a protection against accidentally submitting by hitting enter on mobile, but having the ability to customize this would be great!

5 Likes

I’ve just tried on Edge Dev, it seems that return to send does not work when you reduce the width of your browser window until the sidebar on the left disappears.
When you increase the width such that it appears again return to send works again. I agree, that return to send should be the standard on any size screen, because often i just have ChatGPT open in the Edge sidebar to not take up to much screen estate whilst doing some research on the web.

4 Likes

That’s it! Man this has been driving me nuts. As it happens, I usually resize ChatGPT just to where that sidebar disappears because I can’t find any other way to make it disappear. It’s funny because resizing it to this point actually gets you the WIDEST POSSIBLE chat line width (no matter how wide you make the window, line width will always be smaller than at this just-small-enough-to-collapse-sidebar width).

I hope they make the UI better. They made some awful design choices… but at least now I know why I can’t hit enter to send. Thanks guys!

2 Likes

+100 to this feature request

For my multi-tasking workflow, I keep a small ChatGPT window on the side of my main window (e.g. writing a doc), and it’s really frustrating to keep moving my mouse to submit queries.

Here’s a really simple solution to this problem (which is already used by several apps including this forum where I am typing this message): use “ctrl+enter” or “cmd+enter” to send.

3 Likes

I have been having the same issue. I tried everything and nothing works.

2 Likes

Hello. This was a big problem for me. I solved it with this Tampermonkey script: when Ctrl+Enter is pressed, it clicks the button by identifying it with its class. Maybe it works for you too.

3 Likes

Had this issue as well, I tried the commenter’s above mine approach but I’m not sure if I’m too dumb or if the script was outdated but it didn’t work strangely enough. So I just described the issue to ChatGPT (GPT-4) who came up with the following solution, which pleasantly did work.

  1. Install AutoControl Shortcut Manager extension for Chrome from the Chrome Web Store: https://chrome.google.com/webstore/detail/autocontrol-shortcut-mana/lkaihdpfpifdlgoapbfocpmekbokmcfd
  2. After installing, click on the extension icon and select “Options.”
  3. Click on “Add new shortcut.”
  4. Fill in the form with the following details:
  • Name: Button Clicker
  • Description: Clicks a button when you press Ctrl+Enter
  • Trigger: Keyboard Shortcut > Ctrl+Enter
  • Action: Run JavaScript > Paste the code provided below
  1. Click on “Save” to save your new shortcut.

Here’s the JavaScript code to paste into the “Run JavaScript” field:

javascriptCopy code

(function() {
    var button = document.querySelector('button[class="absolute p-1 rounded-md text-gray-500 bottom-1.5 md:bottom-2.5 hover:bg-gray-100 enabled:dark:hover:text-gray-400 dark:hover:bg-gray-900 disabled:hover:bg-transparent dark:disabled:hover:bg-transparent right-1 md:right-2 disabled:opacity-40"]');
    if (button) {
        var rect = button.getBoundingClientRect();
        var x = rect.left + (rect.width / 2);
        var y = rect.top + (rect.height / 2);
        var clickEvent = new MouseEvent('click', {
            view: window,
            bubbles: true,
            cancelable: true,
            clientX: x,
            clientY: y
        });
        button.dispatchEvent(clickEvent);
    }
})();
2 Likes

Btw, you can simplify the query selector quite a bit here (form button). This should make the script more robust to changes in e.g. styling that OpenAI could make. This binds to metaKey (or cmd-enter on mac)

(function () {
    'use strict';
    document.addEventListener('keydown', function (event) {
        console.log("hello world")
        if (event.metaKey && event.key === 'Enter') {
            event.preventDefault();
            dispatchSubmit()
        }
    });

    function dispatchSubmit() {
        const button = document.querySelector('form button');

        if (button) {
            const rect = button.getBoundingClientRect();
            const x = rect.left + (rect.width / 2);
            const y = rect.top + (rect.height / 2);
            const clickEvent = new MouseEvent('click', {
                view: window,
                bubbles: true,
                cancelable: true,
                clientX: x,
                clientY: y
            });
            button.dispatchEvent(clickEvent);
        }
    }
})();
1 Like

I want the exact opposite. I want to hit enter to go to the next line to continue my prompt like adding numbers or more data. I hit return on my iPad and sometimes it returns to the next line and sometimes it submits a halfway typed prompt.

It’s probably some kind of crashed JavaScript issue. See if you can verify the problem with different browser profile, different browser and with/without browser plugins.
There might be something about it also in the javascript console.

I have two problems when using chatgpt 1.Pressing enter no longer submits,2.Unable to load history

Same. We have shift-enter for going into the next line. We dont need the system to prevent us to press enter for submitting.
I think what they could do is to detect whether or not there is a fullstop/questionmark at the end before submitting.

This is so annoying. If I use a tampermonkey script to submit, it works the first time, but on the next message complains about a double submit, even though it never submits itself, (when resized to not show the chat history).

For those using userscripts, I’ve crafted a compact extension specifically for this problem that vexed me today, leading me to invest time rectifying it. Ironically, more time was devoted to detailing and documenting the problem at hand than the actual coding process.

Here it is: ChatGPT: Fix Enter Key on Small Sizes

1 Like

Cvladan, that is great! Thank you.

Actually, the Ctrl+Shift+Enter wasn’t working for me, and I found that if I click the new chat button manually the new chat doesn’t have Ctrl+Enter functioning. I had a little fiddle, but I’m not JavaScript/front-end guy so didn’t know how to fix it.

The easiest way to submit with the keyboard is just TAB + Enter. TAB switches to the next input element, which is basically the “Send message” button and Enter submits it.

4 Likes

This worked for me to prevent submit on “enter” alone:

search for chatgpt-ctrl-enter-send-and-enter-new-line, which is a greasyfork script. Problem solved.

Your solution is tab + enter[quote=“methodician, post:1, topic:52333, full:true”]
I have to manually click the little paper airplane to submit my prompt. Enter no longer works. I tried a lot of stuff, even clearing my cache. I’m going to try restarting my browser/computer next, but this seems to keep coming back.

At first this seemed to be intermittent but now it just flat out doesn’t work.
[/quote]