|
| 1 | +# Corne v4 ZMK Configuration |
| 2 | + |
| 3 | +ZMK firmware config for Corne v4 with nice!nano v2 and nice!view displays. Optimized for macOS and Vim workflows. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +- **CAGS Home Row Mods** - Ctrl/Alt/Gui/Shift with Cmd on middle finger (Mac-optimized) |
| 8 | +- **Urob's Timeless Timing** - 280/175/150ms settings that eliminate misfires |
| 9 | +- **Hyper Key** - Hold right inner thumb for Ctrl+Alt+Cmd+Shift (like Raycast) |
| 10 | +- **Sticky Shift** - Tap right middle thumb for one-shot shift, hold for Raise layer |
| 11 | +- **Conditional Adjust Layer** - Hold Lower + Raise for F-keys, BT, media |
| 12 | +- **HJKL Navigation** - Arrow keys on home row in Raise layer |
| 13 | +- **macOS Bluetooth Fixes** - TX power and interval settings for Sequoia |
| 14 | + |
| 15 | +## Layers |
| 16 | + |
| 17 | +### Base (QWERTY + Home Row Mods) |
| 18 | +``` |
| 19 | ++-----+----+----+----+----+----+ +----+----+----+----+----+-----+ |
| 20 | +| TAB | Q | W | E | R | T | | Y | U | I | O | P | BSP | |
| 21 | ++-----+----+----+----+----+----+ +----+----+----+----+----+-----+ |
| 22 | +| ESC |CT/A|OP/S|CM/D|SH/F| G | | H |SH/J|CM/K|OP/L|CT/;| ' | |
| 23 | ++-----+----+----+----+----+----+ +----+----+----+----+----+-----+ |
| 24 | +| SFT | Z | X | C | V | B | | N | M | , | . | / | RET | |
| 25 | ++-----+----+----+----+----+----+ +----+----+----+----+----+-----+ |
| 26 | + +----+----+----+ +----+----+----+ |
| 27 | + | GUI| LWR| SPC| | ESC| SFT| BSP| |
| 28 | + | | | | |/HYP|/RSE| | |
| 29 | + +----+----+----+ +----+----+----+ |
| 30 | +``` |
| 31 | + |
| 32 | +### Lower (Numbers & Symbols) |
| 33 | +``` |
| 34 | ++----+----+----+----+----+----+ +----+----+----+----+----+----+ |
| 35 | +| | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | |
| 36 | ++----+----+----+----+----+----+ +----+----+----+----+----+----+ |
| 37 | +| | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | |
| 38 | ++----+----+----+----+----+----+ +----+----+----+----+----+----+ |
| 39 | +| | ` | [ | ] | \ | ~ | | - | = | { | } | | | | |
| 40 | ++----+----+----+----+----+----+ +----+----+----+----+----+----+ |
| 41 | +``` |
| 42 | + |
| 43 | +### Raise (Navigation) |
| 44 | +``` |
| 45 | ++----+----+----+----+----+----+ +----+----+----+----+----+----+ |
| 46 | +| | | | | | | |PgUp|Home| Up | End| | Del| |
| 47 | ++----+----+----+----+----+----+ +----+----+----+----+----+----+ |
| 48 | +| |Ctrl| Opt| Cmd| Sft| | |PgDn|Left|Down|Rght| | | |
| 49 | ++----+----+----+----+----+----+ +----+----+----+----+----+----+ |
| 50 | +| | | | | | | | | W<-| | W->| | | |
| 51 | ++----+----+----+----+----+----+ +----+----+----+----+----+----+ |
| 52 | +``` |
| 53 | +Left hand has mods for shortcuts like Cmd+Arrow or Shift+Arrow. |
| 54 | + |
| 55 | +### Adjust (Lower + Raise) |
| 56 | +``` |
| 57 | ++----+----+----+----+----+----+ +----+----+----+----+----+----+ |
| 58 | +|BTCL| F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10| | |
| 59 | ++----+----+----+----+----+----+ +----+----+----+----+----+----+ |
| 60 | +| | BT0| BT1| BT2| BT3| BT4| |Vol+|Prev|Play|Next| F11| F12| |
| 61 | ++----+----+----+----+----+----+ +----+----+----+----+----+----+ |
| 62 | +| | | | | | | |Vol-|Mute| | | | | |
| 63 | ++----+----+----+----+----+----+ +----+----+----+----+----+----+ |
| 64 | +``` |
| 65 | + |
| 66 | +## Build Workflow |
| 67 | + |
| 68 | +### Option 1: GitHub Actions |
| 69 | + |
| 70 | +Workflow is set up at `.github/workflows/build-zmk.yml`: |
| 71 | + |
| 72 | +```yaml |
| 73 | +name: Build ZMK Firmware |
| 74 | + |
| 75 | +on: |
| 76 | + push: |
| 77 | + paths: |
| 78 | + - 'keyboards/corne/**' |
| 79 | + workflow_dispatch: |
| 80 | + |
| 81 | +jobs: |
| 82 | + build: |
| 83 | + runs-on: ubuntu-latest |
| 84 | + container: |
| 85 | + image: zmkfirmware/zmk-build-arm:stable |
| 86 | + steps: |
| 87 | + - uses: actions/checkout@v4 |
| 88 | + - name: Cache west modules |
| 89 | + uses: actions/cache@v4 |
| 90 | + with: |
| 91 | + path: | |
| 92 | + modules/ |
| 93 | + tools/ |
| 94 | + zephyr/ |
| 95 | + bootloader/ |
| 96 | + key: ${{ runner.os }}-zmk-${{ hashFiles('keyboards/corne/config/west.yml') }} |
| 97 | + - name: West init |
| 98 | + run: west init -l keyboards/corne/config |
| 99 | + - name: West update |
| 100 | + run: west update |
| 101 | + - name: Build left |
| 102 | + run: west build -s zmk/app -b nice_nano_v2 -- -DSHIELD="corne_left nice_view_adapter nice_view" -DZMK_CONFIG="${GITHUB_WORKSPACE}/keyboards/corne/config" |
| 103 | + - name: Archive left |
| 104 | + uses: actions/upload-artifact@v4 |
| 105 | + with: |
| 106 | + name: corne_left |
| 107 | + path: build/zephyr/zmk.uf2 |
| 108 | + - name: Build right |
| 109 | + run: | |
| 110 | + rm -rf build |
| 111 | + west build -s zmk/app -b nice_nano_v2 -- -DSHIELD="corne_right nice_view_adapter nice_view" -DZMK_CONFIG="${GITHUB_WORKSPACE}/keyboards/corne/config" |
| 112 | + - name: Archive right |
| 113 | + uses: actions/upload-artifact@v4 |
| 114 | + with: |
| 115 | + name: corne_right |
| 116 | + path: build/zephyr/zmk.uf2 |
| 117 | +``` |
| 118 | +
|
| 119 | +Push changes to trigger build, then download artifacts from the Actions tab. |
| 120 | +
|
| 121 | +### Option 2: Use ZMK's Template |
| 122 | +
|
| 123 | +1. Fork [zmk-config](https://github.com/zmkfirmware/zmk-config) |
| 124 | +2. Copy `config/` contents to the fork |
| 125 | +3. Update `build.yaml` in fork root |
| 126 | +4. GitHub Actions builds automatically on push |
| 127 | + |
| 128 | +### Option 3: Local Build |
| 129 | + |
| 130 | +```bash |
| 131 | +# Install west and dependencies |
| 132 | +pip install west |
| 133 | +
|
| 134 | +# Initialize workspace |
| 135 | +west init -l keyboards/corne/config |
| 136 | +west update |
| 137 | +
|
| 138 | +# Build left half |
| 139 | +west build -s zmk/app -b nice_nano_v2 -- \ |
| 140 | + -DSHIELD="corne_left nice_view_adapter nice_view" \ |
| 141 | + -DZMK_CONFIG="$(pwd)/keyboards/corne/config" |
| 142 | +
|
| 143 | +# Copy firmware |
| 144 | +cp build/zephyr/zmk.uf2 corne_left.uf2 |
| 145 | +
|
| 146 | +# Build right half |
| 147 | +rm -rf build |
| 148 | +west build -s zmk/app -b nice_nano_v2 -- \ |
| 149 | + -DSHIELD="corne_right nice_view_adapter nice_view" \ |
| 150 | + -DZMK_CONFIG="$(pwd)/keyboards/corne/config" |
| 151 | +
|
| 152 | +cp build/zephyr/zmk.uf2 corne_right.uf2 |
| 153 | +``` |
| 154 | + |
| 155 | +## Flashing |
| 156 | + |
| 157 | +1. Connect keyboard half via USB |
| 158 | +2. Double-tap reset button (enters bootloader, appears as USB drive) |
| 159 | +3. Copy `.uf2` file to the drive |
| 160 | +4. Drive auto-ejects when complete |
| 161 | +5. Repeat for other half |
| 162 | + |
| 163 | +## Bluetooth Pairing |
| 164 | + |
| 165 | +- **BT0-BT4**: Select profile (Adjust layer, left home row) |
| 166 | +- **BT_CLR**: Clear current profile's pairing (Adjust layer, top left) |
| 167 | + |
| 168 | +To pair: select an empty profile, put device in pairing mode, keyboard should appear as "Corne". |
| 169 | + |
| 170 | +## Customization |
| 171 | + |
| 172 | +### Adjust Home Row Mod Timing |
| 173 | + |
| 174 | +For faster typists, modify `require-prior-idle-ms` using: `10500 ÷ your_WPM` |
| 175 | + |
| 176 | +```c |
| 177 | +// In corne.keymap, find hml/hmr behaviors |
| 178 | +require-prior-idle-ms = <105>; // For 100 WPM |
| 179 | +``` |
| 180 | + |
| 181 | +### Disable Home Row Mods (Learning Period) |
| 182 | + |
| 183 | +Replace home row in base layer with plain keys: |
| 184 | + |
| 185 | +```c |
| 186 | +&kp ESC &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT |
| 187 | +``` |
| 188 | + |
| 189 | +## Troubleshooting |
| 190 | + |
| 191 | +| Issue | Solution | |
| 192 | +|-------|----------| |
| 193 | +| Laggy Bluetooth on macOS | Already configured in `corne.conf`, ensure using latest macOS | |
| 194 | +| Misfires during fast typing | Increase `require-prior-idle-ms` | |
| 195 | +| Accidental layer activations | Increase `tapping-term-ms` | |
| 196 | +| Display not working | Check `CONFIG_ZMK_DISPLAY=y` in conf | |
| 197 | +| Won't connect after BT_CLR | Remove device from macOS Bluetooth preferences, re-pair | |
| 198 | + |
| 199 | +## Resources |
| 200 | + |
| 201 | +- [ZMK Documentation](https://zmk.dev/docs) |
| 202 | +- [Urob's Timeless HRM](https://github.com/urob/zmk-config) |
| 203 | +- [ZMK Keymap Editor](https://nickcoutsos.github.io/keymap-editor/) (visual editor) |
0 commit comments