From 2ad0a65b71e38fa588a3f678378b4b0dd2a921fa Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 13 Apr 2017 16:42:26 +0200 Subject: [PATCH] Remove shortcuts that override browser actions --- customize.dist/ckeditor-config.js | 20 ++++++++++++++++++++ www/code/main.js | 2 +- www/slide/main.js | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/customize.dist/ckeditor-config.js b/customize.dist/ckeditor-config.js index 38e1165e6..c1659300c 100644 --- a/customize.dist/ckeditor-config.js +++ b/customize.dist/ckeditor-config.js @@ -15,6 +15,26 @@ CKEDITOR.editorConfig = function( config ) { // jshint ignore:line config.fontSize_defaultLabel = '16px'; config.contentsCss = '/customize/ckeditor-contents.css'; + config.keystrokes = [ + [ CKEDITOR.ALT + 121 /*F10*/, 'toolbarFocus' ], + [ CKEDITOR.ALT + 122 /*F11*/, 'elementsPathFocus' ], + + [ CKEDITOR.SHIFT + 121 /*F10*/, 'contextMenu' ], + + [ CKEDITOR.CTRL + 90 /*Z*/, 'undo' ], + [ CKEDITOR.CTRL + 89 /*Y*/, 'redo' ], + [ CKEDITOR.CTRL + CKEDITOR.SHIFT + 90 /*Z*/, 'redo' ], + + [ CKEDITOR.CTRL + CKEDITOR.SHIFT + 76 /*L*/, 'link' ], + [ CKEDITOR.CTRL + 76 /*L*/, undefined ], + + [ CKEDITOR.CTRL + 66 /*B*/, 'bold' ], + [ CKEDITOR.CTRL + 73 /*I*/, 'italic' ], + [ CKEDITOR.CTRL + 85 /*U*/, 'underline' ], + + [ CKEDITOR.ALT + 109 /*-*/, 'toolbarCollapse' ] + ]; + //skin: 'moono-cryptpad,/pad/themes/moono-cryptpad/' //skin: 'flat,/pad/themes/flat/' //skin: 'moono-lisa,/pad/themes/moono-lisa/' diff --git a/www/code/main.js b/www/code/main.js index bdad4cdb6..fe999c6c0 100644 --- a/www/code/main.js +++ b/www/code/main.js @@ -63,7 +63,7 @@ define([ styleActiveLine : true, search: true, highlightSelectionMatches: {showToken: /\w+/}, - extraKeys: {"Ctrl-Q": function(cm){ cm.foldCode(cm.getCursor()); }}, + extraKeys: {"Shift-Ctrl-R": undefined}, foldGutter: true, gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"], mode: "javascript", diff --git a/www/slide/main.js b/www/slide/main.js index 9acc6527e..995d8b767 100644 --- a/www/slide/main.js +++ b/www/slide/main.js @@ -83,7 +83,7 @@ define([ styleActiveLine : true, search: true, highlightSelectionMatches: {showToken: /\w+/}, - extraKeys: {"Ctrl-Q": function(cm){ cm.foldCode(cm.getCursor()); }}, + extraKeys: {"Shift-Ctrl-R": undefined}, foldGutter: true, gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"], mode: "javascript",