Add a Shortcut for Toggling Shape Lock (#1005)

* Update shortcuts.md for Lock

* Add 'Q' as a shortcut for toggling shape lock

* Add shortcut to LockIcon title

* use event.key instead

Co-authored-by: Faustino Kialungila <Faustino.kialungila@gmail.com>
This commit is contained in:
Sanghyeon Lee 2020-03-19 03:29:59 +09:00 committed by GitHub
parent cb68153a81
commit cb66adc716
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 12 deletions

View file

@ -1,6 +1,7 @@
import "./ToolIcon.scss";
import React from "react";
import { getShortcutKey } from "../utils";
type LockIconSize = "s" | "m";
@ -48,7 +49,7 @@ export function LockIcon(props: LockIconProps) {
className={`ToolIcon ToolIcon__lock ${
props.isButton ? "ToolIcon_type_button" : "ToolIcon_type_floating"
} ${sizeCn}`}
title={props.title}
title={`${props.title} ${getShortcutKey("Q")}`}
>
<input
className="ToolIcon_type_checkbox"