Trying to find where to disable individual keyboard shortcuts in the jQuery version of TinyMCE editor. Currently the list of allowable shortcuts is:
OK so I was able to get this to work. I was able to block firefox using Doug's code above to get IE to disable the key's I wanted I had to add this code after Doug's code block.
var $iframe = $('iframe').contents().get(0);
$($iframe).keydown(function(oEvent) {
//italics (ctrl+i & Cmd+i [Safari doesn't allow you to test for Cmd])
if (oEvent.keyCode == '73' && (oEvent.metaKey || oEvent.ctrlKey)){
oEvent.preventDefault();
return false;
}
//underline (ctrl+u & cmd+u [Safari doesn't allow you to test for cmd])
if (oEvent.keyCode == '85' && (oEvent.metaKey || oEvent.ctrlKey)){
oEvent.preventDefault();
return false;
}
});
So basically TinyMCE dynamically loads the editor as a iFrame so I disabled the Ctrl+u and Ctrl+i from the iFrame. I what till the iFrame is finished loading and then attach a keydown event and sniff for Ctrl+i and Ctrl+i (I also sniff Cmd+i and Cmd+u for the mac [although Safari won't let you test for cmd according to this link. Everything else is disabled that I need disabled.