Template Schema
When creating or editing SVG templates, you must use the correct placeholder keys. Joystick Diagrams scans the SVG and replaces each key with the corresponding binding from your profile.
All keys are case insensitive.
Helper Keys
These keys inject dynamic metadata into your template at export time.
| Key | Description |
|---|---|
TEMPLATE_NAME | Replaced with the exported profile name. |
CURRENT_DATE | Replaced with the export date in DD/MM/YYYY format. |
Button Keys
Replace X with the button number on your HID device. Button numbers correspond to your device's
reported button IDs.
| Key Pattern | Description | Example |
|---|---|---|
BUTTON_X | Binding for button number X | BUTTON_26 |
POV Hat Keys
Replace X with the POV hat ID (starting at 1 if you have only one), and D with the
direction.
| Key Pattern | Description | Example |
|---|---|---|
POV_X_D | Binding for POV hat X in direction D | POV_1_U |
Supported Directions
4-Way Hat
URDL
8-Way Hat
UURRDRDDLLUL
Example keys for a 4-way hat on POV 1:
POV_1_U
POV_1_R
POV_1_D
POV_1_L Axis Keys
| Key | Axis |
|---|---|
AXIS_X | X Axis |
AXIS_Y | Y Axis |
AXIS_Z | Z Axis |
AXIS_RX | Rotation X |
AXIS_RY | Rotation Y |
AXIS_RZ | Rotation Z |
AXIS_SLIDER_N | Slider N (where N is the slider number) |
Modifier Keys
Modifier keys are extensions of any button, hat, or axis key. Your template must have enough space to accommodate modifier text, or bindings may overlap.
| Key Pattern | Description | Example |
|---|---|---|
{KEY}_MODIFIERS | All modifiers concatenated into a single string | BUTTON_1_MODIFIERS |
{KEY}_MODIFIER_X | A specific modifier (key + action) by index | POV_1_U_MODIFIER_1 |
{KEY}_MODIFIER_X_KEY | The key combination that activates modifier X | BUTTON_1_MODIFIER_1_KEY |
{KEY}_MODIFIER_X_ACTION | The action bound under modifier X | BUTTON_1_MODIFIER_1_ACTION |
Modifier Output Examples
Suppose BUTTON_26 has two modifiers:
- Modifier 1: Keys
{CTRL, ALT} — Action: Item One Action - Modifier 2: Keys
{SHIFT} — Action: Item Two Action
Key Output BUTTON_26_MODIFIERS {CTRL,ALT} - Item One Action | {SHIFT} - Item Two Action BUTTON_26_MODIFIER_1 {CTRL,ALT} - Item One Action BUTTON_26_MODIFIER_1_KEY {CTRL,ALT} BUTTON_26_MODIFIER_1_ACTION Item One Action
Use the granular _MODIFIER_X_KEY and
_MODIFIER_X_ACTION keys when you want
fine-grained layout control over modifier display — for example, placing the key combo and the action in separate
labelled boxes.