Created
July 6, 2022 11:35
-
-
Save i5ar/bb6ff5889151ea012779fdd56921cd85 to your computer and use it in GitHub Desktop.
PRK Firmware Keymap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Initialize a Keyboard | |
kbd = Keyboard.new | |
# You can make right side the "anchor" (so-called "master") | |
# Initialize GPIO assign | |
kbd.init_pins( | |
[6, 7], # row0, row1, etc. | |
[9, 10] # col0, col1, etc. | |
) | |
#keyboard.row_pins = (board.GP6, board.GP7) | |
#keyboard.col_pins = (board.GP9, board.GP10) | |
# default layer should be added at first | |
kbd.add_layer :default, %i[ | |
KC_A KC_S | |
KC_C KC_V | |
] | |
# `before_report` will work just right before reporting what keys are pushed to USB host. | |
# You can use it to hack data by adding an instance method to Keyboard class by yourself. | |
# ex) Use Keyboard#before_report filter if you want to input `":" w/o shift` and `";" w/ shift` | |
#kbd.before_report do | |
# kbd.invert_sft if kbd.keys_include?(:KC_SCOLON) | |
# # You'll be also able to write `invert_ctl`, `invert_alt` and `invert_gui` | |
#end | |
kbd.start! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We can use all GP pins except maybe GP8.