j178 / chatgpt

An elegant interactive CLI for ChatGPT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Paste to prompt taking too long

xerenahmed opened this issue · comments

commented

There is chatgpt write animation on prompt when I paste long text so that leaves me waiting

commented

HI, since ctrl+v is a system wide shortcut, a cli program cannot receive a key input like ctrl+v, but a sequnce of characters of the pasted content, , which can be slow and appear as an animation.

To workaround this, I added a alt+v shortcut in #46 . By using alt+v, the program can read contents of clipboard directly, so it will be faster. Coluld this approach solve your problem?

ctrl+v already worked for me (at least in Konsole (in KDE) on Linux).

On Linux, terminals usually use ctrl+shift+v to paste stuff from the clipboard, so it should not conflict with the usage of ctrl+v in this program.

However, on Windows, there might be some cases where ctrl+v is still the system shortcut used to paste from the clipboard.

I'm not against adding alt+v to paste, but I think ctrl-v should be kept. (as of the time of writing this message, it is removed in #46).

(Side note: After wondering why pasting was slow, I came upon this issue, then #46, then I realized ctrl+v was fast and already worked as expected (I used ctrl+shift+v out of habit). It should probably be made clearer that ctrl+v works in this program (at least on Linux), maybe by adding it to the help menu.)

commented

Thanks, I added ctrl+v back.