feat(extensions): most of the extensions implementation, by kdb424
This commit is contained in:
19
boards/boardsource/microdox/README.md
Normal file
19
boards/boardsource/microdox/README.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Microdox
|
||||
|
||||

|
||||
|
||||
The Microdox is is a feature-packed 30% split columnar staggered keyboard. Even though the Microdox is an extremely small keyboard it offers tons of features from larger boards while maintaining a tiny footprint.
|
||||
|
||||
kb.py is designed to work with the nice!nano
|
||||
|
||||
Retailers (USA)
|
||||
[Boardsource](https://boardsource.xyz/store/5f2e7e4a2902de7151494f92)
|
||||
|
||||
Extentions enabled by default
|
||||
- [Layers](https://github.com/KMKfw/kmk_firmware/tree/master/docs/layers.md) Need more keys than switches? Use layers.
|
||||
- [BLE_Split](https://github.com/KMKfw/kmk_firmware/tree/master/docs/split.md) Connects halves without wires
|
||||
- [ModTap](https://github.com/KMKfw/kmk_firmware/tree/master/docs/modtap.md) Allows mod keys to act as different keys when tapped.
|
||||
|
||||
Common Extentions
|
||||
- [Split](https://github.com/KMKfw/kmk_firmware/tree/master/docs/split.md) Connects halves using a wire
|
||||
- [Power](https://github.com/KMKfw/kmk_firmware/tree/master/docs/power.md) Powersaving features for battery life
|
24
boards/boardsource/microdox/kb.py
Normal file
24
boards/boardsource/microdox/kb.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.matrix import intify_coordinate as ic
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
col_pins = (board.P0_31, board.P0_29, board.P0_02, board.P1_15, board.P1_13)
|
||||
row_pins = (board.P0_10, board.P0_09, board.P1_04, board.P1_06)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
data_pin = board.P0_08
|
||||
rgb_pixel_pin = board.P0_06
|
||||
rgb_num_pixels = 12
|
||||
i2c = board.I2C
|
||||
powersave_pin = board.P0_13
|
||||
|
||||
coord_mapping = []
|
||||
coord_mapping.extend(ic(0, x) for x in range(10))
|
||||
coord_mapping.extend(ic(1, x) for x in range(10))
|
||||
coord_mapping.extend(ic(2, x) for x in range(10))
|
||||
|
||||
# And now, to handle R3, which at this point is down to just six keys
|
||||
coord_mapping.extend(ic(3, x) for x in range(3, 9))
|
54
boards/boardsource/microdox/main.py
Normal file
54
boards/boardsource/microdox/main.py
Normal file
@@ -0,0 +1,54 @@
|
||||
from kb import KMKKeyboard
|
||||
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)
|
||||
|
||||
layers_ext = Layers()
|
||||
|
||||
keyboard.modules = [layers_ext, split]
|
||||
|
||||
# Cleaner key names
|
||||
_______ = KC.TRNS
|
||||
XXXXXXX = KC.NO
|
||||
|
||||
LOWER = KC.MO(2)
|
||||
RAISE = KC.MO(1)
|
||||
|
||||
RGB_TOG = KC.RGB_TOG
|
||||
RGB_HUI = KC.RGB_HUI
|
||||
RGB_HUD = KC.RGB_HUI
|
||||
RGB_SAI = KC.RGB_SAI
|
||||
RGB_SAD = KC.RGB_SAD
|
||||
RGB_VAI = KC.RGB_VAI
|
||||
RGB_VAD = KC.RGB_VAD
|
||||
|
||||
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.SCLN,\
|
||||
KC.Z, KC.X, KC.C, KC.V, KC.B, KC.N, KC.M, KC.COMM, KC.DOT, KC.SLSH,\
|
||||
KC.LCTL, LOWER, KC.SPC, KC.BSPC, RAISE, KC.ENT,
|
||||
],
|
||||
[ #RAISE
|
||||
KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0,\
|
||||
KC.TAB, KC.LEFT, KC.DOWN, KC.UP, KC.RGHT, XXXXXXX, KC.MINS, KC.EQL, KC.LBRC, KC.RBRC,\
|
||||
KC.LCTL, KC.GRV, KC.LGUI, KC.LALT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.BSLS, KC.QUOT,\
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
],
|
||||
[ #LOWER
|
||||
KC.EXLM, KC.AT, KC.HASH, KC.DLR, KC.PERC, KC.CIRC, KC.AMPR, KC.ASTR, KC.LPRN, KC.RPRN,\
|
||||
KC.ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.UNDS, KC.PLUS, KC.LCBR, KC.RCBR,\
|
||||
KC.CAPS, KC.TILD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.PIPE, KC.DQT,\
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, KC.ENT, XXXXXXX, KC.DEL
|
||||
]
|
||||
]
|
||||
|
||||
if __name__ == '__main__':
|
||||
keyboard.go()
|
Reference in New Issue
Block a user