Skip to the content
2 layers91 × 55 mmSgkey, the printed circuit board in 3D

USB HID keyboard firmware for tinygo

Size
91 × 55 mm
Copper layers
2
Thickness
1.6 mm
Parts
22
Nets
20
Pads
98
Tracks, vias
92, 5
Pours
1
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
9 Dec 2022
Updated
1 Nov 2026

Overview

Sgkey is an open-source printed circuit board by sago35, from the sago35/tinygo-keyboard repository on GitHub, published under the MIT licence. It is a 2-layer board of 91 × 55 mm with 22 parts on 20 nets, routed with 92 tracks and 5 vias.

Its parts include 6 diodes, 6 switches, 2 resistors and 2 ICs. It belongs with the keyboards and input boards and the RP2040, nRF52 and nRF5x and SAM D and SAM boards of this library.

README

README.md

USB HID Keyboard firmware for TinyGo

The API is not yet fixed.

The following are supported.

  • key input
    • squared matrix scan
    • matrix scan
    • duplex-matrix scan
    • rotary encoder
    • GPIO
    • UART
    • Shifter (tinygo.org/x/drivers/shifter)
  • layer feature by mod key
  • mouse click / mouse wheel
  • support TRRS (UART)
  • support Vial

Microcontrollers

The following microcontrollers are supported.

  • rp2040
  • nrf52840
  • samd51
  • samd21

Tutorial

Additional Resources

sgkb-0.4.0

text
# sgkb-0.4.0
$ tinygo flash --target xiao-rp2040 --size short --stack-size 8kb ./targets/sgkb/left/
$ tinygo flash --target xiao-rp2040 --size short --stack-size 8kb ./targets/sgkb/right/

# sgkb-0.3.0 or before
$ tinygo flash --target xiao-rp2040 --size short --stack-size 8kb ./targets/sgkb/left-0.3.0/
$ tinygo flash --target xiao-rp2040 --size short --stack-size 8kb ./targets/sgkb/right/
nameamount
Cherry MX / Kailh Choc V172
key cap (1u)68
key cap (1.5u)1
key cap (1.75u)1
key cap (2u)1
key cap (ISO-ENTER)1
Stabilizer (2u)2
diode 1N414872
xiao-rp20402
pin header 1x74
TRRS connector2
TRRS cable1

sg48key

text
tinygo flash --target xiao --size short --stack-size 8kb ./targets/sg48key/

sgh60

text
tinygo flash --target waveshare-rp2040-zero --size short --stack-size 8kb ./targets/sgh60/

wiokey-0.1.0

text
$ tinygo flash --target wioterminal --size short --stack-size 8kb ./targets/wiokey/
nameamount
Cherry MX / Kailh Choc V16
key cap6
diode 1N41486
wioterminal1
pin socket 2x202

sgkey-0.1.0

text
$ tinygo flash --target xiao-rp2040 --size short --stack-size 8kb ./targets/sgkey/
nameamount
Cherry MX / Kailh Choc V16
key cap6
diode 1N41486
xiao-rp20401
i2c ssd13061
register 10k ohm2

fric10key-0.1.0

text
$ tinygo flash --target xiao-rp2040 --size short --stack-size 8kb ./targets/fric10key/
nameamount
Cherry MX / Kailh Choc V127
key cap (1u)26
key cap (2u)1
Stabilizer (2u)1
diode 1N414827
xiao-rp20401

xiao-kb01

text
$ tinygo flash --target xiao-rp2040 --size short --stack-size 8kb ./targets/xiao-kb01/

Gopher Badge

text
$ tinygo flash --target gopher-badge --size short --stack-size 8kb ./targets/gopher-badge/

GoBadge / PyBadge

text
$ tinygo flash --target gobadge --size short --stack-size 8kb ./targets/gobadge

MacroPad RP2040

text
$ tinygo flash --target macropad-rp2040 --size short --stack-size 8kb ./targets/macropad-rp2040/

Restore default keymap

Set the key with the key code of 0x7C03, and then press it.
Then a reset will restore the default keymap.
See #8.

Restore default keymap (tinygo flash)

Restore default keymap each time it is reset by specifying --tags reset_to_default.
Note that in this setting, any changes made from Vial or other sources will immediately revert to the original setting.

text
$ tinygo flash --target wioterminal --size short  --tags reset_to_default ./targets/wiokey

Note

  • Basically, the --stack-size 8kb settings is required.
  • If changing the version of tinygo-keyboard causes it to not work properly, please perform the Restore default keymap procedure.

LICENSE

MIT

Parts

22
QtyValueFootprintReferences
61N4148Diode_THT:D_DO-35_SOD27_P7.62mm_HorizontalD1, D2, D3, D4, D5, D6
6SW_PUSHfoostan/kbd:CherryMX_ChocV2_1uSW1, SW2, SW3, SW4, SW5, SW6
4MountingHoleMountingHole:MountingHole_2.2mm_M2H1, H2, H3, H4
2LOGOsnapeda/xiao:tinygo-keyboard-qrG***, G***
2RResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalR1, R2
1102010388snapeda/xiao:MODULE_102010388U1
1i2c-oled-displaysnapeda/xiao:i2c-oled-display-0.96U2

More from sago35/tinygo-keyboard

7
  • 2 layers285 × 94.6 mmSgh60, the printed circuit board in 3D

    Sgh60

    sago35/tinygo-keyboard

    USB HID keyboard firmware for tinygo

    155 parts119MIT
  • 2 layers242.9 × 76.2 mmSg48key, the printed circuit board in 3D

    Sg48key

    sago35/tinygo-keyboard

    USB HID keyboard firmware for tinygo

    110 parts119MIT
  • 2 layers174 × 96 mmSgkb right, the printed circuit board in 3D

    Sgkb right

    sago35/tinygo-keyboard

    USB HID keyboard firmware for tinygo

    100 parts119MIT
  • 2 layers134 × 96 mmSgkb, the printed circuit board in 3D

    Sgkb

    sago35/tinygo-keyboard

    USB HID keyboard firmware for tinygo

    75 parts119MIT
  • 2 layers77 × 140 mmFric10key, the printed circuit board in 3D

    Fric10key

    sago35/tinygo-keyboard

    USB HID keyboard firmware for tinygo

    63 parts119MIT
  • 2 layers90 × 90 mmXiao kb01, the printed circuit board in 3D

    Xiao kb01

    sago35/tinygo-keyboard

    USB HID keyboard firmware for tinygo

    55 parts119MIT
  • 2 layers126 × 57 mmWiokey, the printed circuit board in 3D

    Wiokey

    sago35/tinygo-keyboard

    USB HID keyboard firmware for tinygo

    16 parts119MIT

Similar boards

  • 2 layers158 × 11 mmDaylight Matchstick, the printed circuit board in 3D

    Daylight Matchstick

    VoronDesign/Voron-Hardware

    Cool Hardware designed by the Voron Design group

    22 parts1.1kGPL-3.0
  • 2 layers57 × 65 mmRgb to hdmi, the printed circuit board in 3D

    Rgb to hdmi

    hoglet67/RGBtoHDMI

    Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

    22 parts1kGPL-3.0
  • 2 layers81 × 57.2 mmRP2040-Macropad, the printed circuit board in 3D

    RP2040-Macropad

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    22 parts915
  • 2 layers54.6 × 70.9 mmBeagleLogic Cape, the printed circuit board in 3D

    BeagleLogic Cape

    abhishek-kakkar/BeagleLogic

    A Software Suite that implements a logic analyzer with the PRU on the BeagleBone / BeagleBone Black.

    22 parts479GPL-3.0
  • 2 layers66.4 × 24.5 mmConnecting piece, the printed circuit board in 3D

    Connecting piece

    Chrismettal/flipper-zero-backpacks

    Backpack-style addon boards for the Flipper Zero!

    22 parts456
  • 2 layers51 × 70 mmDMG A04-01, the printed circuit board in 3D

    DMG A04-01

    HDR/NintendoPCBs

    Replacement pcb's for Nintendo games.

    22 parts321
  • 2 layers27.8 × 16 mmSpi 1v8 level shifter, the printed circuit board in 3D

    Spi 1v8 level shifter

    CRImier/MyKiCad

    My KiCad boards. Can't be bothered uploading individually anymore, so here you go.

    22 parts253GPL-3.0

Questions

How big is the Sgkey PCB?

It measures 91 × 55 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Sgkey use?

22 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Sgkey KiCad files?

From the sago35/tinygo-keyboard repository on GitHub, at the commit this page was made from: the board is kicad/sgkey/sgkey/sgkey.kicad_pcb and its schematic kicad/fric10key/fric10key/fric10key.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Sgkey design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).