koga 7
Published

BBkey80: GL516 compatible keyboard powered by XIAO RP2040

BBkey80 is a GL516 compatible mechanical keyboard powered by a Seeed XIAO RP2040 and PRK Firmware.

AdvancedProtip454
BBkey80: GL516 compatible keyboard powered by XIAO RP2040

Things used in this project

Hardware components

Seeed XIAO RP2040
Seeed Studio Seeed XIAO RP2040
×1
1N4148W
×89
CPG151101S11
×80
GL516
×1

Software apps and online services

KiCad
KiCad
PRK Firmware

Story

Read more

Schematics

schematic_jCqTpeiS70.png

Code

keymap.rb

Ruby
kbd = Keyboard.new

kbd.split = false

p0 = 3
p1 = 4
p2 = 2
p3 = 1
p4 = 0
p5 = 7
p6 = 6
p7 = 29
p8 = 28
p9 = 27

kbd.init_matrix_pins(
    [
        [[p0, p1], [p0, p2], [p0, p3], [p0, p4], [p0, p5], [p0, p6], [p0, p7], [p0, p8], [p1, p0], [p1, p2], [p1, p3], [p1, p4], [p1, p5], [p1, p6], [p1, p7], [p1, p8]],
        [[p2, p0], [p2, p1], [p2, p3], [p2, p4], [p2, p5], [p2, p6], [p2, p7], [p2, p8], [p3, p0], [p3, p1], [p3, p2], [p3, p4], [p3, p5], [p3, p6], [p3, p7], [p3, p8]],
        [[p4, p0], [p4, p1], [p4, p2], [p4, p3], [p4, p5], [p4, p6], [p4, p7], [p4, p8], [p5, p0], [p5, p1], [p5, p2], [p5, p3], [p5, p4], [p5, p6], [p5, p7], [p5, p8]],
        [[p6, p0], [p6, p1], [p6, p2], [p6, p3], [p6, p4], [p6, p5], [p6, p7], [p6, p8], [p7, p0], [p7, p1], [p7, p2], [p7, p3], [p7, p4], [p7, p5], [p7, p6], [p7, p8]],
        [[p8, p0], [p8, p1], [p8, p2], [p8, p3], [p8, p4], [p8, p5], [p8, p6], [p8, p7], [p9, p0], [p9, p1], [p9, p2], [p9, p3], [p9, p4], [p9, p5], [p9, p6], [p9, p7]],
    ]
)

kbd.add_layer :default, %i(
    KC_ESC  KC_Q    KC_W    KC_U    KC_LPRN KC_RPRN KC_AT    KC_7    KC_8     KC_9    KC_QUOT  KC_0    KC_R    KC_G    KC_P    KC_DELETE
    KC_TAB  KC_B    KC_D    KC_O    KC_COMM KC_EQL  KC_PERC  KC_4    KC_5     KC_6    KC_DQUO  KC_H    KC_J    KC_K    KC_L    KC_LBRC
    KC_ESC  KC_I    KC_A    KC_E    KC_DOT  KC_MINS KC_ASTER KC_1    KC_2     KC_3    KC_COLON KC_Y    KC_T    KC_S    KC_F    KC_RBRC
    KC_LSFT KC_Z    KC_X    KC_C    KC_V    KC_SLSH KC_GRV   KC_0    KC_EXLM  KC_QUES KC_SCLN  KC_N    KC_M    KC_BSLS KC_UP   KC_RSFT
    KC_LCTL KC_LGUI KC_LALT KC_F13  SPC_SFT ENT_LT1 KC_PLUS  XXXXXXX XXXXXXX  XXXXXXX XXXXXXX  KC_BSPC KC_F14  KC_LEFT KC_DOWN KC_RIGHT
)
kbd.add_layer :layer1, %i(
    KC_ESC  KC_1    KC_2    KC_3    KC_4    KC_5    KC_F11   KC_F12  KC_AT    KC_QUOT  KC_6    KC_7    KC_8     KC_9    KC_0    KC_DELETE
    KC_TAB  KC_EXLM KC_AT   KC_HASH KC_DLR  KC_PERC KC_PLUS  KC_TILD KC_DLR   KC_DQUO  KC_CIRC KC_AMPR KC_ASTER KC_LPRN KC_RPRN KC_LCBR
    KC_ESC  KC_F1   KC_F2   KC_F3   KC_F4   KC_F5   KC_UNDS  KC_PERC KC_ASTER KC_COLON KC_F6   KC_F7   KC_F8    KC_F9   KC_F10  KC_RBRC
    KC_LSFT BOOTSEL XXXXXXX XXXXXXX XXXXXXX XXXXXXX KC_QUES  KC_PIPE KC_QUES  KC_SCLN  XXXXXXX XXXXXXX KC_LABK  KC_RABK KC_PGUP KC_RSFT
    KC_LCTL KC_LGUI KC_LALT KC_F4   KC_F13  SPC_SFT ENT_LT1  KC_PLUS KC_EXLM  ENT_LT1  KC_BSPC KC_F14  KC_F5    KC_HOME KC_PGDN KC_END
)

kbd.define_mode_key :ENT_LT1, [ :KC_ENT, :layer1, 200, 200 ]
kbd.define_mode_key :SPC_SFT, [ :KC_SPC, :KC_LSFT, 200, 200 ]
kbd.define_mode_key :BOOTSEL, [ Proc.new { kbd.bootsel! }, nil, 200, nil]

kbd.start!

Credits

koga 7

koga 7

1 project • 0 followers

Comments