chatgpt-mac icon indicating copy to clipboard operation
chatgpt-mac copied to clipboard

'Enter' key is interpreted as a new line instead of the end of the prompt.

Open slimjimo opened this issue 2 years ago • 20 comments

slimjimo avatar Jan 26 '23 04:01 slimjimo

It can also be a key combination like shift+enter

ertoorule avatar Jan 27 '23 23:01 ertoorule

Yep, both the enter key and shift+enter are interpreted as starting a new line. No key/key combination on my keyboard allows for me to signal the end of the prompt, meaning I have to manually click the send button.

slimjimo avatar Jan 28 '23 02:01 slimjimo

I'm seeing the same behaviour. This was not the case just a few days ago, which leads me to think this is a bug.

aaajhs avatar Jan 28 '23 04:01 aaajhs

what do we do now?

jnsw avatar Feb 02 '23 11:02 jnsw

Wait for the developer to fix it, although this project seems abandoned as of now. Maybe a fork or PR can do the trick.

kleineluka avatar Feb 02 '23 22:02 kleineluka

For now you can use tab to highlight the send button and then press enter.

olerap avatar Feb 13 '23 09:02 olerap

this annoys me too, hope to fix it soon.

vincentor avatar Feb 15 '23 06:02 vincentor

to save someone some time just throw this in right at the top of before-input-event event:

        if (input.type !== "keyDown" && key == "Enter") {
          // press main > form > button
          contents.executeJavaScript(
            `document.querySelector('main form button').click()`
          );
        }

This is due to the ChatGPT mobile wanting to ensure Enter keypresses default to multi-line input.

eddiewang avatar Feb 18 '23 20:02 eddiewang

to save someone some time just throw this in right at the top of before-input-event event:

        if (input.type !== "keyDown" && key == "Enter") {
          // press main > form > button
          contents.executeJavaScript(
            `document.querySelector('main form button').click()`
          );
        }

This is due to the ChatGPT mobile wanting to ensure Enter keypresses default to multi-line input.

Where? Can this be done by the end user?

paulmoons avatar Feb 21 '23 12:02 paulmoons

to save someone some time just throw this in right at the top of before-input-event event:

        if (input.type !== "keyDown" && key == "Enter") {
          // press main > form > button
          contents.executeJavaScript(
            `document.querySelector('main form button').click()`
          );
        }

This is due to the ChatGPT mobile wanting to ensure Enter keypresses default to multi-line input.

Put this in the index.js in the before-input-event and delete the forge.config.js file. It generates an error while running locally.

I just created an automator application that runs the app with npm run start and changed the app icon. Works perfectly now

https://user-images.githubusercontent.com/56012931/220539070-c9041497-63ea-487b-b74c-671a87431bca.mp4

AccessRetrieved avatar Feb 22 '23 06:02 AccessRetrieved

to save someone some time just throw this in right at the top of before-input-event event:

        if (input.type !== "keyDown" && key == "Enter") {
          // press main > form > button
          contents.executeJavaScript(
            `document.querySelector('main form button').click()`
          );
        }

This is due to the ChatGPT mobile wanting to ensure Enter keypresses default to multi-line input.

Where? Can this be done by the end user?

Download the repo and run it locally.

AccessRetrieved avatar Feb 22 '23 06:02 AccessRetrieved

Unfortunately, this is beyond my scope. I was hoping for something a little more userland. Ugh. Hopefully the author can apply the fix.

to save someone some time just throw this in right at the top of before-input-event event:

        if (input.type !== "keyDown" && key == "Enter") {
          // press main > form > button
          contents.executeJavaScript(
            `document.querySelector('main form button').click()`
          );
        }

This is due to the ChatGPT mobile wanting to ensure Enter keypresses default to multi-line input.

Put this in the index.js in the before-input-event and delete the forge.config.js file. It generates an error while running locally.

I just created an automator application that runs the app with npm run start and changed the app icon. Works perfectly now

paulmoons avatar Feb 22 '23 12:02 paulmoons

@paulmoons I created a MR for this here #92 - if the maintainer merges and rebuilds, this should fix any issues you have with the Enter key.

Hopefully this helps!

eddiewang avatar Feb 22 '23 16:02 eddiewang

@paulmoons I created a MR for this here #92 - if the maintainer merges and rebuilds, this should fix any issues you have with the Enter key.

Hopefully this helps!

Thanks!

paulmoons avatar Feb 22 '23 22:02 paulmoons

No Code Solution:

https://user-images.githubusercontent.com/56598150/221528888-f3e42203-22fe-4328-ab3b-61aa3eac931b.mov

Midicii avatar Feb 27 '23 09:02 Midicii

No Code Solution:

Yeah, thanks. It's a nice solution but it needs to be applied every time the app starts as the screen size isn't remembered. Thanks though!

paulmoons avatar Feb 27 '23 09:02 paulmoons

No Code Solution:

you're really a genius.

ssapsu avatar Mar 01 '23 11:03 ssapsu

ChatGPT-Box.dmg

It supports custom enable and send shortcut keys.

gmshrek avatar Mar 02 '23 14:03 gmshrek

Solution is here folks: https://goodsnooze.gumroad.com/l/menugpt

paulmoons avatar Mar 05 '23 13:03 paulmoons

There's another no-code solution: I've been using this key combination like Command + Enter. It works for me.

katzkuma avatar Aug 11 '23 06:08 katzkuma