Skip to content

About

Custom Keyboard

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

CrazySpring_KB

This is a repository for CrazySpring, a 65% custom keyboard by @h4rutank.

📝 Blog: https://h4rutank.github.io/electronics/2026/03/15/custom_keyboard.html

Bare-metal STM32Cube HAL + ST USB Device library (HID). No QMK.


Features

  • 13 × 6 matrix scan, COL2ROW diodes, 5-scan debounce
  • Crystal-less USB FS (HSI48 + CRS)
  • One momentary Fn layer (F-keys, arrow-cluster navigation)
  • US-ANSI keycaps on a JIS-configured Windows — the firmware translates HID usages / shift state so the printed legends produce the right characters (see Keyboard layout note)
  • 半角/全角 IME toggle key
  • Two string macros
  • Report is rebuilt from the full matrix every scan and sent only on change, synchronised to the host poll (no dropped keys / stuck modifiers)

Hardware

MCU STM32F072V8T6 (LQFP100)
Connection USB-C, full-speed, bus-powered
Clock HSI48, SYSCLK 48 MHz, USB clock recovered via CRS
Matrix rows PA0-2,PA4-6 / PB12-15 / PD8-10 (13, input, 22k ext. pull-down)
cols PC1,PC0,PF1,PF0,PF10,PF9 (6, push-pull output, driven HIGH)
Keys 66

Keyboard layout

Base layer

Esc   1  2  3  4  5  6  7  8  9  0  -  =   Backspace
Tab   Q  W  E  R  T  Y  U  I  O  P  [  ]   \
Caps  A  S  D  F  G  H  J  K  L  '  ;   Enter
LShift  Z  X  C  V  B  N  M  ,  .  /  BBQ   RShift
Ctrl  Super  Alt  Fn  Space  ←  →  ↑  ↓  🐷  Delete  Ctrl
  • 🐷 = 半角/全角 (KC_GRV / HID 0x35) — IME on/off toggle
  • BBQ = macro 1 · Fn + BBQ = macro 2

Fn layer (hold Fn)

Fn + 1..= / 6      → F1..F12
Fn + Esc          → `
Fn + Backspace    → Delete
Fn + ← → ↑ ↓      → Home / End / PgUp / PgDn
Fn + Delete       → Insert

Macros

Trigger Types
BBQ mecha mecha Haru
Fn + BBQ By Kazaho Okabayashi

Project structure

This project is developed with CubeIDE v1.18.1

Core/Src/keymap.c        matrix scan, keymaps, report builder, macros
Core/Inc/keymap.h        keycodes, WSFT/NSFT, matrix defines
Core/Src/main.c          clock, GPIO, main loop (matrix_scan @ 1 kHz)
USB_DEVICE/              USB device init
Middlewares/ST/.../HID/  ST HID class — report descriptor is hand-modified
                         (keyboard, 8-byte boot-compatible, usage range widened)
Drivers/                 STM32F0 HAL + CMSIS (CubeMX generated)

About

Custom Keyboard

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors