You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes you would do this in JS, adding a document.addEventListener.
I did something similar for another project, maybe this helps:
document.addEventListener('keydown', function(event) {
// Check if Command (for Mac) or Ctrl (for Windows/Linux) is pressed along with 'K'
if ((event.metaKey || event.ctrlKey) && event.key === 'k') {
// Prevent default action to ensure no other action is performed with the same shortcut
event.preventDefault();
// Get the search box by its ID and focus on it
let searchBox = document.getElementById('search');
if (searchBox) {
searchBox.focus();
}
}
});
Circle uses ⌘K to open search, but
/
would be nice too (my Vim bias)The text was updated successfully, but these errors were encountered: