From 7522c48453671b1916a0863c8380b1a27509a36f Mon Sep 17 00:00:00 2001 From: Esteban <25874603+stbneb@users.noreply.github.com> Date: Sat, 2 May 2020 23:55:59 -0300 Subject: [PATCH] Make tools shortcuts case insensitive (#1532) (#1533) --- src/shapes.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/shapes.tsx b/src/shapes.tsx index c6da144534..0b1660900e 100644 --- a/src/shapes.tsx +++ b/src/shapes.tsx @@ -83,7 +83,9 @@ export const shapesShortcutKeys = SHAPES.map((shape, index) => [ export function findShapeByKey(key: string) { return ( SHAPES.find((shape, index) => { - return shape.value[0] === key || key === (index + 1).toString(); + return ( + shape.value[0] === key.toLowerCase() || key === (index + 1).toString() + ); })?.value || "selection" ); }