feat(tool): help

This commit is contained in:
2026-04-18 21:55:01 +08:00
parent a57b9c4427
commit cad763d2a3
4 changed files with 402 additions and 15 deletions

View File

@@ -2024,10 +2024,22 @@ const LabelPage = ({
const mode = usePaperStore.getState().mode
const lowerKey = e.key.toLowerCase()
const commandKey = e.ctrlKey || e.metaKey
const isShortcutGuideKey =
e.code === "Slash" || e.key === "?" || e.key === "/"
if (e.repeat && ["a", "b", "d", "h", "m", ",", "."].includes(lowerKey))
if (
e.repeat &&
["a", "b", "d", "h", "m", ",", ".", "/", "?"].includes(lowerKey)
)
return
if (!e.ctrlKey && !e.metaKey && !e.altKey && isShortcutGuideKey) {
e.preventDefault()
const keyboardState = useKeyboardStore.getState()
keyboardState.setShowShortcutGuide(!keyboardState.showShortcutGuide)
return
}
if (!e.ctrlKey && !e.metaKey && !e.altKey && lowerKey === "m") {
e.preventDefault()
const topState = useTopToolsStore.getState()