Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed rhymestone keyboard and tested it #693

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions boards/rhymestone/kb.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@


class KMKKeyboard(_KMKKeyboard):
row_pins = (board.pins[19], board.pins[18], board.pins[17], board.pins[16])
row_pins = (pins[19], pins[18], pins[17], pins[16])
col_pins = (
board.pins[6],
board.pins[7],
board.pins[8],
board.pins[9],
board.pins[10],
pins[6],
pins[7],
pins[8],
pins[9],
pins[10],
)
diode_orientation = DiodeOrientation.COLUMNS
rgb_pixel_pin = pins[0]
rgb_num_pixels = 40
data_pin = board.pins[1]
data_pin = pins[1]
SCL = board.SCL
SDA = board.SDA
i2c = board.I2C
181 changes: 158 additions & 23 deletions boards/rhymestone/main.py
Original file line number Diff line number Diff line change
@@ -1,51 +1,186 @@
from kb import KMKKeyboard

from kmk.extensions.layers import Layers
from kmk.extensions.split import Split, SplitSide, SplitType
from kmk.extensions.peg_oled_Display import (
Oled,
OledData,
OledDisplayMode,
OledReactionType,
)
from kmk.keys import KC
from kmk.modules.layers import Layers
from kmk.modules.split import Split, SplitSide, SplitType

keyboard = KMKKeyboard()

# TODO Comment one of these on each side
split_side = SplitSide.LEFT
split_side = SplitSide.RIGHT
split = Split(split_type=SplitType.BLE, split_side=split_side)
split = Split(use_pio=True)
oled_ext = Oled(
OledData(
corner_one={
0: OledReactionType.STATIC,
1: ['1 2 3 4 5 6', '', '', '', '', '', '', ''],
},
corner_two={
0: OledReactionType.STATIC,
1: [' 7 8 Layer', '', '', '', '', '', '', ' 7 8 Layer'],
},
corner_three={
0: OledReactionType.LAYER,
1: ['^', ' ^', ' ^', ' ^', ' ^', ' ^', '', ''],
},
corner_four={
0: OledReactionType.LAYER,
1: ['', '', '', '', '', '', ' ^', ' ^'],
},
),
toDisplay=OledDisplayMode.TXT,
flip=True,
)
keyboard.extensions.append(oled_ext)

layers = Layers()


keyboard.extensions = [layers, split]

# Cleaner key names
_______ = KC.TRNS
XXXXXXX = KC.NO

LOWER = KC.MO(2)
RAISE = KC.MO(1)


KC_Z_SF = KC.LSFT(KC.Z)
KC_SLSF = KC.RSFT(KC.SLSH)
KC_11SF = KC.LSFT(KC.F11)
KC_GRSF = KC.RSFT(KC.GRV)

keyboard.keymap = [
[ #QWERTY
KC.Q, KC.W, KC.E, KC.R, KC.T, KC.Y, KC.U, KC.I, KC.O, KC.P,
KC.A, KC.S, KC.D, KC.F, KC.G, KC.H, KC.J, KC.K, KC.L, KC.ENT,
KC.Z_SF, KC.X, KC.C, KC.V, KC.B, KC.N, KC.M, KC.COMM, KC.DOT, KC.SLSF,
KC.LCTL, KC.LALT, KC.LGUI, LOWER, KC.BSPC, KC.SPC, RAISE, KC.RGUI, KC.APP, KC.RCTL
[ # QWERTY
KC.Q,
KC.W,
KC.E,
KC.R,
KC.T,
KC.Y,
KC.U,
KC.I,
KC.O,
KC.P,
KC.A,
KC.S,
KC.D,
KC.F,
KC.G,
KC.H,
KC.J,
KC.K,
KC.L,
KC.ENT,
KC_Z_SF,
KC.X,
KC.C,
KC.V,
KC.B,
KC.N,
KC.M,
KC.COMM,
KC.DOT,
KC_SLSF,
KC.LCTL,
KC.LALT,
KC.LGUI,
LOWER,
KC.BSPC,
KC.SPC,
RAISE,
KC.RGUI,
KC.APP,
KC.RCTL,
],
[ # RAISE
KC.N1,
KC.N2,
KC.N3,
KC.N4,
KC.N5,
KC.N6,
KC.N7,
KC.N8,
KC.N9,
KC.N0,
KC.LSFT,
XXXXXXX,
XXXXXXX,
XXXXXXX,
XXXXXXX,
KC.LEFT,
KC.DOWN,
KC.UP,
KC.RGHT,
KC.RSFT,
XXXXXXX,
XXXXXXX,
XXXXXXX,
XXXXXXX,
XXXXXXX,
KC.MINS,
KC.RO,
KC.COMM,
KC.DOT,
KC_SLSF,
_______,
_______,
_______,
_______,
_______,
_______,
_______,
_______,
_______,
_______,
],
[ #RAISE
KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0,
KC.LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.LEFT, KC.DOWN, KC.UP, KC.RGHT, KC.RSFT,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.MINS, KC.RO, KC.COMM, KC.DOT, KC.SLSF,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
[ # LOWER
KC.F1,
KC.F2,
KC.F3,
KC.F4,
KC.F5,
KC.MINS,
KC.EQL,
KC.LBRC,
KC.RBRC,
KC.BSLS,
KC.F6,
KC.F7,
KC.F8,
KC.F9,
KC.F10,
XXXXXXX,
XXXXXXX,
XXXXXXX,
KC.SCLN,
KC.QUOT,
KC_11SF,
KC.F12,
KC.ESC,
KC.TAB,
_______,
KC.DEL,
XXXXXXX,
XXXXXXX,
KC.RO,
KC_GRSF,
_______,
_______,
_______,
_______,
KC.DEL,
_______,
_______,
_______,
_______,
_______,
],
[ #LOWER
KC.F1, KC.F2, KC.F3, KC.F4, KC.F5, KC.MINS, KC.EQL, KC.LBRC, KC.RBRC, KC.BSLS,
KC.F6, KC.F7, KC.F8, KC.F9, KC.F10, XXXXXXX, XXXXXXX, XXXXXXX, KC.SCLN, KC.QUOT,
KC.N11SF, KC.F12, KC.ESC, KC.TAB, _______, KC.DEL, XXXXXXX, XXXXXXX, KC.RO, KC.GRSF,
_______, _______, _______, _______, KC.DEL, _______, _______, _______, _______, _______
]
]

if __name__ == '__main__':
Expand Down