mirror of
https://github.com/google/blockly.git
synced 2026-01-06 08:30:13 +01:00
fix!: Remove alt+key commands (#8961)
* fix: Remove the alt+key commands * Remove tests for alt+key combos
This commit is contained in:
@@ -99,9 +99,6 @@ export function registerCopy() {
|
||||
const ctrlC = ShortcutRegistry.registry.createSerializedKey(KeyCodes.C, [
|
||||
KeyCodes.CTRL,
|
||||
]);
|
||||
const altC = ShortcutRegistry.registry.createSerializedKey(KeyCodes.C, [
|
||||
KeyCodes.ALT,
|
||||
]);
|
||||
const metaC = ShortcutRegistry.registry.createSerializedKey(KeyCodes.C, [
|
||||
KeyCodes.META,
|
||||
]);
|
||||
@@ -138,7 +135,7 @@ export function registerCopy() {
|
||||
: null;
|
||||
return !!copyData;
|
||||
},
|
||||
keyCodes: [ctrlC, altC, metaC],
|
||||
keyCodes: [ctrlC, metaC],
|
||||
};
|
||||
ShortcutRegistry.registry.register(copyShortcut);
|
||||
}
|
||||
@@ -150,9 +147,6 @@ export function registerCut() {
|
||||
const ctrlX = ShortcutRegistry.registry.createSerializedKey(KeyCodes.X, [
|
||||
KeyCodes.CTRL,
|
||||
]);
|
||||
const altX = ShortcutRegistry.registry.createSerializedKey(KeyCodes.X, [
|
||||
KeyCodes.ALT,
|
||||
]);
|
||||
const metaX = ShortcutRegistry.registry.createSerializedKey(KeyCodes.X, [
|
||||
KeyCodes.META,
|
||||
]);
|
||||
@@ -197,7 +191,7 @@ export function registerCut() {
|
||||
}
|
||||
return false;
|
||||
},
|
||||
keyCodes: [ctrlX, altX, metaX],
|
||||
keyCodes: [ctrlX, metaX],
|
||||
};
|
||||
|
||||
ShortcutRegistry.registry.register(cutShortcut);
|
||||
@@ -210,9 +204,6 @@ export function registerPaste() {
|
||||
const ctrlV = ShortcutRegistry.registry.createSerializedKey(KeyCodes.V, [
|
||||
KeyCodes.CTRL,
|
||||
]);
|
||||
const altV = ShortcutRegistry.registry.createSerializedKey(KeyCodes.V, [
|
||||
KeyCodes.ALT,
|
||||
]);
|
||||
const metaV = ShortcutRegistry.registry.createSerializedKey(KeyCodes.V, [
|
||||
KeyCodes.META,
|
||||
]);
|
||||
@@ -245,7 +236,7 @@ export function registerPaste() {
|
||||
const centerCoords = new Coordinate(left + width / 2, top + height / 2);
|
||||
return !!clipboard.paste(copyData, copyWorkspace, centerCoords);
|
||||
},
|
||||
keyCodes: [ctrlV, altV, metaV],
|
||||
keyCodes: [ctrlV, metaV],
|
||||
};
|
||||
|
||||
ShortcutRegistry.registry.register(pasteShortcut);
|
||||
@@ -258,9 +249,6 @@ export function registerUndo() {
|
||||
const ctrlZ = ShortcutRegistry.registry.createSerializedKey(KeyCodes.Z, [
|
||||
KeyCodes.CTRL,
|
||||
]);
|
||||
const altZ = ShortcutRegistry.registry.createSerializedKey(KeyCodes.Z, [
|
||||
KeyCodes.ALT,
|
||||
]);
|
||||
const metaZ = ShortcutRegistry.registry.createSerializedKey(KeyCodes.Z, [
|
||||
KeyCodes.META,
|
||||
]);
|
||||
@@ -277,7 +265,7 @@ export function registerUndo() {
|
||||
e.preventDefault();
|
||||
return true;
|
||||
},
|
||||
keyCodes: [ctrlZ, altZ, metaZ],
|
||||
keyCodes: [ctrlZ, metaZ],
|
||||
};
|
||||
ShortcutRegistry.registry.register(undoShortcut);
|
||||
}
|
||||
@@ -291,10 +279,6 @@ export function registerRedo() {
|
||||
KeyCodes.SHIFT,
|
||||
KeyCodes.CTRL,
|
||||
]);
|
||||
const altShiftZ = ShortcutRegistry.registry.createSerializedKey(KeyCodes.Z, [
|
||||
KeyCodes.SHIFT,
|
||||
KeyCodes.ALT,
|
||||
]);
|
||||
const metaShiftZ = ShortcutRegistry.registry.createSerializedKey(KeyCodes.Z, [
|
||||
KeyCodes.SHIFT,
|
||||
KeyCodes.META,
|
||||
@@ -316,7 +300,7 @@ export function registerRedo() {
|
||||
e.preventDefault();
|
||||
return true;
|
||||
},
|
||||
keyCodes: [ctrlShiftZ, altShiftZ, metaShiftZ, ctrlY],
|
||||
keyCodes: [ctrlShiftZ, metaShiftZ, ctrlY],
|
||||
};
|
||||
ShortcutRegistry.registry.register(redoShortcut);
|
||||
}
|
||||
|
||||
@@ -132,12 +132,6 @@ suite('Key Down', function () {
|
||||
Blockly.utils.KeyCodes.META,
|
||||
]),
|
||||
],
|
||||
[
|
||||
'Alt C',
|
||||
createKeyDownEvent(Blockly.utils.KeyCodes.C, [
|
||||
Blockly.utils.KeyCodes.ALT,
|
||||
]),
|
||||
],
|
||||
];
|
||||
// Copy a block.
|
||||
suite('Simple', function () {
|
||||
@@ -223,12 +217,6 @@ suite('Key Down', function () {
|
||||
Blockly.utils.KeyCodes.META,
|
||||
]),
|
||||
],
|
||||
[
|
||||
'Alt Z',
|
||||
createKeyDownEvent(Blockly.utils.KeyCodes.Z, [
|
||||
Blockly.utils.KeyCodes.ALT,
|
||||
]),
|
||||
],
|
||||
];
|
||||
// Undo.
|
||||
suite('Simple', function () {
|
||||
@@ -289,13 +277,6 @@ suite('Key Down', function () {
|
||||
Blockly.utils.KeyCodes.SHIFT,
|
||||
]),
|
||||
],
|
||||
[
|
||||
'Alt Shift Z',
|
||||
createKeyDownEvent(Blockly.utils.KeyCodes.Z, [
|
||||
Blockly.utils.KeyCodes.ALT,
|
||||
Blockly.utils.KeyCodes.SHIFT,
|
||||
]),
|
||||
],
|
||||
];
|
||||
// Undo.
|
||||
suite('Simple', function () {
|
||||
|
||||
Reference in New Issue
Block a user