🪄 兼容 macOS 上使用 Command + K 快捷键打开搜索框

This commit is contained in:
hi2hi 2025-01-24 04:46:11 +00:00
parent fbc3937b84
commit 84dc786b28

View File

@ -155,7 +155,7 @@ function openDetail(info) {
}
function handleKeyDown(event) {
if (event.ctrlKey && event.key === 'k') {
if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === 'k') {
event.stopPropagation();
event.preventDefault();
if (show.value) {