- How to configure Quark XML Author to use external methods?
- How to implement the support for a new language?
- How to configure shortcut keys?
- How to configure single and multiple ribbons?
- How to configure Word Backstage view?
- How to configure Ribbon Nodes?
- How to hide third-party software ribbon tabs?
- How to configure XML Author actions through internal classes attributes?
- What is Extensibility Interface?
- How to configure Quark XML Author to use external methods for Extensibility Interface?
- How to program external methods for Quark XML Author?
- List of enumerated values that can be used as Extensibility Interface argument types.
- List of available delegates for Extensibility Interface.
- List of available document events for Extensibility Interface.
- How to resolve content and document references?
How to configure shortcut keys?
Configuration: ShortcutKeys
Shortcut keys let you define keyboard combinations to common Quark XML Author commands.
These commands are launched by pressing a single keystroke (for example, F12) or by pressing a combination of a keystroke and the Shift or Ctrl or Alt key. The ShortcutKeys section of the configuration files defines these shortcuts
and the commands they launch.
The shortcut keys that should always be blocked are specified in the global XAShortcutKeysConfig.xml
file. This file is deployed with every installation.
Shortcut keys can be defined and modified both the AppConfig and DocConfig files,
and the procedures are the same in both files.
The order of precedence for key configurations is that the DocConfig overrides the
AppConfig which overrides the global XAShortcutKeysConfig.xml file.
ShortcutKeys Configuration in the AppConfig File
ShortcutKeys can be configured in both the AppConfig and DocConfig files. Configuration
in the AppConfig file will be reflected in the Word environment regardless of the
active document class. Quark recommends that you do not modify XAShortcutKeysConfig.xml,
but use the AppConfig file to configure shortcuts that you want users to be able to
use even if they have a standard Word document open.
ShortcutKeys Configuration in the DocConfig File
Use the DocConfig file to configure shortcuts that should only be available for a
specific document class. You may also need to block standard Word shortcuts in the
DocConfig file; how to block shortcuts is covered in section 8.9.
Associating Shortcut Keys with Menu Items and CommandBarButtons
Menu Items and CommandBar Buttons can both have shortcut keys associated with them
through the use of the ShortcutKey child element. To assign a shortcut to a Menu Item
or CommandBar Button, include an empty ShortcutKey element in the MenuItem or CommandBarButton
element.
ShortcutKey
The ShortcutKey element’s attributes specify the character to use, and whether the
Shift, Ctrl, Alt, or some combination of the three are part of the shortcut key combination.
In the example below, the combination Ctrl + O launches the command:
<ShortcutKey key="o" shift="false" ctrl="true"/>
The Key attribute value is the character to use. The values of shift and ctrl are
set to false if they are not used in the shortcut key, or true if they are. In the example below,
the combination Ctrl + Shift + x launches the menu item:
<ShortcutKey key="x" shift="true" ctrl="true"/>
Note that the values are case-sensitive.
Table: ShortcutKey Attributes
Attribute | Type | Required | Definition |
alt | boolean | no | If set to true, the Alt key is part of the shortcut key combination. Set to false if the Alt key is not used. |
ctrl | boolean | yes | If set to true, the Ctrl key is part of the shortcut key combination. Set to false if the Ctrl key is not used. |
key | string | yes | The keyboard key that is used in the shortcut key combination. All keys on the keyboard |
shift | boolean | yes | If set to true, the Shift key is part of the shortcut key combination. Set to false if the Shift key is not used. |
Table: Numeric KeyPad Key Values
Keypad Key | Key Attribute Value |
1 | NumPad1 |
2 | NumPad2 |
3 | NumPad3 |
4 | NumPad4 |
5 | NumPad5 |
6 | NumPad6 |
7 | NumPad7 |
8 | NumPad8 |
9 | NumPad9 |
0 | NumPad0 |
/ | Divide |
* | Multiply |
– | Subtract |
+ | Add |
. | Decimal |
Table: Numeric KeyPad Key Values
Supported Keys
Supported keys can be used in any combination with Shift, Ctrl, and Alt keys.
The list of supported keys includes:
+,=,_,-,|,\,{,},[,],~,`,?,/,>,.,<,,(comma),\,’,; , Return, Enter
The list of supported virtual keys includes:
13, 186 – 192, 219 – 222
Unsupported Keys
The list of supported keys includes:
Home, End, Page Up, Page Down, Arrow keys, Tab, Enter
InternalClass
If the shortcut is for an internal command (one launched within Microsoft Word, such
as Cut, Copy, or Paste), add an InternalClass child element to the ShortcutKey element.
The InternalClass element identifies the internal class value (for example, Cut) that
will launch the command. Enter the internal class name as the value of the name attribute
of the InternalClass element, as shown in the example below.
<InternalClass name="Cut"/>
In the example below, the shortcut key combination Shift + Del will cut the selection
from the document and place it on the clipboard.
<ShortcutKey Key="DEL" Shift="true" Ctrl="false">
<InternalClass name="Cut"/>
</ShortcutKey>
ExtensibilityInterface
If the shortcut is for an external command (one that launches an external process),
add an ExtensibilityMethod child element to the ShortcutKey element.
The ExtensibilityMethod element identifies the ExtensibilityInterface method (such
as Popup) that will launch the command. The ExtensibilityMethod element has one required
attribute: id. The value of the id attribute is the name of the Extensibility Method
specified in the EI node of the configuration file. An example is shown below.
<ExtensibilityMethod id="Popup"/>
In the following example, the shortcut key F12 launches the Popup ExtensibilityInterface
Method.
<ShortcutKey Key="F12" Shift="false" Ctrl="false">
<ExtensibilityMethod id="Popup"/>
</ShortcutKey>
ExtensibilityInterface methods are defined in the Extensibility Interface, which is
covered in Section 6.
Global Shortcut Key File: Disabling Shortcut Keys
The Global Shortcut Key file contains the list of shortcut keys that are disabled
by Quark XML Author in all configurations.
The following is a fragment of the XAShortcutKeysConfig .xml file:
<?xml version="1.0" encoding="utf-8"?>
<!-- This is a list of universal shortcuts to disable on all configurations. Keys can be repurposed in DocConfig ShortcutKeys node. -->
<ShortcutKeys>
<ShortcutKey key="B" shift="true" ctrl="true" />
<!-- remove bold -->
<ShortcutKey key="C" shift="true" ctrl="true" />
<!-- copy formatting -->
<ShortcutKey key="D" ctrl="true" />
<!-- font dialog -->
</ShortcutKeys>