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:
@ -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"
|
||||
|
Reference in New Issue
Block a user