mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: replaced KeyboardEvent.code with KeyboardEvent.key for all letters (#5523)
* fix: Replaced KeyboardEvent.code with KeyboardEvent.key for all letters * fix: reverted all keybindings that included alt to use code instead of keys Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
This commit is contained in:
parent
55110bf1b8
commit
79bd3b8cda
7 changed files with 21 additions and 21 deletions
|
@ -1,4 +1,4 @@
|
|||
import { CODES, KEYS } from "../keys";
|
||||
import { KEYS } from "../keys";
|
||||
import { t } from "../i18n";
|
||||
import { arrayToMap, getShortcutKey } from "../utils";
|
||||
import { register } from "./register";
|
||||
|
@ -132,7 +132,7 @@ export const actionGroup = register({
|
|||
contextItemPredicate: (elements, appState) =>
|
||||
enableActionGroup(elements, appState),
|
||||
keyTest: (event) =>
|
||||
!event.shiftKey && event[KEYS.CTRL_OR_CMD] && event.code === CODES.G,
|
||||
!event.shiftKey && event[KEYS.CTRL_OR_CMD] && event.key === KEYS.G,
|
||||
PanelComponent: ({ elements, appState, updateData }) => (
|
||||
<ToolButton
|
||||
hidden={!enableActionGroup(elements, appState)}
|
||||
|
@ -189,7 +189,7 @@ export const actionUngroup = register({
|
|||
};
|
||||
},
|
||||
keyTest: (event) =>
|
||||
event.shiftKey && event[KEYS.CTRL_OR_CMD] && event.code === CODES.G,
|
||||
event.shiftKey && event[KEYS.CTRL_OR_CMD] && event.key === KEYS.G,
|
||||
contextItemLabel: "labels.ungroup",
|
||||
contextItemPredicate: (elements, appState) =>
|
||||
getSelectedGroupIds(appState).length > 0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue