-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: customisable global hotkey to open a new chat in ChatGPT #109
Comments
A different version could be to have a checkbox under the global show/hide shortcut setting to toggle whether a new chat should be opened when using the hotkey to show the window. |
You can create a JS script that takes this html and uses the |
I was able to successfully target the New Chat button with this selector: document.querySelector('.group.flex.px-2[href="/"]') |
Here's some code GPT4 gave to add this hotkey: // Add Cmd+N hotkey to start New Chat
document.addEventListener('keydown', (event) => {
// Check if 'Cmd' and 'N' are pressed together
if (event.metaKey && event.key === 'n') {
event.preventDefault() // Prevents default action of the key press
const $newChatBtn = document.querySelector('.group.flex.px-2[href="/"]')
if ($newChatBtn) $newChatBtn.click()
}
}) Added it to my main.js Scripts file (from app's Control Center). Now it works every time 🎉 |
These days, there are hotkeys integrated in ChatGPT that also work in this app: |
The idea is to press a global hotkey and then immediately being able to start typing your prompt into ChatGPT for quick and convenient use.
The text was updated successfully, but these errors were encountered: