8
0
Rémy HUBSCHER 8 лет назад
Родитель
Сommit
0689996d56

+ 2 - 2
packages/ckeditor5-basic-styles/src/strike.js

@@ -41,7 +41,7 @@ export default class Strike extends Plugin {
 		const editor = this.editor;
 		const t = editor.t;
 		const command = editor.commands.get( 'strike' );
-		const keystroke = 'CTRL+E';
+		const keystroke = 'Cmd+Shift+X';
 
 		// Add strike button to feature components.
 		editor.ui.componentFactory.add( 'strike', locale => {
@@ -62,7 +62,7 @@ export default class Strike extends Plugin {
 			return view;
 		} );
 
-		// Set the Ctrl+ALT+S keystroke.
+		// Set the Cmd+Shift+X keystroke.
 		editor.keystrokes.set( keystroke, 'strike' );
 	}
 }

+ 5 - 4
packages/ckeditor5-basic-styles/tests/strike.js

@@ -49,7 +49,7 @@ describe( 'Strike', () => {
 		expect( strikeView.isOn ).to.be.false;
 		expect( strikeView.label ).to.equal( 'Strike' );
 		expect( strikeView.icon ).to.match( /<svg / );
-		expect( strikeView.keystroke ).to.equal( 'CTRL+E' );
+		expect( strikeView.keystroke ).to.equal( 'Cmd+Shift+X' );
 	} );
 
 	it( 'should execute strike command on model execute event', () => {
@@ -76,14 +76,15 @@ describe( 'Strike', () => {
 	} );
 
 	it( 'should set keystroke in the model', () => {
-		expect( strikeView.keystroke ).to.equal( 'CTRL+E' );
+		expect( strikeView.keystroke ).to.equal( 'Cmd+Shift+X' );
 	} );
 
 	it( 'should set editor keystroke', () => {
 		const spy = sinon.spy( editor, 'execute' );
 		const keyEventData = {
-			keyCode: keyCodes.e,
-			ctrlKey: true,
+			keyCode: keyCodes.x,
+			altKey: true,
+			cmdKey: true,
 			preventDefault: sinon.spy(),
 			stopPropagation: sinon.spy()
 		};