# OpenLogi configuration example. Copy only the sections you need.
schema_version = 7
selected_device = "receiver:aabbccdd:slot:1"

[app_settings]
launch_at_login = true
check_for_updates = false
auto_install_updates = false
show_in_menu_bar = true
capture_mouse_events = true
# Mouse button profiles: "pointer" (default) or "focused".
mouse_profile_target = "pointer"
smooth_scroll = false
vertical_scroll_sensitivity = 14
auto_download_assets = true
asset_source = "automatic"
language = "en"
thumbwheel_sensitivity = 14
appearance = "system"
ui_scale = "normal"
device_view_mode = "grid"
# macOS only: "openlogi" (the signed icon) or "prism".
app_icon = "openlogi"

[devices."receiver:aabbccdd:slot:1"]
custom_name = "Office mouse"
dpi = 1600
dpi_presets = [800, 1600, 3200]
thumbwheel_sensitivity = 20
invert_scroll = false
scroll_resolution = "high"

[devices."receiver:aabbccdd:slot:1".bindings]
Back = "BrowserBack"
Forward = "BrowserForward"
# Hold the chord for exactly as long as the physical button is held.
MiddleClick = { HoldShortcut = "Ctrl+Space" }
# Release before 500 ms runs `short`; reaching 500 ms runs `long` once.
DpiToggle = { short = "ShowDesktop", long = "MissionControl" }
# The thumb wheel's capacitive tap. Inert unless set here; the wheel also
# reports taps from incidental thumb contact.
Thumbwheel = "AppExpose"

[devices."receiver:aabbccdd:slot:1".bindings.GestureButton]
Click = "MissionControl"
Up = "MissionControl"
Down = "AppExpose"
Left = "PreviousDesktop"
Right = "NextDesktop"

[devices."receiver:aabbccdd:slot:1".per_app_bindings."com.microsoft.VSCode"]
Back = "Undo"

[devices."receiver:aabbccdd:slot:1".per_app_bindings."exe:sharex.exe"]
MiddleClick = { CustomShortcut = "F1" }

[devices."receiver:aabbccdd:slot:1".action_ring]
enabled = true
haptics = true

[devices."receiver:aabbccdd:slot:1".action_ring.default.slots]
Top = { action = "Copy", icon = "Keyboard" }
Right = { action = { OpenApplication = { path = "/Applications/Safari.app", display_name = "Safari" } }, icon = "Applications" }
Bottom = { action = "ShowDesktop", label = "Desktop" }

[devices."receiver:aabbccdd:slot:1".lighting]
enabled = true
color = "ff0000"
brightness = 80

[devices."receiver:aabbccdd:slot:1".smartshift]
mode = "ratchet"
auto_disengage = 16
tunable_torque = 50

# Put host-switch links on the keyboard's physical entry.
[devices."receiver:aabbccdd:slot:2"]
host_switch_targets = ["receiver:aabbccdd:slot:1"]
fn_lock = false

# Keyboard keys are named by their HID++ control: a catalog name such as
# `KeyScreenCapture`, or `control:0x<cid>` for any control `openlogi diag
# controls` lists as divertable. An unlisted key keeps its firmware function.
[devices."receiver:aabbccdd:slot:2".bindings]
KeySearch = "MissionControl"
KeyScreenCapture = "Sleep"
KeyCalculator = { OpenApplication = { path = "/System/Applications/Calculator.app", display_name = "Calculator" } }
"control:0x01f3" = { CustomShortcut = "Cmd+Shift+4" }

# Since schema 5 a device is keyed by what it *is* — `unit:<hex>` or
# `serial:<s>` — rather than by the route it was reached on, so its settings
# follow it between its receiver and a cable instead of splitting into two
# entries. `receiver:…` entries above are the pre-5 shape; they are folded onto
# an identity key the first time the device is seen online with the GUI running.
[devices."unit:6be9d300"]
dpi = 1600

# Every route this device has been seen on. The set of keys is also the index
# that identifies the device while it is asleep and only the route is known,
# which is why a route with nothing special about it is still written out as an
# empty table.
[devices."unit:6be9d300".links."receiver:aabbccdd:slot:3"]

# Capabilities as measured on one link. A device can genuinely expose different
# features per transport — a G502 LIGHTSPEED publishes hi-res wheel over its
# receiver and not over USB — so this is recorded per link, not per device.
[devices."unit:6be9d300".links."direct:046d:c08d".capabilities]
buttons = true
pointer = true
lighting = false
scroll_inversion = true
hires_wheel = false

# Settings deliberately made different on this link. Anything not overridden
# here falls through to the device-level value above.
[devices."unit:6be9d300".links."direct:046d:c08d".overrides]
dpi = 800

# Global function-key remapping, independent of a device.
[keyboard.bindings]
f1 = "MissionControl"
"shift+command+f5" = "ShowDesktop"