feat(extensions): most of the extensions implementation, by kdb424
This commit is contained in:
21
boards/ergo_travel/README.md
Normal file
21
boards/ergo_travel/README.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Ergo Travel
|
||||
|
||||

|
||||
|
||||
As the name implies, the Ergo Travel was originally designed as a travel keyboard, but it works just as well on your desk as a main daily use keyboard. The Ergo Travel is a popular choice by many because it offers a few more keys than other keyboards in similar sizes, and that is why we chose to stock it. Additionally, the Ergo Travel has nice customization options in the thumb cluster because you can configure the main thumb key to use a single larger 2u key, or two smaller 1u keys depending on your preference. The clean and simple aesthetic of the Ergo Travel and the few extra keys make it an awesome option for people wanting a 40%-ish split keyboard.
|
||||
|
||||
kb.py is designed to work with the nice!nano
|
||||
|
||||
Hardware Availability: [PCB & Case Source](https://github.com/jpconstantineau/ErgoTravel/blob/master/OrderingInstructions.md)
|
||||
|
||||
Retailers (USA)
|
||||
[Boardsource](https://boardsource.xyz/store/5eed23430883e03ef9a69d6a)
|
||||
|
||||
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
|
||||
- [MediaKeys](https://github.com/KMKfw/kmk_firmware/tree/master/docs/media_keys.md) Control volume and other media functions
|
||||
|
||||
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
|
33
boards/ergo_travel/kb.py
Normal file
33
boards/ergo_travel/kb.py
Normal file
@@ -0,0 +1,33 @@
|
||||
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):
|
||||
row_pins = (board.P0_24, board.P1_00, board.P0_11, board.P1_04)
|
||||
col_pins = (
|
||||
board.P0_29,
|
||||
board.P0_02,
|
||||
board.P1_15,
|
||||
board.P1_13,
|
||||
board.P1_11,
|
||||
board.P0_10,
|
||||
board.P0_09,
|
||||
)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
led_pin = board.P1_06
|
||||
rgb_pixel_pin = board.P0_06
|
||||
rgb_num_pixels = 12
|
||||
data_pin = board.P0_08
|
||||
i2c = board.I2C
|
||||
powersave_pin = board.P0_13
|
||||
|
||||
coord_mapping = []
|
||||
coord_mapping.extend(ic(0, x) for x in range(14))
|
||||
coord_mapping.extend(ic(1, x) for x in range(14))
|
||||
coord_mapping.extend(ic(2, x) for x in range(14))
|
||||
|
||||
# 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, 12))
|
58
boards/ergo_travel/main.py
Normal file
58
boards/ergo_travel/main.py
Normal file
@@ -0,0 +1,58 @@
|
||||
from kb import KMKKeyboard
|
||||
from kmk.extensions.media_keys import MediaKeys
|
||||
from kmk.keys import KC
|
||||
from kmk.modules.layers import Layers
|
||||
from kmk.modulessplit 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)
|
||||
|
||||
media = MediaKeys()
|
||||
layers_ext = Layers()
|
||||
keyboard.modules = [layers_ext, split]
|
||||
keyboard.extensions = (media)
|
||||
|
||||
# Cleaner key names
|
||||
_______ = KC.TRNS
|
||||
XXXXXXX = KC.NO
|
||||
|
||||
LOWER = KC.MO(1)
|
||||
RAISE = KC.MO(2)
|
||||
ADJUST = KC.MO(3)
|
||||
|
||||
CALTDEL = KC.LCTL(KC.LALT(KC.DEL))
|
||||
TSKMGR = KC.LCTL(KC.LSFT(KC.KC_ESC))
|
||||
|
||||
keyboard.keymap = [
|
||||
[ #QWERTY
|
||||
KC.ESC, KC.Q, KC.W, KC.E, KC.R, KC.T, KC.MINS, KC.EQL, KC.Y, KC.U, KC.I, KC.O, KC.P, KC.BSPC,\
|
||||
KC.TAB, KC.A, KC.S, KC.D, KC.F, KC.G, KC.LBRC, KC.RBRC, KC.H, KC.J, KC.K, KC.L, KC.SCLN, KC.QUOT,\
|
||||
KC.LSFT, KC.Z, KC.X, KC.C, KC.V, KC.B, KC.SPC, KC.SPC, KC.N, KC.M, KC.COMM, KC.DOT, KC.SLSH, KC.ENT,\
|
||||
KC.LCTL, KC.LGUI, KC.LALT, ADJUST, LOWER, KC.SPC, KC.SPC, RAISE, KC.LEFT, KC.UP, KC.DOWN, KC.RGHT\
|
||||
],
|
||||
[ #LOWER
|
||||
KC.TILD, KC.EXLM, KC.AT, KC.HASH, KC.DLR, KC.PERC, KC.HOME, KC.PGUP, KC.CIRC, KC.AMPR, KC.ASTR, KC.LPRN, KC.RPRN, KC.DEL,\
|
||||
_______, KC.F1, KC.F2, KC.F3, KC.F4, KC.F5, KC.END , KC.PGDN, KC.F6, KC.UNDS, KC.PLUS, KC.LCBR, KC.RCBR, KC.BSLS,\
|
||||
_______, KC.F7, KC.F8, KC.F9, KC.F10, KC.F11, KC.BSPC, KC.BSPC, KC.F12, _______, _______, KC.MUTE, _______, KC.PIPE,\
|
||||
_______, _______, _______, _______, _______, KC.BSPC, KC.BSPC, _______, KC.MNXT, KC.VOLD, KC.VOLU, KC.MPLY\
|
||||
],
|
||||
[ #RAISE
|
||||
KC.ESC, KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, _______, _______, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0, KC.DEL, \
|
||||
_______, KC.N4, KC.N5, KC.N6, KC.PLUS, _______, _______, _______, _______, KC.MINS, KC.EQL, KC.LBRC, KC.RBRC, _______, \
|
||||
KC.ENT, KC.N7, KC.N8, KC.N9, KC.MINS, _______, _______, _______, _______, KC.NUHS, KC.NUBS, KC.MUTE, _______, KC.BSLS, \
|
||||
_______, KC.COMM, KC.N0, KC.DOT, _______, KC.BSPC, KC.BSPC, _______, KC.MNXT, KC.VOLD, KC.VOLU, KC.MPLY \
|
||||
],
|
||||
[ #ADJUST
|
||||
TSKMGR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CALTDEL,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
]
|
||||
]
|
||||
|
||||
if __name__ == '__main__':
|
||||
keyboard.go()
|
Reference in New Issue
Block a user