Browse Source

Add curved lines/arrows shortcuts (#1274)

Lipis 5 years ago
parent
commit
0c41f3e7aa
2 changed files with 11 additions and 1 deletions
  1. 9 1
      src/components/ShortcutsDialog.tsx
  2. 2 0
      src/locales/en.json

+ 9 - 1
src/components/ShortcutsDialog.tsx

@@ -76,7 +76,7 @@ const ShortcutKey = (props: { children: React.ReactNode }) => (
     style={{
       border: "1px solid #ced4da",
       padding: "2px 8px",
-      margin: "0 8px",
+      margin: "0 4px",
       backgroundColor: "#e9ecef",
       borderRadius: "2px",
       fontSize: "0.8em",
@@ -150,6 +150,14 @@ export const ShortcutsDialog = ({ onClose }: { onClose?: () => void }) => {
             <Shortcut title={t("toolBar.arrow")} shortcuts={["A", "5"]} />
             <Shortcut title={t("toolBar.line")} shortcuts={["L", "6"]} />
             <Shortcut title={t("toolBar.text")} shortcuts={["T", "7"]} />
+            <Shortcut
+              title={t("shortcutsDialog.curvedArrow")}
+              shortcuts={["A", "click", "click", "click"]}
+            />
+            <Shortcut
+              title={t("shortcutsDialog.curvedLine")}
+              shortcuts={["L", "click", "click", "click"]}
+            />
             <Shortcut title={t("toolBar.lock")} shortcuts={["Q"]} />
           </ShortcutIsland>
           <ShortcutIsland title={t("shortcutsDialog.editor")}>

+ 2 - 0
src/locales/en.json

@@ -133,6 +133,8 @@
   "shortcutsDialog": {
     "title": "Keyboard shortcuts",
     "shapes": "Shapes",
+    "curvedArrow": "Curved arrow",
+    "curvedLine": "Curved line",
     "editor": "Editor",
     "view": "View",
     "blog": "Read our blog",