Created
February 6, 2022 23:35
-
-
Save hasumikin/d968e88ef7b54973952519ad8575be05 to your computer and use it in GitHub Desktop.
Shotgun CherryPie example 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
kbd = Keyboard.new | |
kbd.init_pins( | |
[ 11, 12, 13, 14, 15 ], # row0, row1,... respectively | |
[ 9, 8, 7, 6 ] # col0, col1,... respectively | |
) | |
kbd.add_layer :default, %i[ | |
RGB_TOG KC_ESC KC_NO KC_BSPACE | |
RGB_MOD KC_7 KC_8 KC_9 | |
KC_NO KC_4 KC_5 KC_6 | |
KC_NO KC_1 KC_2 KC_3 | |
KC_NO KC_0 KC_NO KC_DOT | |
] | |
# ENCODER_1 EC11 | |
encoder_1 = RotaryEncoder.new(28, 27) | |
encoder_1.clockwise do | |
kbd.send_key :KC_A | |
#kbd.send_key :RGB_SPI | |
end | |
encoder_1.counterclockwise do | |
kbd.send_key :KC_B | |
#kbd.send_key :RGB_SPD | |
end | |
kbd.append encoder_1 | |
# ENCODER_2 EC11 | |
encoder_2 = RotaryEncoder.new(26, 22) | |
encoder_2.clockwise do | |
kbd.send_key :KC_C | |
#kbd.send_key :RGB_HUI | |
end | |
encoder_2.counterclockwise do | |
kbd.send_key :KC_D | |
#kbd.send_key :RGB_HUD | |
end | |
kbd.append encoder_2 | |
# ENCODER_3 EC12 | |
encoder_3 = RotaryEncoder.new(21, 20) | |
encoder_3.clockwise do | |
kbd.send_key :KC_E | |
#kbd.send_key :RGB_SAI | |
end | |
encoder_3.counterclockwise do | |
kbd.send_key :KC_F | |
#kbd.send_key :RGB_SAD | |
end | |
kbd.append encoder_3 | |
# ENCODER_4 EC12 | |
encoder_4 = RotaryEncoder.new(19, 18) | |
encoder_4.clockwise do | |
kbd.send_key :KC_G | |
#kbd.send_key :RGB_VAI | |
end | |
encoder_4.counterclockwise do | |
kbd.send_key :KC_H | |
#kbd.send_key :RGB_VAD | |
end | |
kbd.append encoder_4 | |
# ENCODER_5 Low Profile | |
encoder_5 = RotaryEncoder.new(17, 16) | |
encoder_5.clockwise do | |
kbd.send_key :KC_I | |
#kbd.send_key :RGB_SPI | |
end | |
encoder_5.counterclockwise do | |
kbd.send_key :KC_J | |
#kbd.send_key :RGB_SPD | |
end | |
kbd.append encoder_5 | |
rgb = RGB.new( | |
0, | |
24, | |
0, | |
false | |
) | |
rgb.effect = :breath | |
rgb.value = 1 | |
kbd.append rgb | |
kbd.start! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment