# OLED import board # import adafruit_displayio_ssd1306 # import displayio # import terminalio # from adafruit_display_text import label from kb import KMKKeyboard from kmk.hid import HIDModes from kmk.keys import KC from kmk.modules.layers import Layers from kmk.modules.split import Split, SplitType keyboard = KMKKeyboard() keyboard.tap_time = 320 keyboard.debug_enabled = False split = Split(split_type=SplitType.UART) layers = Layers() keyboard.modules = [split, layers] _______ = KC.TRNS XXXXXXX = KC.NO LT1_SP = KC.MO(2) LT2_SP = KC.LT(3, KC.SPC) TAB_SB = KC.LT(5, KC.TAB) SUPER_L = KC.LM(4, KC.LGUI) keyboard.keymap = [ # DVORAK # ,-----------------------------------------. ,-----------------------------------------. # | Esc | ' | , | . | P | Y | | F | G | C | R | L | BKSP | # |------+------+------+------+------+------| |------+------+------+------+------+------| # | Tab | A | O | E | U | I | | D | H | T | N | S | ENT | # |------+------+------+------+------+------| |------+------+------+------+------+------| # | Shft | ; | Q | J | K | X |-------. ,-------| B | M | W | V | Z | / | # `-----------------------------------------/ / \ \-----------------------------------------' # | LALT | LGUI | /LT1_SP / \LT2_SP\ | Ctl | Up | # | | |/ / \ \ | | | # `---------------------' '------''-------------' # [ # DVORAK KC.GESC, KC.QUOT, KC.COMM, KC.DOT, KC.P, KC.Y, KC.F, KC.G, KC.C, KC.R, KC.L, KC.BSPC, \ TAB_SB, KC.A, KC.O, KC.E, KC.U, KC.I, KC.D, KC.H, KC.T, KC.N, KC.S, KC.ENT, \ KC.LSFT, KC.SCLN, KC.Q, KC.J, KC.K, KC.X, KC.B, KC.M, KC.W, KC.V, KC.Z, KC.SLSH, \ KC.LALT, SUPER_L, LT1_SP, LT2_SP, KC.LCTL, KC.NO, ], # GAMING # ,-----------------------------------------. ,-----------------------------------------. # | Tab | ' | , | . | P | Y | | F | G | C | R | L | BKSP | # |------+------+------+------+------+------| |------+------+------+------+------+------| # | Ctl | A | O | E | U | I | | D | H | T | N | S | ENT | # |------+------+------+------+------+------| |------+------+------+------+------+------| # | Shft | ; | Q | J | K | X |-------. ,-------| B | M | W | V | Z | / | # `-----------------------------------------/ / \ \-----------------------------------------' # | LALT | LGUI | / Space / \LT2_SP\ | Ctl | Up | # | | |/ / \ \ | | | # `---------------------' '------''-------------' # [ # GAMING KC.ESC, KC.QUOT, KC.COMM, KC.DOT, KC.P, KC.Y, KC.F, KC.G, KC.C, KC.R, KC.L, KC.BSPC, \ KC.LCTL, KC.A, KC.O, KC.E, KC.U, KC.I, KC.D, KC.H, KC.T, KC.N, KC.S, KC.ENT, \ KC.LSFT, KC.SCLN, KC.Q, KC.J, KC.K, KC.X, KC.B, KC.M, KC.W, KC.V, KC.Z, KC.SLSH, \ KC.LALT, KC.SPC, KC.SPC, LT2_SP, KC.LCTL, KC.UP, ], # RAISE1 # ,-----------------------------------------. ,-----------------------------------------. # |Reprog| | | | | | | | | 7 | 8 | 9 | | # |------+------+------+------+------+------| |------+------+------+------+------+------| # | | | | | | | | | | 4 | 5 | 6 | \ | # |------+------+------+------+------+------| |------+------+------+------+------+------| # | | | | | | |-------. ,-------| | | 1 | 2 | 3 | - | # `-----------------------------------------/ / \ \-----------------------------------------' # | LALT | LGUI | /LT1_SP / \LT2_SP\ | = | 0 | # | | |/ / \ \ | | | # `---------------------' '------''-------------' # [ # RAISE1 _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, KC.N7, KC.N8, KC.N9, KC.DEL, \ _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, KC.N4, KC.N5, KC.N6, KC.BSLS, \ _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, KC.N1, KC.N2, KC.N3, KC.MINS, \ _______, _______, _______, _______, KC.EQL, KC.N0, ], # RAISE2 # ,-----------------------------------------. ,-----------------------------------------. # | | F9 | F10 | F11 | F12 | | | | | | | | SIns | # |------+------+------+------+------+------| |------+------+------+------+------+------| # | | F5 | F6 | F7 | F8 | | | | Left | Down | Up |Right | | # |------+------+------+------+------+------| |------+------+------+------+------+------| # | | F1 | F2 | F3 | F4 | |-------. ,-------| | | | | | \ | # `-----------------------------------------/ / \ \-----------------------------------------' # | LALT | LGUI | /LT1_SP / \LT2_SP\ |Dvorak|Gaming| # | | |/ / \ \ | | | # `---------------------' '------''-------------' # [ # RAISE2 _______, KC.F9, KC.F10, KC.F11, KC.F12, _______, _______, _______, _______, KC.LBRC, KC.RBRC, KC.LSHIFT(KC.INS), \ _______, KC.F5, KC.F6, KC.F7, KC.F8, _______, KC.HOME, KC.LEFT, KC.DOWN, KC.UP, KC.RGHT, KC.END, \ _______, KC.F1, KC.F2, KC.F3, KC.F4, _______, _______, _______, _______, _______, _______, KC.BSLS, \ _______, _______, _______, _______, KC.DF(0), KC.DF(1), ], # GUI # ,-----------------------------------------. ,-----------------------------------------. # | | 1 | 2 | 3 | 4 | 5 | | | | | | | | # |------+------+------+------+------+------| |------+------+------+------+------+------| # | | 6 | 7 | 8 | 9 | 0 | | | | | | | | # |------+------+------+------+------+------| |------+------+------+------+------+------| # | | | | | | |-------. ,-------| | | | | | | # `-----------------------------------------/ / \ \-----------------------------------------' # | LALT | LGUI | /LT1_SP / \LT2_SP\ | | | # | | |/ / \ \ | | | # `---------------------' '------''-------------' [ # GUI _______, KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, _______, _______, _______, _______, _______, _______, \ _______, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______ \ ], # SYMBOLS # ,-----------------------------------------. ,-----------------------------------------. # | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | # |------+------+------+------+------+------| |------+------+------+------+------+------| # | | | | | | | | | | | [ | ] | | # |------+------+------+------+------+------| |------+------+------+------+------+------| # | | | | | | |-------. ,-------| | | | | | | # `-----------------------------------------/ / \ \-----------------------------------------' # | LALT | LGUI | /LT1_SP / \LT2_SP\ | | | # | | |/ / \ \ | | | # `---------------------' '------''-------------' # [ # SYMBOLS _______, KC.EXLM, KC.AT, KC.HASH, KC.DLR, KC.PERC, KC.CIRC, KC.AMPR, KC.ASTR, KC.LPRN, KC.RPRN, KC.DEL, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, KC.LBRC, KC.RBRC, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, ] ] if __name__ == '__main__': keyboard.go(hid_type=HIDModes.USB)