No description
Find a file
Viktor Hedefalk 77683afa29
Some checks failed
/ build (push) Has been cancelled
Draw ZMK keymaps / draw (push) Has been cancelled
Tarmak progression layers + layout selector (and Zephyr 4.1 board fix) (#1)
* feat: add Tarmak progression layers + layout selector

Mirror the internal-keyboard Kanata setup (Tarmak -> Colemak-DH) on the
Lily58, de-angled for the columnar/ortho layout: the ISO angle mod is
dropped (no <> key, no row stagger), the DH curl is kept. tarmak1a..4
plus the existing colemak_dh as the final step.

Add a `sel` layer (combo ESC+TAB) to hop between steps via the number
row; selection uses &to so it auto-closes. Repurpose the old
toggle_colemak combo into this selector.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* [Draw] feat: add Tarmak progression layers + layout selector

Mirror the internal-keyboard Kanata setup (Tarmak -> Colemak-DH) on the
Lily58, de-angled for the columnar/ortho layout: the ISO angle mod is
dropped (no <> key, no row stagger), the DH curl is kept. tarmak1a..4
plus the existing colemak_dh as the final step.

Add a `sel` layer (combo ESC+TAB) to hop between steps via the number
row; selection uses &to so it auto-closes. Repurpose the old
toggle_colemak combo into this selector.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix: migrate board to nice_nano//zmk for Zephyr 4.1 HWMv2

ZMK main moved to Zephyr 4.1, which uses Hardware Model v2: in-tree
boards now require the `zmk` variant and nice_nano_v2 collapses into
nice_nano (default revision 2.0.0). Without this the build fails with
"The selected board is not set up for ZMK and there is a ZMK variant
available". Pre-existing breakage from tracking `revision: main`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat: show layer names on nice!view + make SELECT non-destructive

Add display-name to every layer so the nice!view status screen shows
the name (e.g. "Tarmak4", "SELECT") instead of the raw layer index.

Make the unused top-row keys on the sel layer &trans instead of &none,
so accidentally opening SELECT without picking a step no longer leaves
those keys dead.

Document the Tarmak progression and the ESC+TAB selector in the README.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* [Draw] feat: show layer names on nice!view + make SELECT non-destructive

Add display-name to every layer so the nice!view status screen shows
the name (e.g. "Tarmak4", "SELECT") instead of the raw layer index.

Make the unused top-row keys on the sel layer &trans instead of &none,
so accidentally opening SELECT without picking a step no longer leaves
those keys dead.

Document the Tarmak progression and the ESC+TAB selector in the README.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix: shorten display-names so they fit the nice!view layer field

The nice!view layer field is only ~5-6 chars wide and truncates the
right edge, so "Tarmak1a"/"Tarmak3"/"Tarmak4" all showed as "Tarmak"
with the distinguishing suffix cut off. Use short labels with the
changing character up front: T1a/T1b/T2a/T2b/T3/T4, CMK, Num, SEL.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* [Draw] fix: shorten display-names so they fit the nice!view layer field

The nice!view layer field is only ~5-6 chars wide and truncates the
right edge, so "Tarmak1a"/"Tarmak3"/"Tarmak4" all showed as "Tarmak"
with the distinguishing suffix cut off. Use short labels with the
changing character up front: T1a/T1b/T2a/T2b/T3/T4, CMK, Num, SEL.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: hedefalk <116520+hedefalk@users.noreply.github.com>
2026-06-01 22:49:35 +02:00
.github/workflows try an svg output 2024-01-03 21:03:15 +01:00
config Tarmak progression layers + layout selector (and Zephyr 4.1 board fix) (#1) 2026-06-01 22:49:35 +02:00
keymap-drawer Tarmak progression layers + layout selector (and Zephyr 4.1 board fix) (#1) 2026-06-01 22:49:35 +02:00
build.yaml Tarmak progression layers + layout selector (and Zephyr 4.1 board fix) (#1) 2026-06-01 22:49:35 +02:00
eventviewer.png describing in readme 2024-01-06 18:07:38 +01:00
image-1.png describing in readme 2024-01-06 18:07:38 +01:00
image-2.png describing in readme 2024-01-06 18:07:38 +01:00
keymap_drawer.config.yaml colemak dh 2024-01-06 22:07:40 +01:00
README.md Tarmak progression layers + layout selector (and Zephyr 4.1 board fix) (#1) 2026-06-01 22:49:35 +02:00

Viktor's Lily58 Qwerty Swedish

ZMK config for my Lily58 keyboard.

Spec:

  • 99% Mac
  • I'm a decent qwerty+se typer and I'm trying to not reset my muscle memory entirely for now. I have plans on going Colemak DH and change out symbols to something better, but for now I'm sticking with something as close to what I'm used to from Swedish Mac layout - which is actually pretty far from even swedish Windows for symbols in many ways.
  • I'm using Swedish locale in OS so the hardware codes are adapted for that. So the chart below is representing what I have after software.

Layout

minusfive's keymap layout graphical representation

Tarmak progression → Colemak-DH

The board mirrors the Tarmak progression I run in Kanata on the laptop's internal keyboard, so I can learn Colemak-DH on both at the same pace. The ISO angle mod is intentionally dropped here (the Lily58 is columnar, has no <> key, and no row stagger to compensate for); the DH curl is kept. The last step is identical to the colemak_dh layer.

Switching step

  1. Press ESC + TAB together — opens the hidden SELECT layer (the nice!view shows SEL so you know it's armed).
  2. Tap a number to jump to that layout (this also closes SELECT):
    Key Layer Adds
    ESC QWERTY reset to QWERTY
    1 Tarmak1a E, N → home
    2 Tarmak1b + H→M curl swap
    3 Tarmak2a + B/V relocation
    4 Tarmak2b + T → home
    5 Tarmak3 + R, S, D placed (bottom row final)
    6 Tarmak4 + O → home
    7 Colemak-DH + L, U, I → full Colemak-DH

Selection persists across disconnects (it resets to QWERTY on power-off / reflash). Opened SELECT by mistake? Press ESC+TAB again to close it.

The active layer is shown on the nice!view via each layer's display-name. The labels are kept short because the nice!view layer field is only ~56 characters wide and truncates the right edge: QWERTY, T1a T1b T2a T2b T3 T4, CMK, Sym, Num, SEL.

Workflow

To understand what hardware codes actually represent what I get in my locale and what's actually printed on my swedish keyboards, I'm using karabiner eventviewer. So to configure a key that's not straightforward, I press it, see what I get in karabiner eventviewer and then try to look it up in zmk codes. For instance, the key for '<' and '>' is to the left of z on a swedish keyboard.

< and > So I press it, see what the hardware code is in eventviewer:

eventviewer

And then I look it up on https://zmk.dev/docs/codes:

zmk code

In my lily layout, I don't have room for this key so I' gonna put it on the second layer for z and x. So that is:

&kp GRAVE     &kp LS(GRAVE)

TODO

  • match shift, ctrl, alt, option as I'm used to
  • Backspace in normal upper right
  • å ä ö
  • arrows
  • remove backspace on thumb
  • keep shift on left on raise layer
  • add quote and question mark to raise
  • escape not working? hardware, bent pin
  • Lock key
  • switch layer key and space!
  • Think about how I want symbol layers
  • look into https://github.com/minusfive/zmk-config
  • home row mods?

Old

Issues

  •  I'm having problems with the bootloader I think. NiceNano clones from https://www.aliexpress.com/item/1005006076173222.html?spm=a2g0o.order_list.order_list_main.119.4e981802ffEh3T

    On my MacStudio I could never get it up as an USB flash drive, it just disconnects straight after double tapping reset. On the MacBook Air I actually did flash it a couple of times by simply dragging to the usb drive, but now I can't seem to do it anymore.

    Should I update the bootloader?

    UF2 Bootloader 0.6.0 lib/nrfx (v2.0.0) lib/tinyusb (0.10.1-41-gdf0cda2d) lib/uf2 (remotes/origin/configupdate-9-gadbb8c7)
    Model: nice!nano
    Board-ID: nRF52840-nicenano
    SoftDevice: S140 version 6.1.1
    Date: Jun 19 2021
    

    I think I just did from https://github.com/adafruit/Adafruit_nRF52_Bootloader/releases:

    UF2 Bootloader 0.8.0 lib/nrfx (v2.0.0) lib/tinyusb (0.12.0-145-g9775e7691) lib/uf2 (remotes/origin/configupdate-9-gadbb8c7)
    Model: nice!nano
    Board-ID: nRF52840-nicenano
    Date: Sep 29 2023
    SoftDevice: S140 6.1.1
    

On the MacBook Air

image

But when dragging a file over, three things happens at once:

image

and no update is done :(

Karabiner EventViewer

Use Karabiner EventViewer to find keycodes of everything I'm used to from another keyboard as well as this one while iterating keymaps

Lock cmd:

This is the lock combo as programmed on logitech keyboard:

[
  {
    "type": "down",
    "name": {"key_code":"left_command"},
    "usagePage": "7 (0x0007)",
    "usage": "227 (0x00e3)",
    "misc": "flags left_command"
  },
  {
    "type": "down",
    "name": {"key_code":"left_control"},
    "usagePage": "7 (0x0007)",
    "usage": "224 (0x00e0)",
    "misc": "flags left_command,left_control"
  },
  {
    "type": "down",
    "name": {"key_code":"q"},
    "usagePage": "7 (0x0007)",
    "usage": "20 (0x0014)",
    "misc": "flags left_command,left_control"
  },
  {
    "type": "up",
    "name": {"key_code":"q"},
    "usagePage": "7 (0x0007)",
    "usage": "20 (0x0014)",
    "misc": "flags left_command,left_control"
  },
  {
    "type": "up",
    "name": {"key_code":"left_control"},
    "usagePage": "7 (0x0007)",
    "usage": "224 (0x00e0)",
    "misc": "flags left_command"
  },
  {
    "type": "up",
    "name": {"key_code":"left_command"},
    "usagePage": "7 (0x0007)",
    "usage": "227 (0x00e3)",
    "misc": ""
  },