How to configure shortcut keys in CK EDITOR 4. Not finding Plugin for Keystrocks

I want to disable some key in CK EDITOR.

I am using CKEDITOR 4.0 & I want to disable some shortcuts keys in CKEDITOR.

  • Dropdown toolbar button for CKEditor 4
  • Remove status bar from CKEditor
  • Ckeditor: show and hide inline toolbar on demand
  • Is there an online example of using TinyMCE with a print layout like word
  • Paste from word with uppercase
  • How to make input readonly in ckeditor dialog
  • e.g. help file opens on Alt + 0

    In old version Config Available in Source/plugins/keystroks/plugins.js But not availble in new version.

  • How to ajax-submit a form textarea input from CKEditor?
  • How do I set a plugin on CKEditor when is used from the CDN?
  • Add a custom format option to CKEdtitor?
  • Override ENTER key handling in CKEditor dialog
  • CKEditor can not parse JSON response
  • Can I control where CKEditor finds plugins to load?
  • 3 Solutions collect form web for “How to configure shortcut keys in CK EDITOR 4. Not finding Plugin for Keystrocks”

    Using config.keystrokes you can add and remove keystrokes.

    From documentation:

    // Disable default CTRL + L keystroke which executes link command by default.
    config.keystrokes = [
        ...
        [ CKEDITOR.CTRL + 76, null ],                       // CTRL + L
        ...
    ];
    

    Replace the CKEditor.config.keystrokes with an empty array:

    CKEDITOR.config.keystrokes = [];
    

    Or CKeditor already offers a hotkey functionality (see the CKeditor documentation). Using this functionality we can bind keystrokes to CKeditor actions. In order to save, the following line should be added:

    CKEDITOR.config.keystrokes = ... [ CKEDITOR.CTRL + 83 /*S*/, null ], ...

    I see you have comments on both answers asking about applying changes to all CKEditor instances. The following code should allow you to override settings for all instances

    window.onload = function(){
        CKEDITOR.on('instanceReady', function (ev) {
            ev.editor.setKeystroke(CKEDITOR.ALT + 48 /*0*/, false);
        });
    }
    

    Every time a CKEDITOR instance is initialized and ready, it will automatically disable alt+0.

    There is a list of the ascii codes for the different characters here for reference if you want to disable other keys: http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters

    Use the number in the Dec (decimal) column to disable they key in the Glyph column.