patternize / patternize.io

Algorithms and Data Structure Visualization 🔬 An interactive E-Book
https://patternize.github.io/
MIT License
41 stars 3 forks source link

Search Keyboard Shortcut Conflict #25

Open spencer-shadley opened 4 years ago

spencer-shadley commented 4 years ago

The search (ctrl+K) keyboard shortcut conflicts with some browser defaults, such as Chrome's search google shortcut.

image

Repro:

Suggestion: Add an alt modifier to avoid the conflict. This is a frequent paradigm for browser-based keyboard shortcuts (for example, Google Docs uses ctrl+alt+num for toggling header styles to avoid conflicting with the browser shortcut for switching tabs (ctrl+num).

gazcn007 commented 3 years ago

Hey Spencer, I am using Docusaurus as a skeleton for the site, and they use DocSearch out of the box.

There is a thread of people discussing if they should use Ctrl+K as a hot key or not, I think it is good to let them know about the potential shortcut conflicts, esp. on Windows. https://github.com/facebook/docusaurus/pull/2815#issuecomment-652438605

I will follow up on that thread