mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
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:
parent
cb68153a81
commit
cb66adc716
4 changed files with 21 additions and 12 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue