Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 539297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:07:17+00:00 2026-05-13T10:07:17+00:00

Trying to find where to disable individual keyboard shortcuts in the jQuery version of

  • 0

Trying to find where to disable individual keyboard shortcuts in the jQuery version of TinyMCE editor. Currently the list of allowable shortcuts is:

  • ctrl+z Undo
  • ctrl+y Redo
  • ctrl+b Bold
  • ctrl+i Italic
  • ctrl+u Underline
  • ctrl+1-6 h1-h6
  • ctrl+7 p
  • ctrl+8 div
  • ctrl+9 address

Currently looking to disable all shortcuts but Undo, Redo and bold. The rest are unnessary in our implementation due to it’s unwanted formatting.

I can’t seem to find the code that enables these shortcuts. Can you point out where to find this code.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T10:07:17+00:00Added an answer on May 13, 2026 at 10:07 am

    Disable Tested in Firefox

    This should help get you started. You might need to actually add empty shortcuts for ctrl+u and ctrl+i to disable it in other browsers, but this code has been tested to disable the actions in Firefox. Just run after the initialization of tinyMCE has run (I tested mine in Firebug):

    for(var i in tinyMCE.editors){
      var editor = tinyMCE.editors[i];
      for(var s in editor.shortcuts){
        var shortcut = editor.shortcuts[s];
        // Remove all shortcuts except Bold (66), Redo (89), Undo (90)
        if(!(s == "ctrl,,,66" || s == "ctrl,,,89" || s == "ctrl,,,90")){
           // This completely removes the shortcuts
           delete editor.shortcuts[s];
    
           // You could use this instead, which just disables it, but still keeps
           // browser functionality (like CMD+U = show source in FF Mac) from interrupting the flow
           // shortcut.func = function(){  };
        }
      }
    }
    

    Background

    It appears to be defined around line 2294 of jscripts/tiny_mce/classes/Editor.js (From the full development download).

    Also, they are stored in an array in the Editor.shortcuts variable. They keys are setup with special chars then the keycode, like this: ctrl,,,90.

    But from what I can tell, it seems that many browser implement their own versions of ctrl+b, ctrl+i, and ctrl+u and that only Gecko browsers do not:

    // Add default shortcuts for gecko
    if (isGecko) {
        t.addShortcut('ctrl+b', t.getLang('bold_desc'), 'Bold');
        t.addShortcut('ctrl+i', t.getLang('italic_desc'), 'Italic');
        t.addShortcut('ctrl+u', t.getLang('underline_desc'), 'Underline');
    }
    

    But if you look around there, you can see how they enable it.

    Additionally, look into the Editor.addShortcut method. You might be able to override the default behavior.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to find a way to disable the click on my jQuery UI
I'm trying to find a way to disable all dates that are not at
I'm trying to disable access logging (access_log) for domains. I can't find a way
I'm trying to disable HTTP keep-alive , and I can't seem to find any
I am using jQuery UI and trying to disable all text boxes in a
Greetings! I am trying to find a way in Java to programmatically enable/disable a
Greetings! I am trying to find a way in Java to programmatically enable/disable a
I'm trying to find a way to use one button to enable/disable commands. (actually,
I am trying to find a way to disable Design / Split views from
I just started learning jQuery and I'm watching video tutorials and trying to find

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.