Convenient handling of shortcuts

Shortcuts are a major topic for user experience. Novices are advised to learn basic shortcuts beyond the famous Ctrl+C/X/V like Ctrl+1/2/3.. to quickly change the paragraph style to heading 1/2/3… in Writer. Once you have learned those combinations you never want to unlearn and to change the muscle memory.

But when we introduce new features it becomes more and more difficult to find a catchy shortcut. For example, duplicate a sheet (tdf#145745) sounds like Ctrl+D, which is occupied by Fill Down in Calc. Many users probably never use this command (and in this particular case it is probably pointless to have a shortcut) but some may heavily rely on it.

Customization dialog

Customization

Our solution for this dilemma is the customization. LibreOffice provides a dialog with means to change the association of shortcuts and commands. You select the command, browse through the list of possible shortcuts, and assign or overwrite the combination.

Although a bit clumsy (improvement request and ideas in tdf#115527), this works well. However, if you want to change many shortcuts, maybe in order to fully comply with a different application or to keep the shortcuts from a certain release, the procedure is tedious.

The dialog provides Load/Save interactions that suits personal needs but as a community project we want to work together and share the effort. And for this purpose it is now possible to share the list of shortcuts as extension.

Extension

Sahil Gautam shared a prototype for such an extension. It’s available on Github and our extensions site and pretty straight-forward. Besides a couple of necessary meta data the extensions contains the file Keybindings.xcu. The basic structure looks like this:

<?xml version='1.0' encoding='UTF-8'?>
...
  <node oor:name="PrimaryKeys">
    <node oor:name="Global">
      <node oor:name="D_MOD1" oor:op="replace">
        <prop oor:name="Command">
          <value xml:lang="en-US">.uno:DuplicateSheet</value>
          <value xml:lang="fr-FR">.uno:Demote</value>
          <value xml:lang="de-DE">.uno:Delete</value> 
        </prop>
      </node>
    </node>
    <node oor:name="Modules">
      <node oor:name="com.sun.star.text.SpreadsheetDocument" oor:op="replace">
      </node>
    </node>
  </node>

You can assign primary and secondary keys, either global or per module, and fine-tune per language. MOD1 is Ctrl or Cmd on macOS, MOD2 Alt, and MOD3 Ctrl on macOS. Take a look at the actual implementation how this is defined by default.

When you finished to configure the shortcuts and have created an extension, you may upload it to the extension site and tag it as Keybinding. As a user you can browse through the list of extensions, download and install it, and after restarting the application the new configuration will be active. Remove it via Tools > Extensions… to get back to the factory settings.

Outlook

Given that we can very easily switch, what do you think about hard-coded shortcuts? Shall we keep the full list or clean it up to a bare minimum and let the community maintain the shortcuts?

Comments
  1. 1 week ago

Leave a Reply

Your email address will not be published. Required fields are marked *

I accept the Privacy Policy

Discover more from LibreOffice Design Team

Subscribe now to keep reading and get access to the full archive.

Continue reading