• Resolved fharper

    (@fharper)


    I’m using the latest version of WordPress, and when I try to use ALT + 0 to do a right square bracket (I’m using a French keyboard), I got an accessibility help dialog from TinyMCE. Is there a way to deactivate this dialog, this shortcut or all keyboard shortcuts for TinyMCE?

    I didn’t find anything, any idea?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter fharper

    (@fharper)

    For those who are looking to do the same, you can add this code to functions.php

    //Remove TinyMCE shortcuts
    function myformatTinyMCE($in)
    {
    	$in['custom_shortcuts']=false;
    	return $in;
    }
    add_filter('tiny_mce_before_init', 'myformatTinyMCE' );

    I’m also interested in deactivating the ALT+0 since I use ALT for unicode hex character input (all the greek letters start with 0). I tried your code but got the error:

    Fatal error: Call to undefined function add_filter() in /home/…/wp-includes/functions.php on line 354

    I put this code in wp-includes/functions.php. Is this the right place? I see that add_filter API is included in wp-includes/plugin.php but it isn’t recognized. Is there something more I have to do?

    Thanks!

    That code should be added to the functions.php you’ll find in your theme directory. Not knowing your theme, I can’t give you an exact path, but something like /wp-content/themes/your-theme/functions.php

    Thank you Joe. That solved my problem.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Deactivating TinyMCE keyboard shortcut’ is closed to new replies.