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
|
@ -485,7 +485,7 @@ describe("regression tests", () => {
|
|||
}
|
||||
|
||||
Keyboard.withModifierKeys({ ctrl: true }, () => {
|
||||
Keyboard.codePress(CODES.G);
|
||||
Keyboard.keyPress(KEYS.G);
|
||||
});
|
||||
|
||||
for (const element of h.elements) {
|
||||
|
@ -524,7 +524,7 @@ describe("regression tests", () => {
|
|||
|
||||
Keyboard.withModifierKeys({ ctrl: true }, () => {
|
||||
Keyboard.keyPress(KEYS.A);
|
||||
Keyboard.codePress(CODES.G);
|
||||
Keyboard.keyPress(KEYS.G);
|
||||
});
|
||||
|
||||
expect(API.getSelectedElements().length).toBe(3);
|
||||
|
@ -561,7 +561,7 @@ describe("regression tests", () => {
|
|||
mouse.click();
|
||||
});
|
||||
Keyboard.withModifierKeys({ ctrl: true }, () => {
|
||||
Keyboard.codePress(CODES.G);
|
||||
Keyboard.keyPress(KEYS.G);
|
||||
});
|
||||
|
||||
expect(h.elements.map((element) => element.id)).toEqual([
|
||||
|
@ -578,7 +578,7 @@ describe("regression tests", () => {
|
|||
|
||||
Keyboard.withModifierKeys({ ctrl: true }, () => {
|
||||
Keyboard.keyPress(KEYS.A);
|
||||
Keyboard.codePress(CODES.G);
|
||||
Keyboard.keyPress(KEYS.G);
|
||||
});
|
||||
|
||||
mouse.doubleClickOn(rectC);
|
||||
|
@ -586,7 +586,7 @@ describe("regression tests", () => {
|
|||
mouse.clickOn(rectA);
|
||||
});
|
||||
Keyboard.withModifierKeys({ ctrl: true }, () => {
|
||||
Keyboard.codePress(CODES.G);
|
||||
Keyboard.keyPress(KEYS.G);
|
||||
});
|
||||
|
||||
expect(rectC.groupIds.length).toBe(2);
|
||||
|
@ -996,7 +996,7 @@ describe("regression tests", () => {
|
|||
|
||||
Keyboard.withModifierKeys({ ctrl: true }, () => {
|
||||
Keyboard.keyPress(KEYS.A);
|
||||
Keyboard.codePress(CODES.G);
|
||||
Keyboard.keyPress(KEYS.G);
|
||||
});
|
||||
|
||||
const selectedGroupIds_prev = h.state.selectedGroupIds;
|
||||
|
@ -1110,7 +1110,7 @@ it(
|
|||
|
||||
// Create group with first and third rectangle
|
||||
Keyboard.withModifierKeys({ ctrl: true }, () => {
|
||||
Keyboard.codePress(CODES.G);
|
||||
Keyboard.keyPress(KEYS.G);
|
||||
});
|
||||
|
||||
expect(API.getSelectedElements().length).toBe(2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue