Skip to content

Instantly share code, notes, and snippets.

@kenchan
Created June 4, 2023 23:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenchan/86c343cb1bf66d3466e99e04d217feab to your computer and use it in GitHub Desktop.
Save kenchan/86c343cb1bf66d3466e99e04d217feab to your computer and use it in GitHub Desktop.
kbd = Keyboard.new
row1 = 0
row2 = 1
row3 = 2
row4 = 3
row5 = 4
row6 = 5
col1 = 11
col2 = 12
col3 = 13
col4 = 14
col5 = 15
kbd.init_matrix_pins(
[
[[row1, col1], [row2, col1], [row3, col1], [row4, col1], [row5, col1], [row6, col1]],
[[row1, col2], [row2, col2], [row3, col2], [row4, col2], [row5, col2], [row6, col2]],
[[row1, col3], [row2, col3], [row3, col3], [row4, col3], [row5, col3], [row6, col3]],
[[row1, col4], [row2, col4], [row3, col4], [row4, col4], [row5, col4], [row6, col4]],
[nil, [row2, col5], [row3, col5], [row4, col5], nil, [row6, col5]]
]
)
kbd.add_layer :default, %i(
KC_EQL KC_1 KC_2 KC_3 KC_4 KC_5
KC_TAB KC_Q KC_W KC_E KC_R KC_T
KC_CAPS KC_A KC_S KC_D KC_F KC_G
KC_LSFT KC_Z KC_X KC_C KC_V KC_B
KC_GRAVE KC_BSLASH KC_LEFT KC_RIGHT
)
kbd.start!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment