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
- Click the menu bar icon →
Choose Config Folder…and pick a folder (HACHACON remembers it across launches) - If the folder has no
config.json, the built-in settings are written there. Edit it with any text editor - When you save, HACHACON reloads it and shows
CONFIG RELOADEDat the bottom of the screen - 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.
| Name | Position | DualSense | Xbox |
|---|---|---|---|
south | Bottom face button | ✕ | A |
east | Right face button | ○ | B |
west | Left face button | □ | X |
north | Top face button | △ | Y |
l1 r1 | Shoulder buttons | L1 R1 | LB RB |
l2 r2 | Triggers | L2 R2 | LT RT |
l3 r3 | Stick clicks | L3 R3 | Left / right stick |
dpadUp dpadDown dpadLeft dpadRight | D-pad | ||
menu | Small right button | Options | Menu |
view | Small left button | Create | View |
home | Center button | PS | Xbox button |
The touchpad (DualSense, DualShock 4) has these names:
touchpadLefttouchpadRight: pressing the touchpad, split by whether your finger is on the left or right halfswipeUpswipeDownswipeLeftswipeRight: one-finger swipes. They fire once when you lift your finger. Since they cannot be held, hold-only actions (precision,voice) do nothing
On macOS 26, the PS button (home) is used by the system and never reaches HACHACON.
Sticks
Set leftStick / rightStick in a layer.
| Value | What 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:
speed: speed at full tilt (pixels per second)curve: higher values make small tilts slowerdeadzone: tilts smaller than this are ignored (0 to 1)scroll.natural:truescrolls in the same direction as trackpad natural scrolling
Actions
What a button does. As a rule, an action starts when you press and ends when you release.
| type | Example | What 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.
- Letters and digits:
atoz,0to9 - Function keys:
f1tof20 spaceentertabescapebackspaceforwarddeleteupdownleftrighthomeendpageuppagedown- Symbols:
-=[];',./\` - JIS keys:
eisukanayenunderscore - Modifiers:
cmdshiftalt(option)ctrlfn, joined with+(cmd+shift+4)
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.
light: light bar color for the layer (#rrggbb)fallback: buttons and sticks not set in this layer use thefallbacklayer’s assignments. Fallbacks can chain- While a
holdlayer is active, choosing another layer withtoggleorsettakes effect only after you release theholdbutton
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" } } } }
- Pick: push the
stick(right by default) toward an item. Items go clockwise from the top (1 to 10 items) - Run: release the button that opened it. With
"mode": "toggle", the ring stays open after release and runs on the next press. ✕ also runs it - Cancel: return the stick to the center, then release
- Nest: put a
menuaction in an item. Keep the stick on that item for a moment to enter the sub-ring - Back: ○, or push the stick you are not using for picking, goes back one ring
color: color of the ring and the light baricon: an SF Symbols name (find them in Apple’s SF Symbols app), or an image in your config folder ("./icons/mail.png")preview: a large image shown outside the ring while the item is picked ("previews/tag-0.png", relative to the config folder). It is reloaded each time, so other tools can rewrite it- An item’s
actionis written like any other action and runs as a quick press and release
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" }
- Pressing the button presses the shortcut to start, and releasing presses it again to stop. For push-to-talk apps that need the key held, use
"mode": "hold" - While held, the Mac’s microphone switches to the DualSense and switches back on release. Set
"mic": falseto keep your microphone. The DualSense microphone is available only over USB - While active, the menu bar icon becomes a microphone,
● VOICEappears at the bottom of the screen, and the light bar turnsvoice.light
To use macOS Dictation, turn on System Settings → Keyboard → Dictation, set the shortcut to “Customize…”, and press R2 (F5 is recorded).
Running commands
Shortcuts app (recommended)
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:
- Create a new shortcut named
Run Commandin the Shortcuts app - Add “Run Shell Script”, set the shell to
zsh, the input to “Shortcut Input”, and pass input “to stdin” - Make the script the single line
exec /bin/sh - 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.
- Write a
shellaction inconfig.jsonand save.Set Up Shell Script…appears in the menu bar; click it - A message explains what will be installed and why you install it yourself. Click
Continue… - In the save window, keep the name
run.shand clickInstall
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
hud.enabled:falsehides on-screen messages such as layer nameshaptics.enabled:falseturns off vibration.intensityis the strength (0 to 1)inputViewer.enabled:trueshows a controller in a corner of the screen.cornerisbottomRight/bottomLeft/topRight/topLeft,scaleis the size (0.5 to 3). Record it with screen capture (not window capture) in OBS and the likedebug:truewrites which layer did what to the log on every press
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)
| Input | Action |
|---|---|
| Left stick | Pointer |
| Right stick | Scroll |
| ✕ | Left click (hold and use the stick to drag) |
| ○ | Right click |
| □ | Backspace (repeats) |
| △ | Return |
| D-pad | Arrow keys |
| L1 (hold) | nav layer |
| R1 (hold) | Pointer and scroll at 30% speed |
| L2 (hold) | ⌘ |
| R2 (hold) | Voice input (F5) |
| L3 / R3 | Double click / middle click |
| Options / Create | Tab / Esc |
| Touchpad left / right press | Ring menu main / apps |
| Swipe left / right | ⌘[ / ⌘] (back / forward) |
| Swipe up / down | Mission Control / App Exposé |
nav (while holding L1, light bar: green)
| Input | Action |
|---|---|
| Left stick | Arrow keys |
| ✕ / ○ | ⌘Tab / ⌘W |
| □ / △ | ⌘C / ⌘V |
| R1 (hold) | Shift (select) |
| L2 / R2 | Zoom out ⌘− / zoom in ⌘= |
| D-pad up / down | Page 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).