tinygo-keyboard

Public

@sago35

Share tinygo-keyboard

Check access before sharing the link.

Who can open this board

Anyone can open this board. No sign-in is required.

This link opens the latest version. Copying it does not grant additional access.

Loading 3D model… large boards can take a moment.

README

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

# 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

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

sgh60

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

wiokey-0.1.0

$ 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

$ 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

$ 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

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

Gopher Badge

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

GoBadge / PyBadge

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

MacroPad RP2040

$ 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.

$ 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

Comments

No comments yet. Be the first to ask about this board.

Ask about this board

Sign in to BoardRepo

New here? Signing in creates your account; there is no separate sign-up.