Promis.e Help

Configuring Keyboard Shortcuts in an XML File

Normally, the keyboard shortcuts are defined in the Keyboard Shortcuts dialog ( File > Settings > User > Keyboard Shortcuts .) When the user makes changes to the keyboard shortcuts, the definitions are saved to the XML file specified by the configuration variable MS_KEYBOARDSHORTCUTS. If the file specified by MS_KEYBOARDSHORTCUTS does not exist, the system will try to read the default keyboard shortcuts from the file specified by MS_KEYBOARDSHORTCUTSSEED. If neither MS_KEYBOARDSHORTCUTS nor MS_KEYBOARDSHORTCUTSSEED are defined, or the files specified by them do not exist, the system defined defaults are used. If you are an administrator and want to provide custom keyboard shortcuts across your team, you may do so by configuring the keyboard shortcuts on one machine and then copying that file to your users machine and setting MS_KEYBOARDSHORTCUTSSEED to point to this file. You can also directly edit this XML file.

You can map a key stroke to a key-in or define a hierarchy of key strokes to a key-in. In the example below, the <Space (bar)> key is mapped to the key-in to pop-up the ribbon group containing AccuDraw tools. The keystroke <G> defines child keystroke that would be used to send AccuDraw specific commands. The key stroke combination of <G+A> will send the key-in ACCUDRAW DIALOG GETACS.

                <KeyboardShortcut ScanCode="0x39" Comment="Space">
                                <Keyin>ribbon grouppopup *\Drawing Aids\Accudraw</Keyin>
                <KeyboardShortcut ScanCode="0x22" Comment="G">
                                <Label>G Shortcuts</Label>
                                                <KeyboardShortcut ScanCode="0x1e" Comment="A">
                                                                <Label>Get ACS</Label>
                                                                <Keyin>accudraw dialog getacs</Keyin>
                                                <KeyboardShortcut ScanCode="0x1f" Comment="S">
                                                                <Label>AccuDraw Settings</Label>
                                                                <Keyin>accudraw dialog settings</Keyin>

Scan Code

The Scan Code attribute is the value the keyboard sends for a specific key stroke. A list of common scan codes are shown below.
               Scan Code                   Key
    0x10, 0x11, 0x12, 0x13, 0x14,        Q W E R T
    0x15, 0x16, 0x17, 0x18, 0x19,        Y U I O P
    0x1e, 0x1f, 0x20, 0x21, 0x22,        A S D F G
    0x23, 0x24, 0x25, 0x26, 0x27,        H J K L ;
    0x2c, 0x2d, 0x2e, 0x2f, 0x30,        Z X C V B
    0x31, 0x32, 0x33, 0x34, 0x35};       N M , . /
    0x39                                 Space key


The Comment attribute is optional and is typically used to show the label of the key associated with the scan code. This value is not used during processing.


The Label attribute defines the menu labels that are displayed.


The Keyin element is used to define the key-in to execute when the key is pressed. You can add any key-in to this attribute and with the focus on Home or AccuDraw when you press the keyboard shortcut, the respective key-in will get executed. To pop-up a group, use one of the following commands:
  • ribbon grouppopup [RibbonGroupPath]
  • ribbon popuptask [TaskPath]
  • ribbon popupmaintask [MainTaskPath]
  • ribbon popupcustomtoolbox [CustomToolboxPath]
The [RibbonGroupPath] is in the format Workflow\Tab\Group. The Workflow can be set to "*" to designate use the Active Workflow. For example, the key-in "ribbon grouppopup *\Home\Selection" set to a ScanCode of "0x1f" would specify to pop-up the "Selection" group in the "Home" of the active Workflow when "S" is pressed.

The [TaskPath], [MainTaskPath], and [CustomToolboxPath] are the paths used to navigate to a task, main task, or toolbox, when looking at the tree in the Customize dialog. For example, let's say you want to call the task Build town in the Main task Town Task Example, then the key-in to pop-up the Build Town task will be ribbon popuptask Town Task Example\Build Town.