2.2. Custom bindings
Prev | 2. Customization items | Next

### 2.2. Custom bindings

Among other things, this customization defines a macro-command called `docb.openInDefaultViewer` and adds a custom binding for it. See configuration element binding.

      <command name="docb.openInDefaultViewer">
        <macro>
          <sequence>
            <get context="$implicitElement/@url" expression="resolve-uri(.)" />
            <command name="start" parameter="helper(defaultViewer) '%_'" />
          </sequence>
        </macro>
      </command>

      <binding>
        <keyPressed code="F2" />
        <charTyped char="o" />
        <command name="docb.openInDefaultViewer" />
      </binding>

          .
      more macro-commands and bindings
          .
          .

A tutorial about macro-commands and the reference of all built-in commands (such as the `start` command used to define the above macro) are found in another document: XMLmind XML Editor - Commands.

Prev | Up | Next
2.1. Custom CSS style sheet | Home | 2.3. Custom tool bar