Closed Hacksore closed 4 months ago
Update, this is able to be event.preventDefault()
'd!
MVP test code and I was able to not perform a Google search. Not sure why many sites are not adding this but and if it has downsides but this is the solution.
document.addEventListener("keydown", (event) => {
if (event.ctrlKey && event.key === "k") {
console.log("Ctrl+K pressed!");
event.preventDefault(); // Prevent doing a google search
}
});
Opened this to track the fix on github https://github.com/orgs/community/discussions/133328.
🙏
Hi folks 👋
I was on my windows laptop to fix a smol lil bug in my app. As a chronic
CMD+K
user on macOS (raycast, discord, github, vercel) I was like let me jump to github and pull up the palette only to discover that google HARD CODESCTRL+K
to perform a google search 😢.Figured opening an issue here could help us discover workarounds but at the moment I don't have anything to suggest.
https://support.google.com/chrome/thread/235515391/can-i-turn-of-the-ctrl-k-for-search?hl=en https://support.google.com/chrome/answer/157179?hl=en&co=GENIE.Platform%3DDesktop#zippy=%2Caddress-bar-shortcuts:~:text=Ctrl%20%2B%20k%20or%20Ctrl%20%2B%20e