Skip to content

Files and formats

LordBooker edited this page Oct 29, 2026 · 3 revisions

Files and formats

Path Content
~/.config/gkey-config/profiles/<model>/*.json profiles, one file each
~/.config/gkey-config/macros/*.json macros, shared by all profiles and devices
~/.config/gkey-config/settings.json LCD pages
~/.local/state/gkey-config/state.json active profile and layer, stick rest position

The files are plain JSON and may be edited by hand; the daemon reloads them on save. Members the daemon does not know are kept when the application writes a file again. An invalid binding only disables that binding; an invalid file is skipped (see the daemon log).

Profile

{
  "name": "Default",
  "backlight": [51, 153, 255],
  "modes": {
    "M1": {
      "G1":  { "type": "key",     "key": "KEY_1" },
      "G2":  { "type": "combo",   "keys": ["KEY_LEFTCTRL", "KEY_C"] },
      "G3":  { "type": "mouse",   "button": "BTN_LEFT" },
      "G4":  { "type": "macro",   "macro": "hello", "repeat": "once" },
      "L1":  { "type": "mode",    "mode": 2 },
      "L2":  { "type": "profile", "profile": "next" },
      "L3":  { "type": "lcd",     "page": "previous" }
    },
    "M2": {},
    "M3": {}
  },
  "stick": { "mode": "keys", "deadzone": 0.25, "speed": 10, "scrollSpeed": 10 }
}
  • Key IDs are those shown in the application (G1, L1, …; G13 stick: STICK_UP, STICK_DOWN, STICK_LEFT, STICK_RIGHT, THUMB_LEFT, THUMB_DOWN, STICK_PRESS).
  • Key names are evdev names (KEY_A, KEY_LEFTCTRL, …) and mean physical key positions.
  • repeat: once, while_held, toggle, count (with "count": n).
  • profile: a profile name, next or previous.
  • lcd: next, previous or a page name.
  • Backlight: backlight ([r, g, b], G13 and G510) or backlightLevel and lcdBacklightLevel (0–2, G11, G15, G15 v2). Missing means the profile leaves the backlight as it is.
  • stick (G13): mode is keys, mouse, scroll or passthrough (joystick); deadzone 0.05–0.9; speed and scrollSpeed 1–50.

Macro

{
  "name": "copy-line",
  "description": "Select the current line and copy it",
  "steps": [
    { "tap": "KEY_HOME" },
    { "press": "KEY_LEFTSHIFT" },
    { "tap": "KEY_END", "hold": 20 },
    { "release": "KEY_LEFTSHIFT" },
    { "delay": 30 },
    { "press": "KEY_LEFTCTRL" }, { "tap": "KEY_C" }, { "release": "KEY_LEFTCTRL" }
  ]
}

Steps: press, release, tap (press, wait hold ms – default 10 –, release), delay (ms, at most 60000). Keyboard keys and mouse buttons are allowed. Keys still held when a macro ends are released.

Settings

{ "lcd": { "pages": ["status", "system", "clock", "text"] } }

Page names: intro, profile, status, system, cpu, amdgpu, nvidia, clock, text.

The complete design, including the device model files, is described in docs/CONCEPT.md.

Clone this wiki locally