mirror of https://github.com/usememos/memos.git
fix(ui): change focus search bar shortcut
This commit is contained in:
parent
48ce4ccc26
commit
1e3c140394
|
|
@ -13,7 +13,7 @@ const SearchBar = observer(() => {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const handleGlobalShortcut = (event: KeyboardEvent) => {
|
const handleGlobalShortcut = (event: KeyboardEvent) => {
|
||||||
if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === "k") {
|
if ((event.metaKey || event.ctrlKey) && event.key === "/") {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
inputRef.current?.focus();
|
inputRef.current?.focus();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue