diff --git a/src/components/Actions.tsx b/src/components/Actions.tsx index 972c7ba8..75233d18 100644 --- a/src/components/Actions.tsx +++ b/src/components/Actions.tsx @@ -218,13 +218,12 @@ export const ShapesSwitcher = ({ appState: AppState; }) => ( <> - {SHAPES.map(({ value, icon, key, fillable }, index) => { - const numberKey = value === "eraser" ? 0 : index + 1; + {SHAPES.map(({ value, icon, key, numericKey, fillable }, index) => { const label = t(`toolBar.${value}`); const letter = key && (typeof key === "string" ? key : key[0]); const shortcut = letter - ? `${capitalizeString(letter)} ${t("helpDialog.or")} ${numberKey}` - : `${numberKey}`; + ? `${capitalizeString(letter)} ${t("helpDialog.or")} ${numericKey}` + : `${numericKey}`; return ( { this.setState({ isBindingEnabled: false }); } - if (event.code === CODES.ZERO) { - const nextState = this.toggleMenu("library"); - // track only openings - if (nextState) { - trackEvent( - "library", - "toggleLibrary (open)", - `keyboard (${this.device.isMobile ? "mobile" : "desktop"})`, - ); - } - } - if (isArrowKey(event.key)) { const step = (this.state.gridSize && diff --git a/src/components/HelpDialog.tsx b/src/components/HelpDialog.tsx index 96edf05f..1228cb91 100644 --- a/src/components/HelpDialog.tsx +++ b/src/components/HelpDialog.tsx @@ -1,6 +1,6 @@ import React from "react"; import { t } from "../i18n"; -import { isDarwin, isWindows } from "../keys"; +import { isDarwin, isWindows, KEYS } from "../keys"; import { Dialog } from "./Dialog"; import { getShortcutKey } from "../utils"; import "./HelpDialog.scss"; @@ -118,22 +118,42 @@ export const HelpDialog = ({ onClose }: { onClose?: () => void }) => { className="HelpDialog__island--tools" caption={t("helpDialog.tools")} > - - - - - - + + + + + + - - - + + void }) => { ]} isOr={false} /> - + +