Fix keybind on Win changing focus to addrbar
This commit is contained in:
parent
2818cb708c
commit
86a6063c65
@ -44,15 +44,19 @@ function FuzzyBar(): JSX.Element {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const event = (e: KeyboardEvent) => {
|
const event = (e: KeyboardEvent) => {
|
||||||
if (e.code === 'KeyK' && (e.ctrlKey || e.metaKey)) {
|
if (e.code === 'KeyK' && (e.ctrlKey || e.metaKey)) {
|
||||||
|
e.preventDefault();
|
||||||
toggleSearch();
|
toggleSearch();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.code === 'KeyP' && (e.ctrlKey || e.metaKey) && e.shiftKey) {
|
if (e.code === 'KeyP' && (e.ctrlKey || e.metaKey) && e.shiftKey) {
|
||||||
|
e.preventDefault();
|
||||||
alert('not really sure what to do here lol');
|
alert('not really sure what to do here lol');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (show)
|
if (show)
|
||||||
searchField.current?.focus();
|
searchField.current?.focus();
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('keydown', event);
|
window.addEventListener('keydown', event);
|
||||||
|
Loading…
Reference in New Issue
Block a user