HACHACON

Configuration

HACHACON’s assignments live in a single config.json in a folder you choose. Until you choose a folder, it runs with built-in assignments and reads or writes no files.

To have an AI write it for you instead, see the AI prompt.

Choose a config folder

  1. Click the menu bar icon → Choose Config Folder… and pick a folder (HACHACON remembers it across launches)
  2. If the folder has no config.json, the built-in settings are written there. Edit it with any text editor
  3. When you save, HACHACON reloads it and shows CONFIG RELOADED at the bottom of the screen
  4. If there is a mistake, HACHACON keeps the last settings that loaded and shows the line number on screen, like CONFIG ERROR · LINE 42. The ⚠ line in the menu shows why (click it for the full message)

Reveal Config Folder in Finder opens the folder. Show Mappings… shows what each button does right now (the row lights up when you press the button).

Overall shape

{
  "startLayer": "base",
  "mouse":  { "speed": 1400, "curve": 2.0, "deadzone": 0.12 },
  "scroll": { "speed": 900, "curve": 1.6, "deadzone": 0.15, "natural": false },
  "repeat": { "delay": 0.35, "interval": 0.04 },
  "voice":  { "device": "DualSense", "light": "#ff3030" },
  "hud":    { "enabled": true },
  "haptics": { "enabled": true, "intensity": 1.0 },
  "inputViewer": { "enabled": false, "corner": "bottomRight", "scale": 1.0 },
  "menus": { },
  "appMenus": { },
  "layers": {
    "base": {
      "light": "#2050ff",
      "leftStick": "mouse",
      "rightStick": "scroll",
      "buttons": {
        "south": { "type": "mouse", "button": "left" },
        "east":  { "type": "mouse", "button": "right" },
        "l1":    { "type": "layer", "name": "nav", "mode": "hold" }
      }
    },
    "nav": {
      "fallback": "base",
      "light": "#00c060",
      "buttons": {
        "south": { "type": "key", "key": "cmd+tab" }
      }
    }
  }
}

Anything you leave out uses the built-in value. startLayer is the layer in layers that is active at launch.

Button names

Face buttons are named by position, not by symbol, so the same name means the same finger position on any controller.

NamePositionDualSenseXbox
southBottom face button✕A
eastRight face button○B
westLeft face button□X
northTop face button△Y
l1 r1Shoulder buttonsL1 R1LB RB
l2 r2TriggersL2 R2LT RT
l3 r3Stick clicksL3 R3Left / right stick
dpadUp dpadDown dpadLeft dpadRightD-pad
menuSmall right buttonOptionsMenu
viewSmall left buttonCreateView
homeCenter buttonPSXbox button

The touchpad (DualSense, DualShock 4) has these names:

On macOS 26, the PS button (home) is used by the system and never reaches HACHACON.

Sticks

Set leftStick / rightStick in a layer.

ValueWhat it does
"mouse"Move the pointer
"scroll"Scroll
"arrows"Arrow key in the pushed direction (repeats while held)
{ "up": "k", "down": "j", "left": "h", "right": "l" }Any key per direction
"none"Nothing

Tune the speed with the top-level mouse and scroll:

Actions

What a button does. As a rule, an action starts when you press and ends when you release.

typeExampleWhat it does
key{ "type": "key", "key": "cmd+shift+4" }Holds the key while the button is held. "repeat": true repeats it. A modifier alone ("key": "cmd") combines with other buttons and clicks
mouse{ "type": "mouse", "button": "left" }left / right / middle. The mouse button stays down while held, so you can drag with the stick. "clicks": 2 double-clicks
layer{ "type": "layer", "name": "nav", "mode": "hold" }Switches layers. hold while held, toggle on each press, set to stay there
precision{ "type": "precision", "factor": 0.3 }Multiplies pointer and scroll speed while held
voice{ "type": "voice", "key": "f5" }Voice input while held (see “Voice input”)
menu{ "type": "menu", "name": "main" }Opens a ring menu (see “Ring menus”)
appMenu{ "type": "appMenu" }Opens the ring menu for the app under the pointer
open{ "type": "open", "app": "Safari" } / { "type": "open", "url": "https://example.com" }Opens an app (name or bundle ID) or a URL
shortcut{ "type": "shortcut", "name": "Pull work" }Runs a shortcut from the Shortcuts app by name (see “Running commands”)
shell{ "type": "shell", "command": "open ~/Downloads" }Runs a shell command. Needs a one-time setup (see “Running commands”)
none{ "type": "none" }Nothing. Use it to cancel an assignment that comes from fallback

Key names

Use US layout names.

Key repeat timing is set by the top-level repeat (delay is seconds before repeating starts, interval is the gap between repeats).

Layers

List named layers under layers.

A common pattern: put everyday assignments in base, hold L1 to switch to nav, and write only the buttons you want to change in nav.

Ring menus

A ring appears in the center of the screen while you hold a button. Point with the stick and release to run.

"menus": {
  "main": {
    "color": "#ff3060",
    "stick": "right",
    "items": [
      { "label": "Spotlight", "icon": "magnifyingglass", "action": { "type": "key", "key": "cmd+space" } },
      { "label": "Apps",      "icon": "square.grid.2x2", "action": { "type": "menu", "name": "apps" } }
    ]
  },
  "apps": {
    "color": "#30c0ff",
    "items": [
      { "label": "Finder", "icon": "folder", "action": { "type": "open", "app": "Finder" } }
    ]
  }
},
"layers": { "base": { "buttons": { "touchpadLeft": { "type": "menu", "name": "main" } } } }

Per-app menus

An appMenu button opens the ring menu for the app under the pointer.

"appMenus": { "Google Chrome": "chrome", "Code": "vscode" },
"layers": { "base": { "buttons": { "touchpadRight": { "type": "appMenu" } } } }

Use the app name shown in the menu bar, with matching case. If you press it over an app with no menu, NO MENU App Name appears at the bottom of the screen; copy that name as-is.

Voice input

HACHACON does no speech recognition itself. It presses your voice input app’s shortcut.

"r2": { "type": "voice", "key": "f5" }

To use macOS Dictation, turn on System Settings → Keyboard → Dictation, set the shortcut to “Customize…”, and press R2 (F5 is recorded).

Running commands

Run a shortcut you made in the Shortcuts app by name. No setup is needed in HACHACON.

{ "type": "shortcut", "name": "Pull work" }

With the “Run Shell Script” action you can run shell commands too (turn on “Allow Running Scripts” in Shortcuts → Settings → Advanced). Make one shortcut that runs its input as a command, and you can write commands in config.json:

  1. Create a new shortcut named Run Command in the Shortcuts app
  2. Add “Run Shell Script”, set the shell to zsh, the input to “Shortcut Input”, and pass input “to stdin”
  3. Make the script the single line exec /bin/sh
  4. In the details (ⓘ), set “Receive” to Text
{ "type": "shortcut", "name": "Run Command", "input": "git -C ~/work pull" }

Shortcuts that ask for input (such as “Ask for Input”) get stuck, so do not use them. Write commands from Homebrew and the like with full paths.

shell (advanced)

Write commands directly without making a shortcut. An App Store app cannot run commands that use your home folder or git on its own, so you place a small script once.

  1. Write a shell action in config.json and save. Set Up Shell Script… appears in the menu bar; click it
  2. A message explains what will be installed and why you install it yourself. Click Continue…
  3. In the save window, keep the name run.sh and click Install

The script is just these two lines. HACHACON passes command to it.

#!/bin/sh
exec /bin/sh -c "$1"
{ "type": "shell", "command": "open ~/Downloads" }

If you press a shell button before installing the script, nothing runs and ⚠ Shell setup needed appears in the menu. To stop using shell, delete ~/Library/Application Scripts/io.github.jewel12.hachacon/run.sh. To just open an app or URL, open is enough.

On-screen display, vibration, input viewer

Built-in assignments

These apply before you write a config.json, and are written to your first config.json when you choose a folder.

base (light bar: blue)

InputAction
Left stickPointer
Right stickScroll
✕Left click (hold and use the stick to drag)
○Right click
□Backspace (repeats)
△Return
D-padArrow keys
L1 (hold)nav layer
R1 (hold)Pointer and scroll at 30% speed
L2 (hold)⌘
R2 (hold)Voice input (F5)
L3 / R3Double click / middle click
Options / CreateTab / Esc
Touchpad left / right pressRing menu main / apps
Swipe left / right⌘[ / ⌘] (back / forward)
Swipe up / downMission Control / App Exposé
InputAction
Left stickArrow keys
✕ / ○⌘Tab / ⌘W
□ / △⌘C / ⌘V
R1 (hold)Shift (select)
L2 / R2Zoom out ⌘− / zoom in ⌘=
D-pad up / downPage Up / Page Down
D-pad left / right⌘⇧[ / ⌘⇧] (switch tabs)
Options / Create⌘T / ⌘Z
Touchpad left press⌘L

Other buttons work as in base. The main ring menu has Spotlight, Mission Control, Screenshot, Apps (Finder / Safari / Terminal / System Settings), and Edit (Undo, Redo, Cut, Copy, Paste, Select All).