Disabling TinyMCE keyboard shortcuts altogether

I’ve disabled pretty much every button in the visual editor, besides bold and underline. The problem is that the functionality of the other buttons are still there with the keyboard shortcuts. Is there someway to disable the keyboard shortcuts. I don’t need them at all.

Related posts

Leave a Reply

1 comment

  1. Not really a wordpress question – but have you tried

    tinyMCE.init({
       ..
        custom_shortcuts : false
    });
    

    ??

    (might have a problem with IE though , on which case, you can override them with a foo function.)

    function disableShortcuts(){
        tinyMCE.get('elm1').addShortcut("ctrl+b","nix","foo");
        tinyMCE.get('elm1').addShortcut("ctrl+i","nix","foo");
    
    }
    

    after that you will need to add the “foo” command to tinMCE:

    tinyMCE.init({
       //your other stuff
            oninit : "disableShortcuts",
            setup : function(ed) {
                      // Register foo command  shortcuts
                      ed.addCommand('foo', function() {
                      //foo function does null
                      });
                   }
        });