浏览代码

Changed link keystroke to Ctrl+K.

Oskar Wrobel 9 年之前
父节点
当前提交
501d9bd942
共有 2 个文件被更改,包括 6 次插入6 次删除
  1. 4 4
      packages/ckeditor5-link/src/link.js
  2. 2 2
      packages/ckeditor5-link/tests/link.js

+ 4 - 4
packages/ckeditor5-link/src/link.js

@@ -19,7 +19,7 @@ import LinkBalloonPanelView from './ui/linkballoonpanelview.js';
 import { keyCodes } from '../utils/keyboard.js';
 
 /**
- * The link feature. It introduces the Link and Unlink buttons and the <kbd>Ctrl+L</kbd> keystroke.
+ * The link feature. It introduces the Link and Unlink buttons and the <kbd>Ctrl+K</kbd> keystroke.
  *
  * It uses the {@link link.LinkEngine link engine feature}.
  *
@@ -69,7 +69,7 @@ export default class Link extends Feature {
 			isOn: false,
 			label: t( 'Link' ),
 			icon: 'link',
-			keystroke: 'CTRL+L'
+			keystroke: 'CTRL+K'
 		} );
 
 		// Bind button model to the command.
@@ -158,8 +158,8 @@ export default class Link extends Feature {
 		// which means that the `Cancel` button has been clicked.
 		this.listenTo( panelModel, 'executeCancel', () => this._hidePanel( { focusEditable: true } ) );
 
-		// Handle `Ctrl+L` keystroke and show panel.
-		editor.keystrokes.set( 'CTRL+L', () => {
+		// Handle `Ctrl+K` keystroke and show panel.
+		editor.keystrokes.set( 'CTRL+K', () => {
 			this._attachPanelToElement();
 			balloonPanel.urlInput.view.select();
 		} );

+ 2 - 2
packages/ckeditor5-link/tests/link.js

@@ -159,10 +159,10 @@ describe( 'Link', () => {
 			expect( document.body.contains( balloonPanel.view.element ) );
 		} );
 
-		it( 'should open with selected url input on `CTRL+L` keystroke', () => {
+		it( 'should open with selected url input on `CTRL+K` keystroke', () => {
 			const selectUrlInputSpy = testUtils.sinon.spy( balloonPanel.urlInput.view, 'select' );
 
-			editor.keystrokes.press( { keyCode: keyCodes.l, ctrlKey: true } );
+			editor.keystrokes.press( { keyCode: keyCodes.k, ctrlKey: true } );
 
 			expect( balloonPanel.view.model.isVisible ).to.true;
 			expect( selectUrlInputSpy.calledOnce ).to.true;