A shortcut key in ChatGPT to navigate quickly to the beginning of the previous answer or question in the current chat session

Dear Platform/Support Team,

I hope this message finds you well.

I would like to request a new feature for ChatGPT that would greatly enhance user navigation. Specifically, I am requesting the addition of a shortcut key that allows users to quickly jump/snap to the beginning of the previous answer or question within the current chat session.

Currently, navigating through long conversations can be cumbersome, and having a shortcut key for this purpose would significantly improve the user experience by making it easier to reference and review earlier parts of the conversation.

I appreciate your consideration of this feature request and look forward to any updates you can provide.

Thank you for your time and attention.

Best regards,
Imraan

Absolutely this. As a possible temporary solution, try to create a new bookmark in your browser. In the link section type in this javascript.

javascript:(function(){const e=document.querySelectorAll('body > div.relative.flex.h-full.w-full.overflow-hidden.transition-colors.z-0 > div.relative.flex.h-full.max-w-full.flex-1.flex-col.overflow-hidden > main > div.composer-parent.flex.h-full.flex-col.focus-visible\\:outline-0 > div.flex-1.overflow-hidden.\\@container\\/thread > div > div > div > div > article');if(e.length>0){const l=e[e.length-1];l.scrollIntoView();}})();

This will scroll immediately to the last answer.

Enjoy

Hi prince.sendai

Thanks a ton for this! I had no idea something like this existed, and it worked like a charm. :blush:

I took your script and tweaked it a bit to give me even more flexibility. Now I’ve got two bookmarks—one to jump to the next question and one to go back to the previous one. It’s working perfectly!

Next Question

javascript:(function(){const questions=document.querySelectorAll(‘body > div.relative.flex.h-full.w-full.overflow-hidden.transition-colors.z-0 > div.relative.flex.h-full.max-w-full.flex-1.flex-col.overflow-hidden > main > div.composer-parent.flex.h-full.flex-col.focus-visible\:outline-0 > div.flex-1.overflow-hidden.\@container\/thread > div > div > div > div > article’);if(questions.length>0){let currentIndex=Array.from(questions).findIndex(el=>el.hasAttribute(‘data-current’));if(currentIndex===-1){currentIndex=-1;}const nextIndex=currentIndex+1;if(nextIndex<questions.length){questions.forEach(el=>el.removeAttribute(‘data-current’));const nextQuestion=questions[nextIndex];nextQuestion.setAttribute(‘data-current’,‘true’);nextQuestion.scrollIntoView();}else{alert(“You’re already at the last question!”);}}})();

Previous question:

javascript:(function(){const questions=document.querySelectorAll(‘body > div.relative.flex.h-full.w-full.overflow-hidden.transition-colors.z-0 > div.relative.flex.h-full.max-w-full.flex-1.flex-col.overflow-hidden > main > div.composer-parent.flex.h-full.flex-col.focus-visible\:outline-0 > div.flex-1.overflow-hidden.\@container\/thread > div > div > div > div > article’);if(questions.length>0){let currentIndex=Array.from(questions).findIndex(el=>el.hasAttribute(‘data-current’));if(currentIndex===-1){currentIndex=questions.length;}const previousIndex=currentIndex-1;if(previousIndex>=0){questions.forEach(el=>el.removeAttribute(‘data-current’));const previousQuestion=questions[previousIndex];previousQuestion.setAttribute(‘data-current’,‘true’);previousQuestion.scrollIntoView();}else{alert(“You’re already at the first question!”);}}})();

Once again, thanks so much! Your response has seriously leveled up my ChatGPT experience. Much appreciated! :pray:

One simple way to achieve something similar is to number your questions, eg. Q1 , Q2, etc. Then you can use the search function to find your questions. Also, you can ask ChatGPT to number its answers in a similar fashion and even give a general rule like that under a project, but as for now, the latter doesn’t work with every ChatGPT model.

It looks like it does not work anymore (using chrome)

Looks like there were some changes to the html or something, but here’s updated javascript that is currently working for me :

Next Question

javascript:(function(){  const messages = document.querySelectorAll('div.bg-token-message-surface');  if (messages.length > 0) {    let currentIndex = Array.from(messages).findIndex(el => el.hasAttribute('data-current'));    if (currentIndex === -1) currentIndex = -1;    const nextIndex = currentIndex + 1;    if (nextIndex < messages.length) {      messages.forEach(el => el.removeAttribute('data-current'));      const nextMessage = messages[nextIndex];      nextMessage.setAttribute('data-current', 'true');      nextMessage.scrollIntoView({ behavior: 'smooth', block: 'start' });  nextMessage.style.outline = '3px solid #10b981'; nextMessage.style.boxShadow = '0 0 15px rgba(16,185,129,0.6)';      nextMessage.style.transition = 'outline 0.3s, box-shadow 0.3s';  } else {      alert("You're already at the last message!");    }  }})();

Previous Question:

javascript:(function(){  const messages = document.querySelectorAll('div.bg-token-message-surface');  if (messages.length > 0) {    let currentIndex = Array.from(messages).findIndex(el => el.hasAttribute('data-current'));    if (currentIndex === -1) currentIndex = messages.length;    const previousIndex = currentIndex - 1;    if (previousIndex >= 0) {      messages.forEach(el => el.removeAttribute('data-current'));      const prevMessage = messages[previousIndex];      prevMessage.setAttribute('data-current', 'true');      prevMessage.scrollIntoView({ behavior: 'smooth', block: 'start' });  prevMessage.style.outline = '3px solid #3b82f6'; prevMessage.style.boxShadow = '0 0 15px rgba(59,130,246,0.6)';      prevMessage.style.transition = 'outline 0.3s, box-shadow 0.3s';   } else {      alert("You're already at the first message!");    }  }})();

Shift + :up_arrow:/:down_arrow:.
ITS NOW A SHORTCUT KEY IN CHATGPT ?!!!. YOU GUYS ARE ABSOLUTE LEGENDS !!!
Aura +10000000 :moai: