Profile File Reference
This page is for people who edit profile files by hand or write scripts. It lists where a profile file lives, what each field means, which values it takes, and its limits. Most people make profiles in the app and never need this page.
OpenJoystickDriver (OJD) stores each profile in its own XML property list (.plist), a text file format macOS uses for settings.
Profiles live in ~/Library/Application Support/OpenJoystickDriver/Profiles. Edit them by hand or from a script when the app has no control for what you want. A wrong field stops the profile from loading, so run ojd profile validate before you use it.
flowchart LR
App[App or ojd] -->|saves| F[profile .plist]
You[You, by hand] -->|edit| F
F -->|ojd profile validate| V{Valid?}
V -->|yes| U[OJD uses it]
V -->|no| E[Error names the field]
Contents
- File Location
- Damaged Files
- Error Codes
- File Shape
- Profile Fields
- Binding Fields
- Output Policy Fields
- Source Types
- Destination Types
- Rules Across Fields
- Turbo and Multi-Tap Fields
- Analog, Touch, and Motion Fields
- Pointer Speed Fields
- Macro Fields
- Limits
- Further Reading
File Location
Profiles and the active profile selections are in this folder:
~/Library/Application Support/OpenJoystickDriver/
Profiles/<UUID>.plist
ActiveProfiles.plist
Each file is named after the profile id in uppercase. OJD makes each file readable only by you (mode 0600, in folders with mode 0700). It replaces a file in one step (an atomic write), so a crash never leaves half a file behind. OJD applies a file change while it runs. See Importing and exporting profiles.
Damaged Files
OJD skips a profile file it can’t read, one that fails validation, and one whose name doesn’t match its id. It also drops an active selection that names a skipped file. Other profiles stay available. If OJD cannot read ActiveProfiles.plist, no profile is active.
OJD reports each damaged file in Settings and in ojd profile list. You cannot create, change, or activate profiles until each is resolved. Removing a file, or resetting ActiveProfiles.plist to an empty list, first saves a backup named <file>.backup-<time>-<UUID> beside it.
Error Codes
ojd profile commands report these codes.
E5001:apiVersionis missing or unsupported.E3008: the file is too large or isn’t an XML property list. It also covers a file that fails to decode or validate, such as one with a wrongkindor an unknown field.E3006: another profile uses the name.E3005: the file name does not match the profileid, or a selection cannot be used.
File Shape
A profile file, exported or not, holds one profile dictionary. ActiveProfiles.plist holds an array of dictionaries, each with a controller model (vendorID, productID), a profileID, and an optional applicationScope.
Profile Fields
| Field | Required | Meaning |
|---|---|---|
apiVersion |
Yes | openjoystickdriver/v1alpha4 |
kind |
Yes | Profile |
id |
Yes | UUID |
name |
Yes | 1 to 80 characters |
device |
Yes | vendorID, productID, and optional unit (from ojd controller list) to limit the profile to one controller |
applicationScope |
Yes | type Global, or type Application with appIDs, a list of distinct application IDs; any one in front applies it. A file with appID is refused; ojd migrate converts it |
bindings |
Yes | Assignments |
outputPolicy |
No | virtualGamepad and physicalInput; see Output policy fields |
physicalColor |
No | Lighting color |
motionTuning, gyroOutput, joyConPair, stickMappings, triggerMappings, touchMappings |
No | See Analog, touch, and motion fields |
pointerSpeed |
No | See Pointer speed fields |
chords, sequences, layers, macros |
No | Combinations, layers, and named macros |
A profile with device.unit wins over an active profile for the whole model in the same scope. Activating it replaces only that unit and scope.
OJD rejects unknown keys and any date or data value. profile.schema.json describes the file but not rules that span fields, such as a source used twice. Check both with ojd profile validate FILE.
Binding Fields
A binding has id, source, destination, and these optional keys:
| Key | Values | Default |
|---|---|---|
behavior |
Hold, Toggle, TapOnPress, TapOnRelease, Pulse, Press, Release |
Hold |
pulseDurationMs |
1 to 5000 | 100 |
axisTuning |
Dictionary; see below | None |
turbo, longHold, multiTap |
See Turbo and multi-tap fields | None |
additionalActions |
Actions with id, destination, and the binding’s behavior, pulseDurationMs, turbo, longHold, and multiTap |
None |
remark |
A note; see Rules across fields | None |
axisTuning requires deadzone (0 to 0.95), digitalActivationThreshold (0.01 to 1), gain (0.1 to 10), inverted, and responseCurve (Linear, EaseIn, EaseOut, or SmoothStep). longHold has destination and durationMs (100 to 5000).
A chord has id, sources (two or more), destination, mode (Modifier or Simultaneous; default Modifier), and windowMs (1 to 1000; default 50). A sequence has the same keys except mode, with windowMs 200 to 10000. A layer has id, name, activator, activationMode (Hold or Toggle), bindings, chords, sequences, and optional motionTuning.
Output Policy Fields
outputPolicy has two keys, and both are required when outputPolicy is present.
| Key | Values | Meaning |
|---|---|---|
virtualGamepad |
Disabled, Mapped, Passthrough |
No virtual gamepad; assigned destinations only; also unassigned controls |
physicalInput |
Shared, Exclusive |
Shared lets macOS still see the controller. Exclusive makes OJD take it. |
For the app labels, see Output policy.
Source Types
A source is a dictionary with a type. The other keys depend on the type.
type |
Other keys |
|---|---|
Button |
button: a button name from the schema |
Dpad |
direction: DpadUp, DpadDown, DpadLeft, or DpadRight |
Axis |
axis: an axis name from the schema |
AxisDirection |
axis and direction (Negative or Positive) |
TriggerStage |
trigger (Left or Right) and stage (Soft or Full) |
MotionLean |
direction (Left or Right) |
TouchContact |
surface (Primary, Left, or Right) |
TouchGrid |
surface, columns and rows (1 to 16), column and row (0 to 15) |
TouchSwipe |
surface, direction (Up, Down, Left, or Right), minimumDistance (0.01 to 1) |
StickRegion |
stick (Left or Right), innerRadius, outerRadius, hysteresis (0 to 0.25), and optionally fromDegrees and toDegrees (0 to 360) |
TriggerBand |
trigger (Left or Right), from, to, hysteresis (0 to 0.25) |
TouchArea |
surface, x, y, width, height |
Button and axis names are in profile.schema.json and vocabulary.schema.json. Gamepad axis names are LeftStickX, LeftStickY, RightStickX, RightStickY, LeftTrigger, and RightTrigger.
Destination Types
A destination is a dictionary with a type. The other keys depend on the type.
type |
Other keys |
|---|---|
Keyboard |
key (a key name such as KeyA, Digit1, Space, or ArrowUp) and modifiers, a list of Alt, Control, Meta, and Shift |
MouseButton |
button: Left, Right, Middle, Back, or Forward |
MouseMovement |
axis: X or Y |
PointerPosition |
axis: X or Y. Only an axis source drives it, with an axisTuning like MouseMovement. The value from -1 to 1 maps across the main display. |
Scroll |
axis: X or Y |
GamepadButton |
button |
GamepadDpad |
direction: DpadUp, DpadDown, DpadLeft, or DpadRight |
GamepadAxis |
axis |
Physical |
physical: a physical output (see below) |
Macro |
macro: the id of a macro |
SystemKey |
systemKey: PlayPause, NextTrack, PreviousTrack, FastForward, Rewind, VolumeUp, VolumeDown, Mute, BrightnessUp, BrightnessDown, KeyboardIlluminationUp, or KeyboardIlluminationDown. On the command line, use lowercase hyphenated names such as volume-up. |
SystemAction |
action: MissionControl, Launchpad, Screenshot, LockScreen, or ShowDesktop |
OpenApplication |
bundleIdentifier |
OpenURL |
url |
RunShortcut |
name |
TypeText |
text (1 to 128 characters) |
ProfileSwitch |
profile: a profile id, Next, or Previous |
LayerSet |
layer (the layer name) and mode (On, Off, or Toggle) |
Pause |
mode: On, Off, or Toggle |
Speak |
text (1 to 128 characters) and optionally voice (a voice identifier) |
MidiNote |
channel (1 to 16), note (0 to 127), velocity (1 to 127) |
MidiControlChange |
channel (1 to 16), controller (0 to 127) |
A Physical destination has its own type:
type |
Other keys |
|---|---|
Rumble |
motor (LowFrequency, HighFrequency, LeftTrigger, RightTrigger, LeftHaptic, or RightHaptic) and intensity (0 to 1) |
PlayerIndicator |
indicator: 0, 1, 2, 3, or 4 |
Color |
red, green, blue (each 0 to 255) |
Brightness |
intensity (0 to 1) |
AdaptiveTrigger |
trigger (Left or Right) and effect: a dictionary with kind (Off or Resistance), startPosition, and strength (each 0 to 1) |
Rules Across Fields
Beyond the schema, OJD requires these rules and refuses a profile with E3008 that breaks one:
OpenURLholds an absolute URL that is notfile.ProfileSwitchholds a profile of the same model,Next, orPrevious.Speakholds a voice the Mac has.pulseDurationMsis other than 100 only with thePulsebehavior.- An adaptive trigger effect of kind
OffhasstartPositionandstrength0. - Chord, sequence, gyro activation, gyro trackball, and layer activator sources are never a whole axis.
gyroOutputsetsactivationSourceexactly whenactivationModeis notAlways.lean.hysteresisDegreesis belowthresholdDegrees.steering.deadzoneDegreesis belowfullScaleDegrees.stickMapping.flickHysteresisis belowflickThreshold.stickTuning.innerDeadzoneplusouterDeadzoneis below 1.triggerMapping.softThresholdis belowfullThreshold, andhysteresisis belowsoftThreshold.- A touch grid has
columnbelowcolumnsandrowbelowrows. A touch area hasxpluswidthandyplusheightof at most 1. - A stick region has
innerRadiusbelowouterRadiusandfromDegreesdifferent fromtoDegrees; it runs clockwise from up, past 0 whentoDegreesis lower. Regions of one stick do not overlap. - A trigger band has
frombelowto. Bands of one trigger do not overlap, and a trigger with atriggerMappingsentry has no bands. - A profile name has at most 80 characters. A layer name has at most 40. Neither has a space at either end or a control character. The schema counts code points and OJD counts characters, so a name with combining marks can pass OJD and fail the schema.
- A
remarkis a note of 1 to 200 characters, counted and trimmed like a name. An emptyremarkis refused; omit the key instead.
Keyboard modifiers are a set: OJD merges repeats and writes them sorted.
Turbo and Multi-Tap Fields
turbo has repeatRateHz and dutyCycle, and optionally initialDelayMs and maxRepeats. initialDelayMs is 0 to 2500, the time from the first press to the first repeat; omitted means 0. maxRepeats is 1 to 500; omitted means repeat while held.
multiTap is a list of entries with count (2 to 5, unique), windowMs (50 to 1000, from one release to the next press), and destination.
Analog, Touch, and Motion Fields
Edit these with ojd profile edit PROFILE or ojd profile set, such as ojd profile set Racing triggerMappings.0.mode PreferFull.
stickMappings: modesAim(default),Flick,FlickOnly,RotateOnly,PointerArea,PointerRing,ScrollWheel,Steering. Aim speed 0 to 10000 degrees/s (360). Pointer radius 1 to 10000 points (128). Inner and outer deadzone 0 to 0.95 each, sum below 1 (0.1 and 0). Curve strength (the response exponent) 0.1 to 10 (1).triggerMappings: interactionSimultaneous,Exclusive,PreferFull,PreferFullCombined,ResponsivePreferFull, orResponsivePreferFullCombined. Soft threshold 0.01 to 0.95 (0.1), full threshold 0.05 to 1 (0.95), quick-pull window 1 to 1000 ms (150).touchMappings: pointer points per surface 1 to 5000 (1000), stick radius 0.01 to 1 (0.25), deadzone 0 to 0.95 (0.1). Swipe minimum distance default 0.2. Region hysteresis 0 to 0.25 (0.05).motionTuning: spaceLocal,Player(default), orWorld. Pitch and yaw sensitivity 0 to 100 (1). Smoothing 0 to 1000 ms (0). Slowest counted turn 0 to 1000 degrees/s (0). Stillness calibration is on by default.gyroOutput:Disabled(default),Mouse,LeftStick, orRightStick. Trackball velocity halvings per second is 0 to 1000.
Pointer Speed Fields
pointerSpeed requires driver, minScale, maxScale, and curve, and no other key. driver has type (Trigger or StickDepth) and side (Left or Right). minScale applies at driver value 0 and maxScale at 1, both 0 to 10. curve is Linear, EaseIn, EaseOut, or SmoothStep.
OJD rejects a driver the controller does not report. The scale multiplies pointer movement, not scrolling. See Set pointer speed. This slows the pointer to a quarter while the left trigger is fully pulled:
ojd profile set Racing pointerSpeed '{"driver":{"type":"Trigger","side":"Left"},"minScale":1,"maxScale":0.25,"curve":"Linear"}'
Macro Fields
A macro has id, name, steps, repeat, whileRunning, and interruptOnRelease, and no other key. A Macro destination runs it by id.
repeatis 1 to 500, orWhileHeld.whileRunningisIgnoreorRestart.interruptOnReleaseistrueorfalse.- A step’s
typeis one of:Tap,Press, orRelease, with adestinationDChord, withdestinations(an array ofD) andholdMsWait, withdurationMs
holdMsanddurationMsare 0 to 5000.Dis a keyboard, mouse button, gamepad button, or D-pad destination. OJD rejectsMacro,MidiNote, andMidiControlChangein a step.
OJD rejects:
- a macro name that repeats another, ignoring case
- a
MacroID that isn’t inmacros - one pass longer than 30 seconds (waits plus chord holds)
- a counted macro longer than 5 minutes
Macros are untested on real hardware.
Limits
| Item | Limit |
|---|---|
| Assignments per profile | 512 |
| Profiles | 128 |
One profile file or ActiveProfiles.plist |
4 MiB |
| Macros per profile, steps per macro | 16, 32 |
| Macro name | 1 to 40 characters |
| Bundle identifier | 3 to 255 characters |
Swift enforces the first two (maximumBindingCount and maximumProfileCount in Sources/OpenJoystickDriverKit/Remapping/Profile/Document/Profile.swift); the schema omits them. Profile names are unique without regard to case.