feat(extensions): most of the extensions implementation, by kdb424

This commit is contained in:
Kyle Brown
2020-10-21 12:19:42 -07:00
committed by Josh Klar
parent 9821f7bcc3
commit e72d2b8c34
140 changed files with 3860 additions and 2312 deletions

View File

@@ -0,0 +1,21 @@
# Boardsource 4x12 Ortho
![Boardsource4x12](https://boardsource.imgix.net/164c3388-5057-46c8-8fcd-82c58c7870ce.jpg?raw=true)
![Boardsource4x12LP](https://boardsource.imgix.net/c2108ea4-7d70-4327-b4b4-88c8191b1369.jpg?raw=true)
The 4x12 ortholinear keyboard is an extremely common and beloved layout within the keyboard community. Made popular by Jack's Planck from OLKB, the 4x12 ortholinear layout is possibly the most popular non-stagger layout available.
kb.py is designed to work with the nice!nano
Retailers (USA)
4x12
[Boardsource](https://boardsource.xyz/store/5ecb78d286879c9a0c22dafd )
Low profile 4x12
[Boardsource](https://boardsource.xyz/store/5ecb7dad86879c9a0c22db32)
Extentions enabled by default
- [Layers](https://github.com/KMKfw/kmk_firmware/tree/master/docs/layers.md) Need more keys than switches? Use layers.
- [MediaKeys](https://github.com/KMKfw/kmk_firmware/tree/master/docs/media_keys.md) Control volume and other media functions
Common Extentions
- [Power](https://github.com/KMKfw/kmk_firmware/tree/master/docs/power.md) Powersaving features for battery life

View File

@@ -0,0 +1,25 @@
import board
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
from kmk.matrix import DiodeOrientation
class KMKKeyboard(_KMKKeyboard):
row_pins = (board.P0_08, board.P0_06, board.P0_17, board.P0_20)
col_pins = (
board.P0_31,
board.P0_29,
board.P0_02,
board.P1_15,
board.P1_13,
board.P1_11,
board.P0_10,
board.P0_09,
board.P1_06,
board.P1_04,
board.P0_11,
board.P1_00,
)
diode_orientation = DiodeOrientation.COLUMNS
i2c = board.I2C
powersave_pin = board.P0_13

View File

@@ -0,0 +1,43 @@
from kb import KMKKeyboard
from kmk.extensions.media_keys import MediaKeys
from kmk.keys import KC
from kmk.modules.layers import Layers
keyboard = KMKKeyboard()
media = MediaKeys()
layers_ext = Layers()
keyboard.extensions = [media]
keyboard.modules = [layers_ext]
# Cleaner key names
_______ = KC.TRNS
XXXXXXX = KC.NO
LOWER = KC.MO(1)
RAISE = KC.MO(2)
keyboard.keymap = [
[ #QWERTY
KC.TAB, KC.Q, KC.W, KC.E, KC.R, KC.T, KC.Y, KC.U, KC.I, KC.O, KC.P, KC.BSPC,
KC.ESC, KC.A, KC.S, KC.D, KC.F, KC.G, 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.N, KC.M, KC.COMM, KC.DOT, KC.SLSH, KC.ENT ,
KC.PIPE, KC.LCTL, KC.LALT, KC.LGUI, LOWER, KC.SPC, KC.SPC, RAISE, KC.LEFT, KC.DOWN, KC.UP, KC.RGHT
],
[ #LOWER
KC.GRV, KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0, KC.BSPC,
KC.DEL, KC.F1, KC.F2, KC.F3, KC.F4, KC.F5, KC.F6, KC.MINS, KC.EQL, KC.LBRC, KC.RBRC, KC.BSLS,
_______, KC.F7, KC.F8, KC.F9, KC.F10, KC.F11, KC.F12, KC.NUHS, KC.NUBS, KC.PGUP, KC.PGDN, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC.MNXT, KC.VOLD, KC.VOLU, KC.MPLY
],
[ #RAISE
KC.TILD, KC.EXLM, KC.AT, KC.HASH, KC.DLR, KC.PERC, KC.CIRC, KC.AMPR, KC.ASTR, KC.LPRN, KC.RPRN, KC.BSPC,
KC.DEL, KC.F1, KC.F2, KC.F3, KC.F4, KC.F5, KC.F6, KC.UNDS, KC.PLUS, KC.LCBR, KC.RCBR, KC.PIPE,
_______, KC.F7, KC.F8, KC.F9, KC.F10, KC.F11, KC.F12, _______, _______, KC.HOME, KC.END, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC.MNXT, KC.VOLD, KC.VOLU, KC.MPLY
]
]
if __name__ == '__main__':
keyboard.go()