Disabling TinyMCE keyboard shortcuts altogether

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
                  });
               }
    });

Leave a Comment