8000 rafaelromao (Rafael Romão) · GitHub
[go: up one dir, main page]

Skip to content
View rafaelromao's full-sized avatar
  • Belo Horizonte, Brazil
  • 04:53 (UTC -03:00)

Block or report rafaelromao

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. 8000 Learn more about reporting abuse.

Report abuse
rafaelromao/README.md

Rafael Romão

Backend engineer since 2002, from Belo Horizonte, Brazil.
Off the clock I build tools for coding agents, and keyboards: the layout, the firmware and the hardware.


Sandman: sleep while your agents code

Sleep while your agents code. An orchestrator for autonomous coding agents. It pulls issues from GitHub, renders them through prompt templates, and runs each agent inside an isolated sandbox, a git worktree or a container, with dependency-aware parallel scheduling and a local portal for watching the runs.

It exists because agentic engineering needs the same things any delivery process needs: a clear specification, an isolated execution boundary, an event log, verification, and a human review gate.

$ sandman run 42 43 44 45

sandman.run · Repository · Go


⌨️ Keyboards

Diamond, a 24-key handwired split keyboard

My split keyboard configuration in ZMK, tuned for Portuguese, English, numbers and programming with Vim. It builds from a containerized toolchain and git submodules rather than hosted CI, so a firmware build is reproducible on any machine and offline.

My own keyboard: a 24-key handwired split in a 1333+2 layout, designed around hiding its own hardware. The controller, reset button and power switch mount upside down inside the base, under a cover the wiring passes through. Printable STLs in three builds: MX, wired and Choc.

A layout for people who write both Portuguese and English. It optimizes for hand alternation and against same-finger bigrams, pinky load and centre-column reaches, with the comparative analyses against a dozen existing layouts that justify each decision.

A layout analyzer that types the way the keyboard does. Layout analyzers score a grid of letters. A ZMK keymap is not a grid of letters: it has one-shot and momentary layers, combos, adaptive and repeat keys, sticky shift and caps word, and each of them changes which physical keys a word actually costs. LayerBench simulates how a corpus is typed on the real keymap, then computes same-finger bigrams, scissors, rolls, redirects and effort on the resulting physical key stream. It runs entirely in the browser.

LayerBench heatmap of a keymap layer

The keyboard should be in NORMAL when the editor is. zmk-vim-mode keeps a ZMK keyboard's layers in sync with the editor's real Vim state: NORMAL in normal mode, INSERT while typing, and out of Vim layers entirely when keys must pass through untouched.

That needs the host to tell the keyboard something, and HID runs keyboard to host. Except for one byte: the output report the host sends to light Caps Lock and Num Lock. Three of its bits, Scroll Lock, Compose and Kana, are never set by any operating system, so together they make a silent 3-bit channel, eight states, more than Vim has modes. It works the same over USB and Bluetooth, with no pairing and no custom transport. A 60 ms hold-off and a 150 ms guard keep a stale host message from undoing a correct local one: the keyboard wins in motion, the host wins at rest.

Neovim in normal mode with the keyboard on its VIM NORMAL layer

Ask the keyboard, not the operating system. An on-screen HUD that shows the layer you are on and lights the keys, combos and macros as you press them, drawn from the same keymap the firmware is built from. It is for learning a layout, and for recording or sharing a screen while you type on one.

Overlays like this usually infer the key from an OS event tap. This one infers nothing: a small ZMK module reports the keyboard's own active layers and the position of every press, over Bluetooth or a serial interface of its own on USB, so the HUD shows what the firmware did rather than what the host saw. It runs as a native overlay panel on macOS and a layer-shell panel on Hyprland, and redraws live when the keymap changes.

The HUD lighting keys on the Alpha 1 layer as they are pressed

ZMK modules

Module What it does
zmk-layer-morph Morphs a keypress into a different binding when any of a named set of layers is active, so one keymap serves both macOS and Linux base layers.
zmk-os-detection Tells macOS from Linux by how the host reads the keyboard's descriptors, over USB or BLE, and flips one layer to match. It never guesses.
zmk-sentence-case A sentence-aware space: after a full stop, question or exclamation mark, the next letter comes out capitalized.
zmk-dongle-display fork Peripheral status screens on the dongle display: host connection and every half's battery.

Pinned Loading

  1. sandman sandman Public

    AFK coding agents orchestration in isolated sandboxes.

    Go 7 3

  2. keyboards keyboards Public

    A split keyboard layout, optimized for Portuguese, English, working with numbers and software programming with VIM plugins.

    C 499 17

  3. romak romak Public

    Romak is a keyboard layout designed for Portuguese and English, with a goal of good hand alternation, reduced finger travel and single finger bigrams, and less use of the pinky and central columns.

    25

  4. diamond diamond Public

    Diamond is a handwired board originally designed by me but heavily inspired by the Rommana and using the switch holders from the Dactyl Cygnus.

    Python 16 1

  5. zmk-vim-mode zmk-vim-mode Public

    Keeps a ZMK keyboard's layers in sync with the editor's real vim state, so the keyboard is in NORMAL when the editor is in normal mode, in INSERT when you are typing, and out of vim layers entirely…

    Go 3 1

  6. zmk-layer-hud zmk-layer-hud Public

    An on-screen HUD for ZMK keyboards. It shows the layer you are on and lights the keys, combos and macros as you press them, drawn from the same keymap-drawer file you document your layout with. The…

    Python 5 1

0