X Pro v4.0.7 - Disable Keyboard shortcuts

Hi,

I has already been asked but we need a way to disable keyboard shortcuts.
With the new one, we can’t add custom css in any elements on french keyboards.
To access special caracters such as ‘{’ or ‘}’, we must use an external tool such as notepad because it runs a keyboard shortcut on X Pro 4.

Hi @lijecreative,

We might be offering a way in the tool to remap keybindings at some point which would include a way to unset them. For now this is possible using a filter in a custom plugin or functions.php of a child theme:

add_filter( 'cornerstone_keybindings', function($map) {
  unset($map['goto-headers']);
  unset($map['goto-content']);
  unset($map['goto-footers']);
  unset($map['goto-footers']);
  unset($map['goto-layouts']);
  return $map;
});

That will disable several of keybindings. Here’s a list of all the ones we register:

'save'                   => array( 'mod+s',       __('Save','cornerstone') ),
'undo'                   => array( 'mod+z',       __('Undo Element Change','cornerstone') ),
'redo'                   => array( 'mod+shift+z', __('Redo Element Change','cornerstone') ),
'delete'                 => array( 'delete',      __('Delete Element','cornerstone') ),
'duplicate'              => array( 'mod+d',       __('Duplicate Element','cornerstone') ),
'copy'                   => array( 'mod+c',       __('Copy Element','cornerstone') ),
'paste'                  => array( 'mod+v',       __('Paste Element','cornerstone') ),
'paste-style'            => array( 'mod+shift+v', __('Paste Element Style','cornerstone') ),
'find'                   => array( 'mod+f',       __('Find (focus available search)','cornerstone') ),
'toggle-full-collapse'   => array( 'mod+shift+a', __('Hide/Show Workspace','cornerstone') ),
'toggle-elements'        => array( 'mod+shift+e', __('Toggle Elements Library','cornerstone') ),
'esc'                    => array( 'esc',         __('Close Open Window','cornerstone') ),
'nav-builder-outline'   => array( 'mod+option+1', __('Outline', 'cornerstone') ),
'nav-builder-inspector' => array( 'mod+option+2', __('Inspector', 'cornerstone') ),
'nav-builder-settings'  => array( 'mod+option+3', __('Settings', 'cornerstone') ),
'nav-theme-options'     => array( 'mod+option+4', __('Theme Options', 'cornerstone') ),
'toggle-ui-theme'        => array( 'mod+shift+u',  false ),
'goto-headers'           => array( 'mod+option+h', false ),
'goto-content'           => array( 'mod+option+c', false ),
'goto-footers'           => array( 'mod+option+f', false ),
'goto-layouts'           => array( 'mod+option+l', false ),
'goto-global-blocks'     => array( 'mod+option+g', false ),
'goto-fonts'             => array( 'mod+option+t', false ),
'goto-colors'            => array( 'mod+option+k', false ),

The string value on the left is what you want to unset to disable a particular binding. You could also change a binding by doing something like this:

add_filter( 'cornerstone_keybindings', function($map) {

  $map['goto-headers'][0] = 'mod+shift+h';

  return $map;
});

On windows mod resolves to Ctrl and on Mac it is Cmd.

Great, it’s working like a charm! Thanks

Ok that’s good to hear! You’re most welcome, and thanks for confirming with us.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.