feat(extensions): most of the extensions implementation, by kdb424
This commit is contained in:
parent
9821f7bcc3
commit
e72d2b8c34
16
Makefile
16
Makefile
@ -23,7 +23,7 @@ MPY_TARGET_DIR ?= .compiled
|
||||
PY_KMK_TREE = $(shell find $(MPY_SOURCES) -name "*.py")
|
||||
DIST_DESCRIBE = $(shell $(DIST_DESCRIBE_CMD))
|
||||
|
||||
all: copy-kmk copy-bootpy copy-keymap
|
||||
all: copy-kmk copy-bootpy copy-keymap copy-board
|
||||
|
||||
compile: $(MPY_TARGET_DIR)/.mpy.compiled
|
||||
|
||||
@ -96,7 +96,7 @@ fix-formatting: devdeps
|
||||
@$(PIPENV) run black .
|
||||
|
||||
fix-isort: devdeps
|
||||
@find kmk/ user_keymaps/ -name "*.py" | xargs $(PIPENV) run isort
|
||||
@find kmk/ user_keymaps/ boards/ -name "*.py" | xargs $(PIPENV) run isort
|
||||
|
||||
clean:
|
||||
@echo "===> Cleaning build artifacts"
|
||||
@ -135,6 +135,12 @@ copy-kmk:
|
||||
echo "**** MOUNTPOINT must be defined (wherever your CIRCUITPY drive is mounted) ****" && exit 1
|
||||
endif
|
||||
|
||||
copy-board: $(MOUNTPOINT)/kb.py
|
||||
$(MOUNTPOINT)/kb.py: $(BOARD)
|
||||
@echo "===> Copying your board to kb.py"
|
||||
@rsync -rh $(BOARD) $@
|
||||
@sync
|
||||
|
||||
ifdef MOUNTPOINT
|
||||
$(MOUNTPOINT)/kmk/boot.py: boot.py
|
||||
@echo "===> Copying required boot.py"
|
||||
@ -162,4 +168,10 @@ copy-keymap: $(MOUNTPOINT)/main.py
|
||||
else
|
||||
copy-keymap:
|
||||
echo "**** MOUNTPOINT must be defined (wherever your CIRCUITPY drive is mounted) ****" && exit 1
|
||||
|
||||
ifdef BOARD
|
||||
copy-board: $(MOUNTPOINT)/kb.py
|
||||
endif # BOARD
|
||||
|
||||
|
||||
endif # MOUNTPOINT
|
||||
|
61
README.md
61
README.md
@ -34,72 +34,15 @@ file](https://cdn.kmkfw.io/kmk-latest.unoptimized.zip) forms. These follow the
|
||||
`KC.LWIN(KC.L)` to lock the screen on a Windows PC
|
||||
- [Built-in unicode macros, including
|
||||
emojis](https://github.com/KMKfw/kmk_firmware/blob/master/docs/sequences.md)
|
||||
- [Multiple vim-inspired leader key
|
||||
modes](https://github.com/KMKfw/kmk_firmware/blob/master/docs/leader.md)
|
||||
- [RGB underglow](https://github.com/KMKfw/kmk_firmware/blob/master/docs/rgb.md)
|
||||
and [LED
|
||||
backlights](https://github.com/KMKfw/kmk_firmware/blob/master/docs/led.md)
|
||||
- One key can turn into many more based on [how many times you tap
|
||||
it](https://github.com/KMKfw/kmk_firmware/blob/master/docs/tapdance.md)
|
||||
|
||||
Coming (hopefully) soon: Bluetooth support! Stay tuned.
|
||||
- Bluetooth HID and split keyboards. No more wires.
|
||||
|
||||
## Getting Started
|
||||
|
||||
- Start by grabbing a supported microcontroller. Broadly speaking, KMK supports
|
||||
any device CircuitPython does, but KMK requires a decent bit of RAM, and in
|
||||
general requires a working USB HID stack, which leads us to recommend the
|
||||
following controllers:
|
||||
|
||||
* [Adafruit ItsyBitsy M4 Express](https://www.adafruit.com/product/3800)\*
|
||||
* [Adafruit Feather M4 Express](https://www.adafruit.com/product/3857)
|
||||
* [Adafruit Feather nRF52840 Express](https://www.adafruit.com/product/4062)
|
||||
* [MakerDiary nRF52840 MDK](https://store.makerdiary.com/collections/frontpage/products/nrf52840-mdk-iot-development-kit)
|
||||
* [SparkFun Pro nRF52840 Mini](https://www.sparkfun.com/products/15025)
|
||||
|
||||
> \* The ItsyBitsy M4 Express is the only controller we currently support in
|
||||
> non-handwired configurations, using our [ItsyBitsy to Pro Micro converter
|
||||
> PCB](https://github.com/KMKfw/kmk_firmware/tree/master/hardware) designed by
|
||||
> @siddacious and @kdb424. It is our most-recommended MCU until [the ItsyBitsy is
|
||||
> updated with an nRF52840
|
||||
> chip](https://blog.adafruit.com/2019/01/26/comingsoon-itsybitsy-nrf52480-runs-circuitpython-adafruit-circuitpython-adafruit-circuitpython/)
|
||||
|
||||
> Some other controllers, such as the [Feather M0 Express](https://www.adafruit.com/product/3403),
|
||||
> are usable in reduced functionality modes and may require custom hackery.
|
||||
> For example, @kdb424 uses a ItsyBitsy M0 Express as a barebones matrix scanner
|
||||
> in a split keyboard configuration
|
||||
> [here](https://github.com/KMKfw/kmk_firmware/commit/1f84079dc8aadeb9627c4762d9f9fb855292c4a2).
|
||||
> Use such controllers at your own risk.
|
||||
|
||||
- Ensure CircuitPython 4.0.0 or newer is installed on your controller. We
|
||||
recommend the latest stable version from
|
||||
[circuitpython.org](https://circuitpython.org/downloads). Flashing
|
||||
instructions vary by device: all Adafruit boards can be flashed [using their
|
||||
instructions](https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython),
|
||||
other boards generally have their instructions [in the CircuitPython
|
||||
repository](https://github.com/adafruit/circuitpython) under the
|
||||
`ports/atmel-samd/boards/<your board here>` and `ports/nrf/boards/<your board
|
||||
here>` directories. If all else fails, consult your device's official
|
||||
documentation.
|
||||
|
||||
- [Download the latest KMK release](https://cdn.kmkfw.io/kmk-latest.zip) and
|
||||
extract the zip to the USB drive exposed by CircuitPython, typically labeled
|
||||
`CIRCUITPY`. Again, [we'll defer to Adafruit's
|
||||
documentation](https://learn.adafruit.com/welcome-to-circuitpython/circuitpython-libraries)
|
||||
on adding libraries to a CircuitPython installation. You should end up with a
|
||||
folder called `kmk` and a file called `boot.py`, both living at the top of
|
||||
this USB drive.
|
||||
|
||||
- Define your keyboard in a file called `main.py` on this `CIRCUITPY` drive and
|
||||
get tinkering! Examples of both handwired and ProMicro-\>ItsyBitsy converted
|
||||
boards exist under the `user_keymaps/` tree, and feel free to submit a pull
|
||||
request of your own definitions! At this point, you'll want to look through
|
||||
`docs/` in the source tree to explore the functionality at your disposal.
|
||||
|
||||
> Linux, BSD, and MacOS users can also make use of the `Makefile` provided in
|
||||
> this source tree to flash KMK and a keymap using `rsync`. This is advanced
|
||||
> functionality outside the scope of this README, but it's documented in the
|
||||
> `docs/` tree.
|
||||
Our getting started guide can be found [here](https://github.com/KMKfw/docs/Getting_Started.md)
|
||||
|
||||
## The KMK Team
|
||||
|
||||
|
13
boards/boardsource/3x4/README.md
Normal file
13
boards/boardsource/3x4/README.md
Normal file
@ -0,0 +1,13 @@
|
||||
# Boardsource 3x4
|
||||
|
||||
![Boardsource3x4](https://boardsource.imgix.net/30171267-d988-46cc-ba03-9f6a8ab96487.jpg?raw=true)
|
||||
|
||||
This macro pad / small 12 key was inspired by the plaid look
|
||||
|
||||
kb.py is designed to work with the nice!nano
|
||||
|
||||
Retailers (USA)
|
||||
[Boardsource](https://boardsource.xyz/store/5ecc2008eee64242946c98c1)
|
||||
|
||||
Extentions enabled by default
|
||||
- [Layers](https://github.com/KMKfw/kmk_firmware/tree/master/docs/layers.md) Need more keys than switches? Use layers.
|
@ -5,6 +5,8 @@ from kmk.matrix import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
col_pins = (board.D9, board.D10, board.D11, board.D12, board.D13, board.SCL)
|
||||
row_pins = (board.A3, board.A4, board.A5, board.SCK, board.MOSI)
|
||||
row_pins = (board.P1_15, board.P0_02, board.P0_29)
|
||||
col_pins = (board.P0_09, board.P0_10, board.P1_11, board.P1_13)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
i2c = board.I2C
|
||||
powersave_pin = board.P0_13
|
30
boards/boardsource/3x4/main.py
Normal file
30
boards/boardsource/3x4/main.py
Normal file
@ -0,0 +1,30 @@
|
||||
from kb import KMKKeyboard
|
||||
from kmk.keys import KC
|
||||
from kmk.modules.layers import Layers
|
||||
|
||||
keyboard = KMKKeyboard()
|
||||
|
||||
# Cleaner key names
|
||||
_______ = KC.TRNS
|
||||
XXXXXXX = KC.NO
|
||||
|
||||
layers_ext = Layers()
|
||||
keyboard.modules = [layers_ext]
|
||||
|
||||
RAISE = KC.MO(1)
|
||||
|
||||
keyboard.keymap = [
|
||||
[ #Base
|
||||
KC.N0, KC.N1, KC.N4, KC.N7,
|
||||
KC.ENT, KC.N2, KC.N5, KC.N8,
|
||||
RAISE, KC.N3, KC.N6, KC.N9
|
||||
],
|
||||
[ #RAISE
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______
|
||||
]
|
||||
]
|
||||
|
||||
if __name__ == '__main__':
|
||||
keyboard.go()
|
21
boards/boardsource/4x12/README.md
Normal file
21
boards/boardsource/4x12/README.md
Normal 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
|
25
boards/boardsource/4x12/kb.py
Normal file
25
boards/boardsource/4x12/kb.py
Normal 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
|
43
boards/boardsource/4x12/main.py
Normal file
43
boards/boardsource/4x12/main.py
Normal 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()
|
21
boards/boardsource/5x12/README.md
Normal file
21
boards/boardsource/5x12/README.md
Normal file
@ -0,0 +1,21 @@
|
||||
# Boardsource 5x12 Ortho
|
||||
|
||||
![Boardsource5x12](https://boardsource.imgix.net/74abb511-792e-42d9-9f6e-8100c521b2e0.jpg?raw=true)
|
||||
![Boardsource5x12LP](https://boardsource.imgix.net/57ad3f69-3c88-4ae8-9592-6e4d2f45a58e.jpg?raw=true)
|
||||
|
||||
5x12 ortholinear -- for when just really don't want to give up your number row. The 5x12 ortholinear keyboard is a common ortholinear layout that many people prefer because it includes a number row. Made popular by Jack's Preonic from OLKB, the 5x12 ortholinear layout is a great option for those who want to try ortholinear but feel they aren't ready to make the jump to a 40%. The 5x12 Ortho is an approachable keyboard with hotswap compatibility.
|
||||
|
||||
kb.py is designed to work with the nice!nano
|
||||
|
||||
Retailers (USA)
|
||||
5x12
|
||||
[Boardsource](https://boardsource.xyz/store/5ecb802c86879c9a0c22db61)
|
||||
Low Profile 5x12
|
||||
[Boardsource](https://boardsource.xyz/store/5ecb822386879c9a0c22db84)
|
||||
|
||||
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
|
25
boards/boardsource/5x12/kb.py
Normal file
25
boards/boardsource/5x12/kb.py
Normal 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, board.P0_22)
|
||||
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
|
46
boards/boardsource/5x12/main.py
Normal file
46
boards/boardsource/5x12/main.py
Normal file
@ -0,0 +1,46 @@
|
||||
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.modules = [layers_ext]
|
||||
keyboard.extensions = [media]
|
||||
|
||||
# Cleaner key names
|
||||
_______ = KC.TRNS
|
||||
XXXXXXX = KC.NO
|
||||
|
||||
LOWER = KC.MO(1)
|
||||
RAISE = KC.MO(2)
|
||||
|
||||
keyboard.keymap = [
|
||||
[ #QWERTY
|
||||
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.TAB, KC.Q, KC.W, KC.E, KC.R, KC.T, KC.Y, KC.U, KC.I, KC.O, KC.P, KC.DEL,
|
||||
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.ESC, KC.F1, KC.F2, KC.F3, KC.F4, KC.F5, KC.F6, KC.F7, KC.F8, KC.F9, KC.F10, KC.F11,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC.UP, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC.LEFT, KC.DOWN, KC.RGHT, _______, _______,
|
||||
KC.CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC.MNXT, KC.VOLD, KC.VOLU, KC.MPLY
|
||||
],
|
||||
[ #RAISE
|
||||
KC.GRV, KC.F1, KC.F2, KC.F3, KC.F4, KC.F5, KC.F6, KC.F7, KC.F8, KC.F9, KC.F10, KC.F11,
|
||||
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.F5, KC.F6, KC.MINS, KC.EQL, KC.LBRC, KC.RBRC, _______,
|
||||
KC.ENT, KC.N7, KC.N8, KC.N9, KC.MINS, KC.F11, KC.F12, KC.NUHS, KC.NUBS, KC.MUTE, _______, KC.BSLS,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC.MNXT, KC.VOLD, KC.VOLU, KC.MPLY
|
||||
]
|
||||
]
|
||||
|
||||
if __name__ == '__main__':
|
||||
keyboard.go()
|
19
boards/boardsource/microdox/README.md
Normal file
19
boards/boardsource/microdox/README.md
Normal file
@ -0,0 +1,19 @@
|
||||
# Microdox
|
||||
|
||||
![microdox](https://boardsource.imgix.net/337ae65a-d061-46a4-b119-9916b043c58f.jpg?raw=true)
|
||||
|
||||
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()
|
27
boards/crkbd/README.md
Normal file
27
boards/crkbd/README.md
Normal file
@ -0,0 +1,27 @@
|
||||
# Corne Keyboard (CRKBD)
|
||||
|
||||
![Crkbd](https://boardsource.imgix.net/a90342e3-caa0-467c-bebd-d17f031d5210.jpg?raw=true)
|
||||
|
||||
![Crkbd](https://boardsource.imgix.net/9cbd31b7-3b37-42c6-919e-3be35a2578f6.jpg?raw=true)
|
||||
|
||||
A split keyboard with a 3x6 collumnar stagger and 3 thumb keys.
|
||||
|
||||
kb.py is designed to work with the nice!nano
|
||||
|
||||
Hardware Availability: [PCB & Case Source](https://github.com/foostan/crkbd)
|
||||
|
||||
Retailers (USA)
|
||||
Corne
|
||||
[Boardsource](https://boardsource.xyz/store/5ecc0f81eee64242946c988f)
|
||||
|
||||
Corne LP
|
||||
[Boardsource](https://boardsource.xyz/store/5f2efc462902de7151495057)
|
||||
|
||||
Extentions enabled by default
|
||||
- [Layers](https://github.com/KMKfw/kmk_firmware/tree/master/docs/layers.md) Need more keys than switches? Use layers.
|
||||
- [RGB](https://github.com/KMKfw/kmk_firmware/tree/master/docs/rgb.md) Light it up
|
||||
- [BLE_Split](https://github.com/KMKfw/kmk_firmware/tree/master/docs/split.md) Connects halves without wires
|
||||
|
||||
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
|
@ -16,13 +16,10 @@ class KMKKeyboard(_KMKKeyboard):
|
||||
)
|
||||
row_pins = (board.P0_22, board.P0_24, board.P1_00, board.P0_11)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
|
||||
split_type = 'UART' # TODO add bluetooth support as well
|
||||
split_flip = True
|
||||
split_offsets = [6, 6, 6, 6, 6]
|
||||
uart_pin = board.P0_08
|
||||
data_pin = board.P0_08
|
||||
rgb_pixel_pin = board.P0_06
|
||||
extra_data_pin = board.SDA # TODO This is incorrect. Find better solution
|
||||
i2c = board.I2C
|
||||
powersave_pin = board.P0_13
|
||||
|
||||
coord_mapping = []
|
||||
coord_mapping.extend(ic(0, x) for x in range(12))
|
67
boards/crkbd/main.py
Normal file
67
boards/crkbd/main.py
Normal file
@ -0,0 +1,67 @@
|
||||
from kb import KMKKeyboard, rgb_pixel_pin
|
||||
from kmk.extensions.rgb import RGB
|
||||
from kmk.keys import KC
|
||||
from kmk.modules.layers import Layers
|
||||
from kmk.modules.split import Split, SplitSide, SplitType
|
||||
|
||||
keyboard = KMKKeyboard()
|
||||
|
||||
# Adding extentions
|
||||
rgb = RGB(pixel_pin=rgb_pixel_pin, num_pixels=27, val_limit=100, hue_default=190, sat_default=100, val_default=5)
|
||||
|
||||
# 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]
|
||||
keyboard.extensions = [rgb]
|
||||
#
|
||||
# Cleaner key names
|
||||
_______ = KC.TRNS
|
||||
XXXXXXX = KC.NO
|
||||
|
||||
LOWER = KC.MO(1)
|
||||
RAISE = KC.MO(2)
|
||||
ADJUST = KC.LT(3, KC.SPC)
|
||||
|
||||
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.TAB, KC.Q, KC.W, KC.E, KC.R, KC.T, KC.Y, KC.U, KC.I, KC.O, KC.P, KC.BSPC,\
|
||||
KC.LCTL, 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.RSFT,\
|
||||
KC.LGUI, LOWER, ADJUST, KC.ENT, RAISE, KC.RALT,
|
||||
],
|
||||
[ #LOWER
|
||||
KC.ESC, KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0, KC.BSPC,\
|
||||
KC.LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.LEFT, KC.DOWN, KC.UP, KC.RIGHT, XXXXXXX, XXXXXXX,\
|
||||
KC.LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\
|
||||
KC.LGUI, LOWER, ADJUST, KC.ENT, RAISE, KC.RALT,
|
||||
],
|
||||
[ #RAISE
|
||||
KC.ESC, KC.EXLM, KC.AT, KC.HASH, KC.DLR, KC.PERC, KC.CIRC, KC.AMPR, KC.ASTR, KC.LPRN, KC.RPRN, KC.BSPC,\
|
||||
KC.LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.MINS, KC.EQL, KC.LCBR, KC.RCBR, KC.PIPE, KC.GRV,\
|
||||
KC.LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.UNDS, KC.PLUS, KC.LBRC, KC.RBRC, KC.BSLS, KC.TILD,\
|
||||
KC.LGUI, LOWER, ADJUST, KC.ENT, RAISE, KC.RALT,
|
||||
],
|
||||
[ #ADJUST
|
||||
RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\
|
||||
XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\
|
||||
KC.LGUI, LOWER, ADJUST, KC.ENT, RAISE, KC.RALT,
|
||||
]
|
||||
]
|
||||
|
||||
if __name__ == '__main__':
|
||||
keyboard.go()
|
21
boards/ergo_travel/README.md
Normal file
21
boards/ergo_travel/README.md
Normal file
@ -0,0 +1,21 @@
|
||||
# Ergo Travel
|
||||
|
||||
![ergo_travel](https://boardsource.imgix.net/fa53de62-fd37-4c75-8c5b-b4bec37927c1.jpg?raw=true)
|
||||
|
||||
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()
|
17
boards/fourtypercentclub/gherkin/README.md
Normal file
17
boards/fourtypercentclub/gherkin/README.md
Normal file
@ -0,0 +1,17 @@
|
||||
# Ghirkin
|
||||
|
||||
![Gherkin](https://4.bp.blogspot.com/-sQ18-lNZXOc/WCzlTde-4PI/AAAAAAAB_JQ/qQrehAMG6DMKf3i4oj4mkmLGOfTUvb3KgCLcB/s640/IMG_20161116_122926.jpg)
|
||||
|
||||
A keyboard with only 30 keys.
|
||||
|
||||
kb.py is designed to work with the nice!nano
|
||||
|
||||
Hardware Availability: [Gherkin project on 40% Keyboards](http://www.40percent.club/2016/11/gherkin.html)
|
||||
|
||||
Extentions enabled by default
|
||||
- [Layers](https://github.com/KMKfw/kmk_firmware/tree/master/docs/layers.md) Need more keys than switches? Use layers.
|
||||
- [ModTap](https://github.com/KMKfw/kmk_firmware/tree/master/docs/modtap.md) Allows mod keys to act as different keys when tapped.
|
||||
- [LED](https://github.com/KMKfw/kmk_firmware/tree/master/docs/led.md) Light your keys up
|
||||
|
||||
Common Extentions
|
||||
- [Power](https://github.com/KMKfw/kmk_firmware/tree/master/docs/power.md) Powersaving features for battery life
|
21
boards/fourtypercentclub/gherkin/kb.py
Normal file
21
boards/fourtypercentclub/gherkin/kb.py
Normal file
@ -0,0 +1,21 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
row_pins = (board.P1_15, board.P1_13, board.P1_11, board.P0_10, board.P0_09)
|
||||
col_pins = (
|
||||
board.P1_04,
|
||||
board.P0_11,
|
||||
board.P1_00,
|
||||
board.P0_24,
|
||||
board.P0_22,
|
||||
board.P0_20,
|
||||
)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
led_pin = board.P1_06
|
||||
rgb_num_pixels = 0
|
||||
i2c = board.I2C
|
||||
powersave_pin = board.P0_13
|
67
boards/fourtypercentclub/gherkin/main.py
Normal file
67
boards/fourtypercentclub/gherkin/main.py
Normal file
@ -0,0 +1,67 @@
|
||||
from kb import KMKKeyboard
|
||||
from kmk.extensions.led import LED
|
||||
from kmk.keys import KC
|
||||
from kmk.modules.layers import Layers
|
||||
from kmk.modules.modtap import ModTap
|
||||
|
||||
keyboard = KMKKeyboard()
|
||||
|
||||
|
||||
modtap = ModTap()
|
||||
layers_ext = Layers()
|
||||
led = LED()
|
||||
keyboard.extensions = [led]
|
||||
keyboard.modules = [layers_ext, modtap]
|
||||
|
||||
# Cleaner key names
|
||||
_______ = KC.TRNS
|
||||
XXXXXXX = KC.NO
|
||||
|
||||
FN1_SPC = KC.LT(1, KC.SPC)
|
||||
FN2_BSPC = KC.LT(2, KC.BSPC)
|
||||
FN3_C = KC.LT(3, KC.C)
|
||||
FN4_V = KC.LT(4, KC.V)
|
||||
FN5_B = KC.LT(5, KC.B)
|
||||
CTL_Z = KC.CTL_T(KC.Z)
|
||||
ALT_X = KC.ALT(KC.X)
|
||||
ALT_N = KC.ALT(KC.N)
|
||||
CTL_M = KC.CTL(KC.M)
|
||||
SFT_ENT = KC.SFT(KC.ENT)
|
||||
BL_DEC = KC.BL_DEC
|
||||
BL_INC = KC.BL_INC
|
||||
|
||||
keyboard.keymap = [
|
||||
[
|
||||
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.ESC,
|
||||
CTL_Z, ALT_X, FN3_C, FN4_V, FN2_BSPC, FN1_SPC, FN5_B, ALT_N, CTL_M, SFT_ENT
|
||||
],
|
||||
[
|
||||
KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0,
|
||||
KC.F1, KC.F2, KC.F3, KC.F4, KC.F5, KC.F6, KC.F7, KC.F8, KC.F9, KC.F10,
|
||||
_______, _______, _______, _______, KC.DEL, _______, _______, _______, _______, _______
|
||||
],
|
||||
[
|
||||
KC.EXLM, KC.AT, KC.HASH, KC.DLR, KC.PERC, KC.CIRC, KC.AMPR, KC.ASTR, KC.LPRN, KC.RPRN,
|
||||
KC.F11, KC.F12, _______, _______, _______, _______, _______, _______, _______, KC.GRV,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
],
|
||||
[
|
||||
_______, _______, _______, _______, _______, KC.MINS, KC.EQL, KC.LBRC, KC.RBRC, KC.BSLS,
|
||||
KC.TAB, _______, _______, _______, _______, KC.COMM, KC.DOT, KC.SLSH, KC.SCLN, KC.QUOT,
|
||||
_______, _______, _______, _______, _______, _______, KC.LEFT, KC.DOWN, KC.UP, KC.RGHT
|
||||
],
|
||||
[
|
||||
_______, _______, _______, _______, _______, KC.UNDS, KC.PLUS, KC.LCBR, KC.RCBR, KC.PIPE,
|
||||
KC.TAB, _______, _______, _______, _______, KC.LABK, KC.RABK, KC.QUES, KC.COLN, KC.DQUO,
|
||||
_______, _______, _______, _______, _______, _______, KC.HOME, KC.PGDN, KC.PGUP, KC.END
|
||||
],
|
||||
[
|
||||
KC.CALC, KC.WHOM, KC.MAIL, KC.MYCM, _______, _______, _______, _______, _______, KC.PSCR,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
]
|
||||
]
|
||||
|
||||
if __name__ == '__main__':
|
||||
keyboard.go()
|
18
boards/fourtypercentclub/luddite/README.md
Normal file
18
boards/fourtypercentclub/luddite/README.md
Normal file
@ -0,0 +1,18 @@
|
||||
# Luddite
|
||||
|
||||
![Luddite](https://1.bp.blogspot.com/-GAAa-sMU_WU/W7uYLJJ8x1I/AAAAAAACS44/31n2z69BSboM4KT48YkNMJRYciC8LUMWgCLcBGAs/s640/a.jpg)
|
||||
|
||||
Luddite 60% keyboard with backlight and RGB underglow.
|
||||
|
||||
kb.py is designed to work with the nice!nano
|
||||
kb_converter.py is designed to work with an itsybitsy with converter board found [here](https://github.com/KMKfw/kmk_firmware/tree/master/hardware)
|
||||
|
||||
Hardware Availability: [Luddite project on 40% Keyboards](http://www.40percent.club/search/label/luddite)
|
||||
|
||||
Extentions enabled by default
|
||||
- [Layers](https://github.com/KMKfw/kmk_firmware/tree/master/docs/layers.md) Need more keys than switches? Use layers.
|
||||
- [RGB](https://github.com/KMKfw/kmk_firmware/tree/master/docs/rgb.md) RGB underglow
|
||||
- [LED](https://github.com/KMKfw/kmk_firmware/tree/master/docs/led.md) Light your keys up
|
||||
|
||||
Common Extentions
|
||||
- [Power](https://github.com/KMKfw/kmk_firmware/tree/master/docs/power.md) Powersaving features for battery life
|
33
boards/fourtypercentclub/luddite/kb.py
Normal file
33
boards/fourtypercentclub/luddite/kb.py
Normal file
@ -0,0 +1,33 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
row_pins = (
|
||||
board.P0_06,
|
||||
board.P0_08,
|
||||
board.P0_17,
|
||||
board.P0_20,
|
||||
board.P0_22,
|
||||
board.P0_24,
|
||||
board.P1_00,
|
||||
board.P0_11,
|
||||
)
|
||||
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,
|
||||
)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
led_pin = board.P1_06
|
||||
rgb_pixel_pin = board.P1_04
|
||||
rgb_num_pixels = 8
|
||||
i2c = board.I2C
|
||||
powersave_pin = board.P0_13
|
@ -1,11 +1,20 @@
|
||||
from kmk.boards.converter.fourtypercentclub.luddite import KMKKeyboard
|
||||
from kb import KMKKeyboard
|
||||
from kmk.extensions.led import LED
|
||||
from kmk.extensions.rgb import RGB
|
||||
from kmk.keys import KC
|
||||
from kmk.modules.layers import Layers
|
||||
|
||||
keyboard = KMKKeyboard()
|
||||
|
||||
_______ = KC.TRNS
|
||||
XXXXXXX = KC.NO
|
||||
|
||||
rgb_ext = RGB(pixel_pin=keyboard.rgb_pixel_pin, num_pixels=keyboard.rgb_num_pixels)
|
||||
led = LED()
|
||||
layers_ext = Layers()
|
||||
keyboard.extensions = [rgb_ext, led]
|
||||
keyboard.modules = [layers_ext]
|
||||
|
||||
BASE = 0
|
||||
FN1 = 1
|
||||
|
15
boards/keebio/iris/README.md
Normal file
15
boards/keebio/iris/README.md
Normal file
@ -0,0 +1,15 @@
|
||||
# Iris Rev 2
|
||||
|
||||
A split keyboard with a 4x6 layout with additional 4 thumb buttons
|
||||
|
||||
kb.py is designed to work with the nice!nano
|
||||
kb_converter.py is designed to work with an itsybitsy with converter board found [here](https://github.com/KMKfw/kmk_firmware/tree/master/hardware)
|
||||
|
||||
Extentions enabled by default
|
||||
- [Layers](https://github.com/KMKfw/kmk_firmware/tree/master/docs/layers.md) Need more keys than switches? Use layers.
|
||||
- [RGB](https://github.com/KMKfw/kmk_firmware/tree/master/docs/rgb.md) Light it up
|
||||
- [BLE_Split](https://github.com/KMKfw/kmk_firmware/tree/master/docs/split.md) Connects halves without wires
|
||||
|
||||
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
|
43
boards/keebio/iris/kb.py
Normal file
43
boards/keebio/iris/kb.py
Normal file
@ -0,0 +1,43 @@
|
||||
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.P1_00, board.P0_11, board.P1_04, board.P0_08, board.P0_22)
|
||||
col_pins = (
|
||||
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
|
||||
i2c = board.I2C
|
||||
data_pin = board.P0_08
|
||||
powersave_pin = board.P0_13
|
||||
led_pin = board.D7
|
||||
|
||||
coord_mapping = []
|
||||
coord_mapping.extend(ic(0, x) for x in range(12))
|
||||
coord_mapping.extend(ic(1, x) for x in range(12))
|
||||
coord_mapping.extend(ic(2, x) for x in range(12))
|
||||
|
||||
# Buckle up friends, the bottom row of this keyboard is wild, and making
|
||||
# our layouts match, visually, what the keyboard looks like, requires some
|
||||
# surgery on the bottom two rows of coords
|
||||
|
||||
# Row index 3 is actually perfectly sane and we _could_ expose it
|
||||
# just like the above three rows, however, visually speaking, the
|
||||
# top-right thumb cluster button (when looking at the left-half PCB)
|
||||
# is more inline with R3, so we'll jam that key (and its mirror) in here
|
||||
coord_mapping.extend(ic(3, x) for x in range(6))
|
||||
coord_mapping.append(ic(4, 2))
|
||||
coord_mapping.append(ic(4, 9))
|
||||
coord_mapping.extend(ic(3, x) for x in range(6, 12)) # Now, the rest of R3
|
@ -16,8 +16,10 @@ class KMKKeyboard(_KMKKeyboard):
|
||||
split_flip = True
|
||||
split_offsets = (6, 6, 6, 6, 6)
|
||||
split_type = 'UART'
|
||||
uart_pin = board.SCL
|
||||
extra_data_pin = board.SDA
|
||||
data_pin = board.SCL
|
||||
data_pin2 = board.SDA
|
||||
rgb_num_pixels = 12
|
||||
i2c = board.I2C
|
||||
rgb_pixel_pin = board.TX
|
||||
led_pin = board.D7
|
||||
|
95
boards/keebio/iris/main.py
Normal file
95
boards/keebio/iris/main.py
Normal file
@ -0,0 +1,95 @@
|
||||
from kb import KMKKeyboard
|
||||
from kmk.consts import UnicodeMode
|
||||
from kmk.extensions.rgb import RGB
|
||||
from kmk.handlers.sequences import compile_unicode_string_sequences as cuss
|
||||
from kmk.handlers.sequences import send_string
|
||||
from kmk.keys import KC
|
||||
from kmk.modules.layers import Layers
|
||||
from kmk.modules.split import Split, SplitSide, SplitType
|
||||
|
||||
keyboard = KMKKeyboard()
|
||||
|
||||
keyboard.debug_enabled = False
|
||||
keyboard.unicode_mode = UnicodeMode.LINUX
|
||||
keyboard.tap_time = 750
|
||||
|
||||
emoticons = cuss({
|
||||
# Emojis
|
||||
'BEER': r'🍺',
|
||||
'BEER_TOAST': r'🍻',
|
||||
'FACE_CUTE_SMILE': r'😊',
|
||||
'FACE_HEART_EYES': r'😍',
|
||||
'FACE_JOY': r'😂',
|
||||
'FACE_SWEAT_SMILE': r'😅',
|
||||
'FACE_THINKING': r'🤔',
|
||||
'FIRE': r'🔥',
|
||||
'FLAG_CA': r'🇨🇦',
|
||||
'FLAG_US': r'🇺🇸',
|
||||
'HAND_CLAP': r'👏',
|
||||
'HAND_HORNS': r'🤘',
|
||||
'HAND_OK': r'👌',
|
||||
'HAND_THUMB_DOWN': r'👎',
|
||||
'HAND_THUMB_UP': r'👍',
|
||||
'HAND_WAVE': r'👋',
|
||||
'HEART': r'❤️',
|
||||
'MAPLE_LEAF': r'🍁',
|
||||
'POOP': r'💩',
|
||||
'TADA': r'🎉',
|
||||
'SHRUG_EMOJI': r'🤷',
|
||||
|
||||
# Emoticons, but fancier
|
||||
'ANGRY_TABLE_FLIP': r'(ノಠ痊ಠ)ノ彡┻━┻',
|
||||
'CELEBRATORY_GLITTER': r'+。:.゚ヽ(´∀。)ノ゚.:。+゚゚+。:.゚ヽ(*´∀)ノ゚.:。+゚',
|
||||
'SHRUGGIE': r'¯\_(ツ)_/¯',
|
||||
'TABLE_FLIP': r'(╯°□°)╯︵ ┻━┻',
|
||||
})
|
||||
|
||||
WPM = send_string('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Bibendum arcu vitae elementum curabitur vitae nunc sed. Facilisis sed odio morbi quis.')
|
||||
|
||||
_______ = KC.TRNS
|
||||
xxxxxxx = KC.NO
|
||||
HELLA_TD = KC.TD(
|
||||
KC.A,
|
||||
KC.B,
|
||||
send_string('macros in a tap dance? I think yes'),
|
||||
KC.TG(1),
|
||||
)
|
||||
|
||||
rgb_ext = RGB(pixel_pin=keyboard.rgb_pixel_pin, num_pixels=keyboard.rgb_num_pixels)
|
||||
layers_ext = Layers()
|
||||
|
||||
# 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)
|
||||
|
||||
keyboard.extensions = [rgb_ext]
|
||||
keyboard.modules = [split, layers_ext]
|
||||
|
||||
|
||||
keyboard.keymap = [
|
||||
[
|
||||
KC.GESC, KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0, KC.BSPC,
|
||||
KC.TAB, KC.QUOT, KC.COMM, KC.DOT, KC.P, KC.Y, KC.F, KC.G, KC.C, KC.R, KC.L, KC.SLSH,
|
||||
KC.LGUI, KC.A, KC.O, KC.E, KC.U, KC.I, KC.D, KC.H, KC.T, KC.N, KC.S, KC.ENTER,
|
||||
KC.LCTL, KC.SCLN, KC.Q, KC.J, KC.K, KC.X, KC.MO(2), KC.MO(1), KC.B, KC.M, KC.W, KC.V, KC.Z, KC.LALT,
|
||||
KC.LEFT, KC.RGHT, KC.LSFT, KC.SPC, KC.UP, KC.DOWN,
|
||||
],
|
||||
[
|
||||
_______, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, KC.F10, KC.F11, KC.F12, xxxxxxx, xxxxxxx, _______,
|
||||
xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, KC.F7, KC.F8, KC.F9, xxxxxxx, xxxxxxx, KC.EQUAL,
|
||||
xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, KC.INS, KC.F4, KC.F5, KC.F6, xxxxxxx, xxxxxxx, xxxxxxx,
|
||||
xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, KC.NO, _______, KC.F1, KC.F2, KC.F3, xxxxxxx, xxxxxxx, _______,
|
||||
KC.HOME, KC.END, _______, xxxxxxx, KC.PGUP, KC.PGDN,
|
||||
],
|
||||
[
|
||||
KC.MUTE, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, KC.LBRC, KC.RBRC, KC.DEL,
|
||||
xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, KC.BSLS,
|
||||
KC.RGUI, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, KC.MINS,
|
||||
xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, _______, KC.VOLU, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, KC.RALT,
|
||||
KC.HOME, KC.END, _______, KC.VOLD, KC.PGUP, KC.PGDN,
|
||||
],
|
||||
]
|
||||
|
||||
if __name__ == '__main__':
|
||||
keyboard.go()
|
15
boards/keebio/levinson/README.md
Normal file
15
boards/keebio/levinson/README.md
Normal file
@ -0,0 +1,15 @@
|
||||
# Levinson Rev 2
|
||||
|
||||
A split keyboard with a 4x6 layout
|
||||
|
||||
kb.py is designed to work with the nice!nano
|
||||
kb_converter.py is designed to work with an itsybitsy with converter board found [here](https://github.com/KMKfw/kmk_firmware/tree/master/hardware)
|
||||
|
||||
Extentions enabled by default
|
||||
- [Layers](https://github.com/KMKfw/kmk_firmware/tree/master/docs/layers.md) Need more keys than switches? Use layers.
|
||||
- [RGB](https://github.com/KMKfw/kmk_firmware/tree/master/docs/rgb.md) Light it up
|
||||
- [BLE_Split](https://github.com/KMKfw/kmk_firmware/tree/master/docs/split.md) Connects halves without wires
|
||||
|
||||
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
|
23
boards/keebio/levinson/kb.py
Normal file
23
boards/keebio/levinson/kb.py
Normal file
@ -0,0 +1,23 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
row_pins = (board.P0_22, board.P1_00, board.P0_11, board.P1_04)
|
||||
col_pins = (
|
||||
board.P0_02,
|
||||
board.P1_15,
|
||||
board.P1_13,
|
||||
board.P1_11,
|
||||
board.P0_10,
|
||||
board.P0_09,
|
||||
)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
rgb_pixel_pin = board.P0_06
|
||||
rgb_num_pixels = 12
|
||||
led_pin = board.P1_06
|
||||
data_pin = board.P0_08
|
||||
i2c = board.I2C
|
||||
powersave_pin = board.P0_13
|
@ -12,7 +12,7 @@ class KMKKeyboard(_KMKKeyboard):
|
||||
split_type = 'UART'
|
||||
split_flip = True
|
||||
split_offsets = [6, 6, 6, 6, 6]
|
||||
uart_pin = board.SCL
|
||||
extra_data_pin = board.SDA
|
||||
data_pin = board.SCL
|
||||
data_pin2 = board.SDA
|
||||
rgb_pixel_pin = board.TX
|
||||
# led_pin = board.D7
|
||||
led_pin = board.D7
|
132
boards/keebio/levinson/main.py
Normal file
132
boards/keebio/levinson/main.py
Normal file
@ -0,0 +1,132 @@
|
||||
from kb import KMKKeyboard
|
||||
from kmk.extensions.rgb import RGB
|
||||
from kmk.keys import KC
|
||||
from kmk.modules.layers import Layers
|
||||
from kmk.modules.split import Split, SplitSide, SplitType
|
||||
|
||||
keyboard = KMKKeyboard()
|
||||
|
||||
rgb_ext = RGB(pixel_pin=keyboard.rgb_pixel_pin, num_pixels=keyboard.rgb_num_pixels)
|
||||
layers_ext = Layers()
|
||||
# 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)
|
||||
|
||||
keyboard.extensions = [rgb_ext]
|
||||
keyboard.modules = [layers_ext, split]
|
||||
|
||||
_______ = KC.TRNS
|
||||
XXXXXXX = KC.NO
|
||||
|
||||
LOWER = KC.MO(3)
|
||||
RAISE = KC.MO(4)
|
||||
ADJUST = KC.MO(5)
|
||||
|
||||
keyboard.keymap = [
|
||||
# Qwerty
|
||||
# ,-----------------------------------------------------------------------------------.
|
||||
# | Tab | Q | W | E | R | T | Y | U | I | O | P | Bak |
|
||||
# |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
# | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
# |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
# | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
# |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
# |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
|
||||
# `-----------------------------------------------------------------------------------'
|
||||
[
|
||||
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.GESC, 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,
|
||||
ADJUST, KC.LCTL, KC.LALT, KC.LGUI, LOWER, KC.SPC, KC.SPC, RAISE, KC.LEFT, KC.DOWN, KC.UP, KC.RGHT,
|
||||
],
|
||||
|
||||
# Colemak
|
||||
# ,-----------------------------------------------------------------------------------.
|
||||
# | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bak |
|
||||
# |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
# | Esc | A | R | S | T | D | H | N | E | I | O | " |
|
||||
# |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
# | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
|
||||
# |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
# |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
|
||||
# `-----------------------------------------------------------------------------------'
|
||||
[
|
||||
KC.TAB, KC.Q, KC.W, KC.F, KC.P, KC.G, KC.J, KC.L, KC.U, KC.Y, KC.SCLN, KC.BSPC,
|
||||
KC.GESC, KC.A, KC.R, KC.S, KC.T, KC.D, KC.H, KC.N, KC.E, KC.I, KC.O, KC.QUOT,
|
||||
KC.LSFT, KC.Z, KC.X, KC.C, KC.V, KC.B, KC.K, KC.M, KC.COMM, KC.DOT, KC.SLSH, KC.ENT,
|
||||
ADJUST, KC.LCTL, KC.LALT, KC.LGUI, LOWER, KC.SPC, KC.SPC, RAISE, KC.LEFT, KC.DOWN, KC.UP, KC.RGHT,
|
||||
],
|
||||
|
||||
# Dvorak
|
||||
# ,-----------------------------------------------------------------------------------.
|
||||
# | Tab | " | , | . | P | Y | F | G | C | R | L | Bak |
|
||||
# |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
# | Esc | A | O | E | U | I | D | H | T | N | S | / |
|
||||
# |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
# | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
|
||||
# |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
# |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
|
||||
# `-----------------------------------------------------------------------------------'
|
||||
[
|
||||
KC.TAB, KC.QUOT, KC.COMM, KC.DOT, KC.P, KC.Y, KC.F, KC.G, KC.C, KC.R, KC.L, KC.BSPC,
|
||||
KC.GESC, KC.A, KC.O, KC.E, KC.U, KC.I, KC.D, KC.H, KC.T, KC.N, KC.S, KC.SLSH,
|
||||
KC.LSFT, KC.SCLN, KC.Q, KC.J, KC.K, KC.X, KC.B, KC.M, KC.W, KC.V, KC.Z, KC.ENT,
|
||||
ADJUST, KC.LCTL, KC.LALT, KC.LGUI, LOWER, KC.SPC, KC.SPC, RAISE, KC.LEFT, KC.DOWN, KC.UP, KC.RGHT,
|
||||
],
|
||||
|
||||
# Lower
|
||||
# ,-----------------------------------------------------------------------------------.
|
||||
# | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
|
||||
# |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
# | Del | F1 | F2 | F3 | F4 | F5 | F6 | . | + | | \ | | |
|
||||
# |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
# | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
|
||||
# |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
# | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
# `-----------------------------------------------------------------------------------'
|
||||
[
|
||||
KC.TILD, KC.EXLM, KC.AT, KC.HASH, KC.DLR, KC.PERC, KC.CIRC, KC.AMPR, KC.ASTR, KC.LPRN, KC.RPRN, KC.DEL,
|
||||
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.NUHS, KC.NUBS, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC.MNXT, KC.VOLD, KC.VOLU, KC.MPLY,
|
||||
],
|
||||
|
||||
# Raise
|
||||
# ,-----------------------------------------------------------------------------------.
|
||||
# | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
# |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
# | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||
# |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
# | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
|
||||
# |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
# | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
# `-----------------------------------------------------------------------------------'
|
||||
[
|
||||
KC.GRV, KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0, KC.DEL,
|
||||
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.MNXT, KC.VOLD, KC.VOLU, KC.MPLY,
|
||||
],
|
||||
|
||||
# Adjust
|
||||
# ,-----------------------------------------------------------------------------------.
|
||||
# | | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn|Sat Up|Sat Dn|Val Up|Val Dn| | Del |
|
||||
# |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
# | | | | | | | |Qwerty|Colemk|Dvorak| | |
|
||||
# |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
# | | | | | | | | | | | | |
|
||||
# |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
# | | | | | | | | | | | |
|
||||
# `-----------------------------------------------------------------------------------'
|
||||
[
|
||||
_______, _______, KC.RGB.TOG, KC.RGB.MOD, KC.RGB.HUD, KC.RGB.HUI, KC.RGB.SAD, KC.RGB.SAI, KC.RGB.VAD, KC.RGB.VAI, _______, KC.DEL,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC.DF(0), KC.DF(1), KC.DF(2), _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
],
|
||||
|
||||
]
|
||||
|
||||
if __name__ == '__main__':
|
||||
keyboard.go()
|
16
boards/keebio/nyquist/README.md
Normal file
16
boards/keebio/nyquist/README.md
Normal file
@ -0,0 +1,16 @@
|
||||
# Nyquist Rev 2
|
||||
|
||||
A split keyboard with a 5x6 layout
|
||||
|
||||
kb.py is designed to work with the nice!nano
|
||||
kb_converter.py is designed to work with an itsybitsy with converter board found [here](https://github.com/KMKfw/kmk_firmware/tree/master/hardware)
|
||||
|
||||
|
||||
Extentions enabled by default
|
||||
- [Layers](https://github.com/KMKfw/kmk_firmware/tree/master/docs/layers.md) Need more keys than switches? Use layers.
|
||||
- [RGB](https://github.com/KMKfw/kmk_firmware/tree/master/docs/rgb.md) Light it up
|
||||
- [BLE_Split](https://github.com/KMKfw/kmk_firmware/tree/master/docs/split.md) Connects halves without wires
|
||||
|
||||
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
|
23
boards/keebio/nyquist/kb.py
Normal file
23
boards/keebio/nyquist/kb.py
Normal file
@ -0,0 +1,23 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
row_pins = (board.P0_22, board.P1_00, board.P0_11, board.P1_04, board.P1_06)
|
||||
col_pins = (
|
||||
board.P0_08,
|
||||
board.P0_29,
|
||||
board.P0_02,
|
||||
board.P1_15,
|
||||
board.P1_13,
|
||||
board.P1_11,
|
||||
)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
rgb_pixel_pin = board.P0_06
|
||||
rgb_num_pixels = 12
|
||||
data_pin = board.P0_08
|
||||
led_pin = board.P0_09
|
||||
i2c = board.I2C
|
||||
powersave_pin = board.P0_13
|
@ -11,7 +11,7 @@ class KMKKeyboard(_KMKKeyboard):
|
||||
|
||||
split_type = 'UART'
|
||||
split_flip = True
|
||||
split_offsets = [6, 6, 6, 6, 6]
|
||||
uart_pin = board.SCL
|
||||
data_pin = board.SCL
|
||||
rgb_num_pixels = 12
|
||||
rgb_pixel_pin = board.TX
|
||||
extra_data_pin = board.SDA
|
||||
data_pin2 = board.SDA
|
@ -1,8 +1,22 @@
|
||||
from kmk.boards.converter.keebio.nyquist_r2 import KMKKeyboard
|
||||
from kb import KMKKeyboard
|
||||
from kmk.extensions.rgb import RGB
|
||||
from kmk.keys import KC
|
||||
from kmk.modules.layers import Layers
|
||||
from kmk.modules.split import Split, SplitSide, SplitType
|
||||
|
||||
keyboard = KMKKeyboard()
|
||||
|
||||
rgb_ext = RGB(pixel_pin=keyboard.rgb_pixel_pin, num_pixels=keyboard.rgb_num_pixels)
|
||||
layers_ext = Layers()
|
||||
|
||||
# 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)
|
||||
|
||||
keyboard.modules = [layers_ext, split]
|
||||
keyboard.extensions = [rgb_ext]
|
||||
|
||||
_______ = KC.TRNS
|
||||
XXXXXXX = KC.NO
|
||||
|
@ -3,6 +3,7 @@ import board
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.matrix import intify_coordinate as ic
|
||||
from kmk.modules.layers import Layers
|
||||
|
||||
# Implements what used to be handled by KMKKeyboard.swap_indicies for this
|
||||
# board, by flipping various row3 (bottom physical row) keys so their
|
||||
@ -40,3 +41,6 @@ class KMKKeyboard(_KMKKeyboard):
|
||||
coord_mapping.extend(ic(1, x) for x in range(12))
|
||||
coord_mapping.extend(ic(2, x) for x in range(12))
|
||||
coord_mapping.extend(ic(3, r3_swap(x)) for x in range(12))
|
||||
|
||||
layers_ext = Layers()
|
||||
modules = [layers_ext]
|
20
boards/lily58/README.md
Normal file
20
boards/lily58/README.md
Normal file
@ -0,0 +1,20 @@
|
||||
# Lily 58 Pro
|
||||
|
||||
![Lily58](https://boardsource.imgix.net/af3d8d6d-5fbe-4578-a2ba-d09d7686fb29.jpg?raw=true)
|
||||
|
||||
The Lily58 is a 58 key split keyboard design by kata0510, featuring a 6x4 columnar stagger and 4 thumb cluster keys on each hand. The Lily58 is a perfect choice for people who want to be on a split keyboard but still want to have a fairly standard amount of keys.
|
||||
|
||||
Hardware Availability: [PCB & Case Source](https://github.com/kata0510/Lily58)
|
||||
kb.py is designed to work with the nice!nano
|
||||
|
||||
Retailers (USA)
|
||||
[Boardsource](https://boardsource.xyz/store/5ec9df84c6b834480de6c3d0)
|
||||
|
||||
Extentions enabled by default
|
||||
- [Layers](https://github.com/KMKfw/kmk_firmware/tree/master/docs/layers.md) Need more keys than switches? Use layers.
|
||||
- [RGB](https://github.com/KMKfw/kmk_firmware/tree/master/docs/rgb.md) Light it up
|
||||
- [BLE_Split](https://github.com/KMKfw/kmk_firmware/tree/master/docs/split.md) Connects halves without wires
|
||||
|
||||
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
|
32
boards/lily58/kb.py
Normal file
32
boards/lily58/kb.py
Normal file
@ -0,0 +1,32 @@
|
||||
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,
|
||||
board.P1_11,
|
||||
)
|
||||
row_pins = (board.P0_22, board.P0_24, board.P1_00, board.P0_11)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
uart_pin = board.P0_08
|
||||
rgb_pixel_pin = board.P0_06
|
||||
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(12))
|
||||
coord_mapping.extend(ic(1, x) for x in range(12))
|
||||
coord_mapping.extend(ic(2, x) for x in range(12))
|
||||
coord_mapping.extend(ic(3, x) for x in range(12))
|
||||
|
||||
# And now, to handle R4, which at this point is down to just ten keys
|
||||
coord_mapping.extend(ic(4, x) for x in range(1, 11))
|
66
boards/lily58/main.py
Normal file
66
boards/lily58/main.py
Normal file
@ -0,0 +1,66 @@
|
||||
from kb import KMKKeyboard, rgb_pixel_pin
|
||||
from kmk.extensions.ble_split import BLE_Split
|
||||
from kmk.extensions.layers import Layers
|
||||
from kmk.extensions.rgb import RGB
|
||||
from kmk.keys import KC
|
||||
|
||||
keyboard = KMKKeyboard()
|
||||
|
||||
# Cleaner key names
|
||||
_______ = KC.TRNS
|
||||
XXXXXXX = KC.NO
|
||||
|
||||
LOWER = KC.MO(1)
|
||||
RAISE = KC.MO(2)
|
||||
ADJUST = KC.LT(3, KC.SPC)
|
||||
|
||||
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
|
||||
|
||||
# Adding extentions
|
||||
rgb = RGB(pixel_pin=rgb_pixel_pin, num_pixels=27, val_limit=100, hue_default=190, sat_default=100, val_default=5)
|
||||
|
||||
# TODO Comment one of these on each side
|
||||
# Left is 0, Right is 1
|
||||
split_side = 0
|
||||
split_side = 1
|
||||
split = BLE_Split(split_side=split_side)
|
||||
|
||||
layers_ext = Layers()
|
||||
|
||||
extensions = [layers_ext, split, rgb]
|
||||
|
||||
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.LCTL, 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.RSFT,\
|
||||
KC.LGUI, LOWER, ADJUST, KC.ENT, RAISE, KC.RALT,
|
||||
],
|
||||
[ #LOWER
|
||||
KC.ESC, KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0, KC.BSPC,\
|
||||
KC.LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.LEFT, KC.DOWN, KC.UP, KC.RIGHT, XXXXXXX, XXXXXXX,\
|
||||
KC.LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\
|
||||
KC.LGUI, LOWER, ADJUST, KC.ENT, RAISE, KC.RALT,
|
||||
],
|
||||
[ #RAISE
|
||||
KC.ESC, KC.EXLM, KC.AT, KC.HASH, KC.DLR, KC.PERC, KC.CIRC, KC.AMPR, KC.ASTR, KC.LPRN, KC.RPRN, KC.BSPC,\
|
||||
KC.LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.MINS, KC.EQL, KC.LCBR, KC.RCBR, KC.PIPE, KC.GRV,\
|
||||
KC.LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.UNDS, KC.PLUS, KC.LBRC, KC.RBRC, KC.BSLS, KC.TILD,\
|
||||
KC.LGUI, LOWER, ADJUST, KC.ENT, RAISE, KC.RALT,
|
||||
],
|
||||
[ #ADJUST
|
||||
RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\
|
||||
XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\
|
||||
KC.LGUI, LOWER, ADJUST, KC.ENT, RAISE, KC.RALT,
|
||||
]
|
||||
]
|
||||
|
||||
if __name__ == '__main__':
|
||||
keyboard.go()
|
20
boards/reviung39/README.md
Normal file
20
boards/reviung39/README.md
Normal file
@ -0,0 +1,20 @@
|
||||
# Reviung39
|
||||
|
||||
![Reviung39](https://boardsource.imgix.net/d6215164-6100-4b72-b355-1a67b7704463.jpg?raw=true)
|
||||
|
||||
Reviung39 is a 39 key keyboard designed by gtips. The Reviung39 sits somewhere between an Atreus and a Corne, you get some nice ergonomic benefits based on its quasi-split design and since a true split keyboard isn't for everyone, this is an awesome middle ground. I find this keyboard extremely comfortable to use.
|
||||
|
||||
kb.py is designed to work with the nice!nano
|
||||
|
||||
Hardware Availability: [PCB & Case Data](https://github.com/gtips/reviung)
|
||||
|
||||
Retailers (USA)
|
||||
[Boardsource](https://boardsource.xyz/store/5ecb734486879c9a0c22dab3)
|
||||
|
||||
Extentions enabled by default
|
||||
- [Layers](https://github.com/KMKfw/kmk_firmware/tree/master/docs/layers.md) Need more keys than switches? Use layers.
|
||||
- [RGB](https://github.com/KMKfw/kmk_firmware/tree/master/docs/rgb.md) Light it up
|
||||
- [ModTap](https://github.com/KMKfw/kmk_firmware/tree/master/docs/modtap.md) Allows mod keys to act as different keys when tapped.
|
||||
|
||||
Common Extentions
|
||||
- [Power](https://github.com/KMKfw/kmk_firmware/tree/master/docs/power.md) Powersaving features for battery life
|
27
boards/reviung39/kb.py
Normal file
27
boards/reviung39/kb.py
Normal file
@ -0,0 +1,27 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
row_pins = (
|
||||
board.P0_31,
|
||||
board.P0_29,
|
||||
board.P0_02,
|
||||
board.P1_15,
|
||||
board.P1_13,
|
||||
board.P1_11,
|
||||
board.P0_10,
|
||||
)
|
||||
col_pins = (
|
||||
board.P0_22,
|
||||
board.P0_24,
|
||||
board.P1_00,
|
||||
board.P0_11,
|
||||
board.P1_04,
|
||||
board.P1_06,
|
||||
)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
i2c = board.I2C
|
||||
powersave_pin = board.P0_13
|
48
boards/reviung39/main.py
Normal file
48
boards/reviung39/main.py
Normal file
@ -0,0 +1,48 @@
|
||||
from kb import KMKKeyboard
|
||||
from kmk.extensions.rgb import RGB
|
||||
from kmk.keys import KC
|
||||
from kmk.modules.layers import Layers
|
||||
from kmk.modules.modtap import ModTap
|
||||
|
||||
keyboard = KMKKeyboard()
|
||||
|
||||
# Adding extentions
|
||||
rgb = RGB(pixel_pin=keyboard.rgb_pixel_pin, num_pixels=keyboard.rgb_num_pixels, val_limit=100, hue_default=190, sat_default=100, val_default=5)
|
||||
|
||||
modtap = ModTap()
|
||||
layers_ext = Layers()
|
||||
|
||||
keyboard.modules = [layers_ext, modtap]
|
||||
keyboard.extensions = [rgb]
|
||||
|
||||
# Cleaner key names
|
||||
_______ = KC.TRNS
|
||||
XXXXXXX = KC.NO
|
||||
|
||||
LOWER = KC.MO(1)
|
||||
RAISE = KC.MO(2)
|
||||
|
||||
keyboard.keymap = [
|
||||
[ #QWERTY
|
||||
KC.ESC, KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0, KC.GRV,
|
||||
KC.TAB, KC.Q, KC.W, KC.E, KC.R, KC.T, KC.Y, KC.U, KC.I, KC.O, KC.P, KC.MINS,
|
||||
KC.LCTRL, 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.LBRC, KC.RBRC, KC.N, KC.M, KC.COMM, KC.DOT, KC.SLSH, KC.RSFT,
|
||||
KC.LALT, KC.LGUI, LOWER, KC.SPC, KC.ENT, RAISE, KC.BSPC, KC.RGUI
|
||||
],
|
||||
[ #LOWER
|
||||
KC.F1, KC.F2, KC.F3, KC.F4, KC.F5, KC.F6, KC.F7, KC.F8, KC.F9, KC.F10, KC.F11, KC.F12,
|
||||
KC.GRV, KC.EXLM, KC.AT, KC.HASH, KC.DLR, KC.PERC, KC.CIRC, KC.AMPR, KC.ASTR, KC.LPRN, KC.RPRN, KC.TILD,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, KC.UNDS, KC.PLUS, KC.LCBR, KC.RCBR, KC.PIPE,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______
|
||||
],
|
||||
[ #RAISE
|
||||
KC.GRV, KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0, _______,
|
||||
KC.F1, KC.F2, KC.F3, KC.F4, KC.F5, KC.F6, XXXXXXX, KC.LEFT, KC.DOWN, KC.UP, KC.RGHT, XXXXXXX,
|
||||
KC.F7, KC.F8, KC.F9, KC.F10, KC.F11, KC.F12, _______, _______, KC.PLUS, KC.MINS, KC.EQL, KC.LBRC, KC.RBRC, KC.BSLS,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______
|
||||
]
|
||||
]
|
||||
|
||||
if __name__ == '__main__':
|
||||
keyboard.go()
|
20
boards/reviung41/README.md
Normal file
20
boards/reviung41/README.md
Normal file
@ -0,0 +1,20 @@
|
||||
# Reviung41
|
||||
|
||||
![Reviung41](https://boardsource.imgix.net/ea77f3f8-6cc4-4cb4-a801-cf58b5af8fcc.jpg?raw=true)
|
||||
|
||||
The Reviung41 is a 41 key keyboard designed by gtips, it is a slightly larger version of the popular Reviung 39. These "split non-split" keyboards offer a lot of features split keyboards have in terms of comfort and ergonomics but do so in a single-piece package. Many people consider keyboards in this style easier to travel with since you don't have to manage two halves and there is of course no need for a TRRS cable. This board sits somewhere between and Atreus and Corne, and it is extremely comfortable to use.
|
||||
|
||||
kb.py is designed to work with the nice!nano
|
||||
|
||||
Hardware Availability: [PCB & Case Data](https://github.com/gtips/reviung/tree/master/reviung41)
|
||||
|
||||
Retailers (USA)
|
||||
[Boardsource](https://boardsource.xyz/store/5f2ef1b52bf5e8714a60f613)
|
||||
|
||||
Extentions enabled by default
|
||||
- [Layers](https://github.com/KMKfw/kmk_firmware/tree/master/docs/layers.md) Need more keys than switches? Use layers.
|
||||
- [RGB](https://github.com/KMKfw/kmk_firmware/tree/master/docs/rgb.md) Light it up
|
||||
- [ModTap](https://github.com/KMKfw/kmk_firmware/tree/master/docs/modtap.md) Allows mod keys to act as different keys when tapped.
|
||||
|
||||
Common Extentions
|
||||
- [Power](https://github.com/KMKfw/kmk_firmware/tree/master/docs/power.md) Powersaving features for battery life
|
38
boards/reviung41/kb.py
Normal file
38
boards/reviung41/kb.py
Normal file
@ -0,0 +1,38 @@
|
||||
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_22,
|
||||
board.P0_24,
|
||||
board.P1_00,
|
||||
board.P0_11,
|
||||
board.P1_04,
|
||||
board.P1_06,
|
||||
)
|
||||
row_pins = (
|
||||
board.P0_31,
|
||||
board.P0_29,
|
||||
board.P0_02,
|
||||
board.P1_15,
|
||||
board.P1_13,
|
||||
board.P1_11,
|
||||
board.P0_10,
|
||||
)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
rgb_pixel_pin = board.P0_06
|
||||
rgb_num_pixels = 11
|
||||
i2c = board.I2C
|
||||
powersave_pin = board.P0_13
|
||||
|
||||
coord_mapping = []
|
||||
coord_mapping.extend(ic(0, x) for x in range(12))
|
||||
coord_mapping.extend(ic(1, x) for x in range(12))
|
||||
coord_mapping.extend(ic(2, x) for x in range(12))
|
||||
|
||||
# And now, to handle R3, which at this point is down to just five keys
|
||||
coord_mapping.extend(ic(3, x) for x in range(5))
|
64
boards/reviung41/main.py
Normal file
64
boards/reviung41/main.py
Normal file
@ -0,0 +1,64 @@
|
||||
from kb import KMKKeyboard
|
||||
from kmk.extensions.rgb import RGB
|
||||
from kmk.keys import KC
|
||||
from kmk.modules.layers import Layers
|
||||
from kmk.modules.modtap import ModTap
|
||||
|
||||
keyboard = KMKKeyboard()
|
||||
|
||||
# Adding extentions
|
||||
rgb = RGB(pixel_pin=keyboard.rgb_pixel_pin, num_pixels=keyboard.rgb_num_pixels, val_limit=100, hue_default=190, sat_default=100, val_default=5)
|
||||
|
||||
modtap = ModTap()
|
||||
layers_ext = Layers()
|
||||
|
||||
keyboard.modules = [layers_ext, modtap]
|
||||
keyboard.extensions = [rgb]
|
||||
|
||||
# Cleaner key names
|
||||
_______ = KC.TRNS
|
||||
XXXXXXX = KC.NO
|
||||
|
||||
LOWER = KC.MO(1)
|
||||
RAISE = KC.MO(2)
|
||||
ADJUST = KC.LT(3, KC.SPC)
|
||||
RSFT_ENT = KC.MT(KC.ENT, KC.RSFT)
|
||||
RSFT_SPC = KC.MT(KC.SPC, KC.RSFT)
|
||||
|
||||
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.TAB, KC.Q, KC.W, KC.E, KC.R, KC.T, KC.Y, KC.U, KC.I, KC.O, KC.P, KC.BSPC,
|
||||
KC.LCTL, 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, RSFT_ENT,
|
||||
KC.LALT, LOWER, KC.SPC, RAISE, KC.RGUI,
|
||||
],
|
||||
[ #LOWER
|
||||
KC.ESC, KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0, KC.BSPC,
|
||||
KC.LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.LEFT, KC.DOWN, KC.UP, KC.RIGHT, XXXXXXX, XXXXXXX,
|
||||
KC.LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RSFT_SPC,
|
||||
KC.LALT, LOWER, KC.SPC, RAISE, KC.RGUI,
|
||||
],
|
||||
[ #RAISE
|
||||
KC.ESC, KC.EXLM, KC.AT, KC.HASH, KC.DLR, KC.PERC, KC.CIRC, KC.AMPR, KC.ASTR, KC.LPRN, KC.RPRN, KC.BSPC,
|
||||
KC.LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.MINS, KC.EQL, KC.LCBR, KC.RCBR, KC.PIPE, KC.GRV,
|
||||
KC.LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.UNDS, KC.PLUS, KC.LBRC, KC.RBRC, KC.BSLS, KC.TILD,
|
||||
KC.LALT, LOWER, KC.SPC, RAISE, KC.RGUI,
|
||||
],
|
||||
[ #ADJUST
|
||||
RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
KC.LALT, LOWER, KC.SPC, RAISE, KC.RGUI,
|
||||
]
|
||||
]
|
||||
|
||||
if __name__ == '__main__':
|
||||
keyboard.go()
|
19
boards/rhymestone/README.md
Normal file
19
boards/rhymestone/README.md
Normal file
@ -0,0 +1,19 @@
|
||||
# Rhymestone
|
||||
|
||||
![rhymestone](https://boardsource.imgix.net/0968c21e-ed0c-47ec-ae5e-511ec6eb3bd2.jpg?raw=true)
|
||||
|
||||
The Rhymestone is 40-key ortholinear split keyboard. Originally the Rhymestone was created to be sold alongside the Treadstone and used as either a Macro pad or a 10-key numpad, hence the similar naming conventions. However; the Rhymestone is also often used as a standalone split keyboard by people who prefer a 5 column ortholinear layout.
|
||||
|
||||
kb.py is designed to work with the nice!nano
|
||||
|
||||
Retailers (USA)
|
||||
[Boardsource](https://boardsource.xyz/store/5ecb6aee86879c9a0c22da89)
|
||||
|
||||
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
|
15
boards/rhymestone/kb.py
Normal file
15
boards/rhymestone/kb.py
Normal file
@ -0,0 +1,15 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
row_pins = (board.P0_31, board.P0_29, board.P0_02, board.P1_15)
|
||||
col_pins = (board.P0_22, board.P0_24, board.P1_00, board.P0_11, board.P1_04)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
rgb_pixel_pin = board.P0_06
|
||||
rgb_num_pixels = 40
|
||||
data_pin = board.P0_08
|
||||
i2c = board.I2C
|
||||
powersave_pin = board.P0_13
|
51
boards/rhymestone/main.py
Normal file
51
boards/rhymestone/main.py
Normal file
@ -0,0 +1,51 @@
|
||||
from kb import KMKKeyboard
|
||||
from kmk.extensions.layers import Layers
|
||||
from kmk.extensions.split import Split, SplitSide, SplitType
|
||||
from kmk.keys import KC
|
||||
|
||||
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.extensions = [layers_ext, 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
|
||||
],
|
||||
[ #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.N11SF, KC.F12, KC.ESC, KC.TAB, _______, KC.DEL, XXXXXXX, XXXXXXX, KC.RO, KC.GRSF,
|
||||
_______, _______, _______, _______, KC.DEL, _______, _______, _______, _______, _______
|
||||
]
|
||||
]
|
||||
|
||||
if __name__ == '__main__':
|
||||
keyboard.go()
|
17
boards/tg4x/README.md
Normal file
17
boards/tg4x/README.md
Normal file
@ -0,0 +1,17 @@
|
||||
# TG4X
|
||||
|
||||
![TG4X](https://boardsource.imgix.net/d50e1163-06dd-4c18-826e-caacd0a4a33d.jpg?raw=true)
|
||||
|
||||
TG4X is a 45% staggered keyboard, compared to a standard 40% stagger it has one additional column which makes it an approachable and highly use-able 40%-ish stagger.
|
||||
|
||||
kb.py is designed to work with the nice!nano
|
||||
|
||||
Retailers (USA)
|
||||
[Boardsource](https://boardsource.xyz/store/5eff7ead037395179221b90c)
|
||||
|
||||
Extentions enabled by default
|
||||
- [Layers](https://github.com/KMKfw/kmk_firmware/tree/master/docs/layers.md) Need more keys than switches? Use layers.
|
||||
- [RGB](https://github.com/KMKfw/kmk_firmware/tree/master/docs/rgb.md) Light it up
|
||||
|
||||
Common Extentions
|
||||
- [Power](https://github.com/KMKfw/kmk_firmware/tree/master/docs/power.md) Powersaving features for battery life
|
31
boards/tg4x/kb.py
Normal file
31
boards/tg4x/kb.py
Normal file
@ -0,0 +1,31 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
row_pins = (
|
||||
board.P1_06,
|
||||
board.P1_04,
|
||||
board.P0_11,
|
||||
board.P1_00,
|
||||
board.P0_24,
|
||||
board.P0_22,
|
||||
board.P0_20,
|
||||
board.P0_17,
|
||||
)
|
||||
col_pins = [
|
||||
board.P0_06,
|
||||
board.P1_11,
|
||||
board.P1_13,
|
||||
board.P1_15,
|
||||
board.P0_02,
|
||||
board.P0_29,
|
||||
board.P0_31,
|
||||
]
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
rgb_pixel_pin = board.P0_08
|
||||
rgb_num_pixels = 6
|
||||
i2c = board.I2C
|
||||
powersave_pin = board.P0_13
|
36
boards/tg4x/main.py
Normal file
36
boards/tg4x/main.py
Normal file
@ -0,0 +1,36 @@
|
||||
from kb import KMKKeyboard
|
||||
from kmk.extensions.rgb import RGB
|
||||
from kmk.keys import KC
|
||||
from kmk.modules.layers import Layers
|
||||
|
||||
keyboard = KMKKeyboard()
|
||||
|
||||
# Cleaner key names
|
||||
_______ = KC.TRNS
|
||||
XXXXXXX = KC.NO
|
||||
|
||||
# Adding extentions
|
||||
rgb = RGB(pixel_pin=keyboard.rgb_pixel_pin, num_pixels=keyboard.rgb_num_pixels, val_limit=100, hue_default=190, sat_default=100, val_default=5)
|
||||
|
||||
layers_ext = Layers()
|
||||
|
||||
keyboard.modules = [layers_ext]
|
||||
keyboard.extensions = [rgb]
|
||||
|
||||
keyboard.keymap = [
|
||||
[ #QWERTY
|
||||
KC.ESC, KC.Q, KC.W, KC.E, KC.R, KC.T, KC.Y, KC.U, KC.I, KC.O, KC.P, KC.MINS, KC.DEL,\
|
||||
KC.TAB, KC.A, KC.S, KC.D, KC.F, KC.G, KC.H, KC.J, KC.K, KC.L, KC.QUOT, KC.ENT,\
|
||||
KC.LSFT, KC.Z, KC.X, KC.C, KC.V, KC.B, KC.N, KC.M, KC.COMM, KC.DOT, KC.SLSH, KC.RSFT,\
|
||||
KC.LCTL, KC.LGUI, KC.LALT, KC.SPACE, KC.SPACE, KC.RALT, KC.RGUI, KC.RCTL, KC.MO(1)\
|
||||
],
|
||||
[ #LOWER
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
],
|
||||
]
|
||||
|
||||
if __name__ == '__main__':
|
||||
keyboard.go()
|
2
boot.py
2
boot.py
@ -1,3 +1,3 @@
|
||||
import supervisor
|
||||
|
||||
supervisor.set_next_stack_limit(4096 + 1024)
|
||||
supervisor.set_next_stack_limit(4096 + 4096)
|
||||
|
71
docs/Getting_Started.md
Normal file
71
docs/Getting_Started.md
Normal file
@ -0,0 +1,71 @@
|
||||
# Getting Started
|
||||
|
||||
## Microcontrollers
|
||||
KMK will run on most microcontrollers supported by
|
||||
[Circuitpython](https://circuitpython.org/downloads). Our recommended
|
||||
microcontrollers are found [here](Officially_Supported_Microcontrollers.md)
|
||||
|
||||
## Firmware
|
||||
### KMKPython
|
||||
KMKPython is a fork of Circuitpython, but with libraries for most extensions
|
||||
built in. This saves you from having to get them all and keep them updated
|
||||
yourself. There may be other features added in the future that are exclusive to
|
||||
KMKPython. For the nice!nano, this is highly recommended, and used in place of
|
||||
Circuitpython.
|
||||
Notable differences include
|
||||
- Built in libraries for bluetooth, RGB, and more
|
||||
- Saves space as builds are optimized for keyboards
|
||||
- Microcontrollers like the nice!nano will be able to access all features out of
|
||||
the box.
|
||||
|
||||
### Circuitpython
|
||||
Circuitpython can be installed by following this guide using the guide
|
||||
[here](https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython).
|
||||
It's recommended to run the latest stable version that is at least 5.0 or higher.
|
||||
Beta versions may work, but expect limited support.
|
||||
#### Notable differences include
|
||||
- Supports more devices
|
||||
- Less built in libraries. If using RGB, bluetooth, and more, you will have to
|
||||
add these libraries yourself
|
||||
- Some devices such as the nice!nano don't have much free space, so not all
|
||||
features can be installed at the same time
|
||||
|
||||
## Getting KMK
|
||||
You can always find the latest releases on our CDN, in
|
||||
[compiled and optimized](https://cdn.kmkfw.io/kmk-latest.zip) and
|
||||
[raw, hackable text file](https://cdn.kmkfw.io/kmk-latest.unoptimized.zip)
|
||||
forms. These follow the `master` branch here on GitHub. Just get the KMK folder
|
||||
and drop this directly in the CIRCUITPYTHON directory (not in a sub folder).
|
||||
Make sure to extract the zip, and put the `kmk` folder on the root of the
|
||||
CIRCUITPY drive on the microcontroller
|
||||
|
||||
## Turning a controller into a keyboard
|
||||
### Supported keyboards
|
||||
If your keyboard and microcontroller are officially supported, simply visit the
|
||||
page for your files, and dropping them on the root of the "flash drive". Those
|
||||
pages can be found [here](https://github.com/KMKfw/boards). You will need the
|
||||
`kb.py` and `main.py`. More advanced instructions can be found
|
||||
[here](config_and_keymap.md). If using Curcuitpython and NOT KMKPython, you will
|
||||
also need [boot.py](https://github.com/KMKfw/kmk_firmware/blob/master/boot.py)
|
||||
|
||||
### Porting a keyboard
|
||||
If you are porting a board to KMK, check the page [here](porting_to_kmk.md).
|
||||
|
||||
### Handwired Keyboard
|
||||
If you are doing a hand wire, check [here](handwiring.md)
|
||||
|
||||
## Additional features
|
||||
Want to have fun features such as RGB, split keyboards and more? Check out what
|
||||
extensions can do [here](extensions.md)
|
||||
|
||||
## Debugging
|
||||
Debugging help can be found [here](debugging.md)
|
||||
|
||||
## Additional help and support
|
||||
If you need support with KMK or just want to say hi, find us in
|
||||
[#kmkfw:klar.sh on Matrix](https://matrix.to/#/#kmkfw:klar.sh). This channel is
|
||||
bridged to Discord [here](https://discordapp.com/widget?id=493256121075761173&theme=dark)
|
||||
for convenience. If you ask for help on chat or open a bug report, if possible
|
||||
please give us your commit SHA, found by running
|
||||
`from kmk.consts import KMK_RELEASE; print(KMK_RELEASE)` in the REPL on your
|
||||
controller.
|
47
docs/Offiially_Supported_Microcontrollers.md
Normal file
47
docs/Offiially_Supported_Microcontrollers.md
Normal file
@ -0,0 +1,47 @@
|
||||
# Officially supported microcontrollers
|
||||
While most Circuitpython devices are great for hand wired keyboards, most
|
||||
keyboards are designed to accept a Pro Micro. The boards listed below either
|
||||
are, or can be adapted to that pinout to use common keyboards already on the market.
|
||||
|
||||
## Nice!Nano
|
||||
Features include
|
||||
- Pro Micro pinout
|
||||
- Both USB HID and Bluetooth support
|
||||
- Can do bluetooth split keyboards with no wires at all
|
||||
- Has battery support including charging
|
||||
|
||||
Downsides
|
||||
- $25 USD per microcontroller at most retailers
|
||||
|
||||
Recommended Retailers
|
||||
[Boardsource](https://boardsource.xyz/store/5f4a1733bbaa5c635b83ed67)
|
||||
[NiceKeyboards](https://nicekeyboards.com/collections/group-buy/products/nice-nano-v1-0).
|
||||
|
||||
## ItsyBitsy M4 Express
|
||||
Features include
|
||||
- Affordable at $15 USD
|
||||
- Can run most features of KMK including RGB
|
||||
|
||||
Downsides
|
||||
- Needs adapted to work with Pro Micro pinout keyboards. Adapter can be found
|
||||
[HERE](https://github.com/KMKfw/kmk_firmware/tree/master/hardware)
|
||||
|
||||
Recommended Retailers
|
||||
[Adafruit](https://www.adafruit.com/product/3800)
|
||||
|
||||
## Adafruit ItsyBitsy nRF52840 Express
|
||||
Features include
|
||||
- Both USB HID and Bluetooth support
|
||||
- More affordable than the Nice!Nano at only $18
|
||||
|
||||
Downsides
|
||||
- Needs adapted to work with Pro Micro pinout keyboards. Adapter can be found
|
||||
[HERE](https://github.com/KMKfw/kmk_firmware/tree/master/hardware)
|
||||
- No battery support without addon board found
|
||||
[HERE](https://www.adafruit.com/product/2124)
|
||||
|
||||
## Other microcontrollers
|
||||
What you'll need to have at minimum
|
||||
- CircuitPython/KMKpython
|
||||
- 256KB of flash storage
|
||||
- HID over USB and/or Bluetooth.
|
31
docs/ble_hid.md
Normal file
31
docs/ble_hid.md
Normal file
@ -0,0 +1,31 @@
|
||||
# BLE HID
|
||||
Bluetooth connections help clean up the wire mess!
|
||||
|
||||
## Circuitpython
|
||||
If not running KMKpython, this does require the adafruit_ble library from Adafruit.
|
||||
This can be downloaded
|
||||
[here](https://github.com/adafruit/Adafruit_CircuitPython_BLE/tree/master/adafruit_ble).
|
||||
It is part of the [Adafruit CircuitPython Bundle](https://github.com/adafruit/Adafruit_CircuitPython_Bundle).
|
||||
Simply put this in the "root" of your circuitpython device. If unsure, it's the folder with main.py in it, and should be the first folder you see when you open the device.
|
||||
|
||||
## Enabling BLE
|
||||
|
||||
To enable BLE hid, change the keyboard.go(). By default, the advertised name
|
||||
will be the name of the "flash drive". By default this is CIRCUITPY
|
||||
|
||||
```python
|
||||
if __name__ == '__main__':
|
||||
keyboard.go(hid_type=HIDModes.BLE)
|
||||
```
|
||||
|
||||
## Changing the advertisee name
|
||||
There are two ways to change the advertising name. The first would be to
|
||||
[change the name of the drive](https://learn.adafruit.com/welcome-to-circuitpython/the-circuitpy-drive).
|
||||
The second would be to change the keyboard.go() like this.
|
||||
|
||||
```python
|
||||
if __name__ == '__main__':
|
||||
keyboard.go(hid_type=HIDModes.BLE, ble_name='KMKeyboard')
|
||||
```
|
||||
|
||||
|
@ -2,9 +2,10 @@
|
||||
|
||||
KMK is configured through a rather large plain-old-Python class called
|
||||
`KMKKeyboard`. Subclasses of this configuration exist which pre-fill defaults
|
||||
for various known keyboards (for example, many Keebio keyboards are supported
|
||||
through our ItsyBitsy to ProMicro pinout adapter). This class is the main
|
||||
interface between end users and the inner workings of KMK. Let's dive in!
|
||||
for various known keyboards (for example, many QMK, TMK, or ZMK keyboards
|
||||
are supported with a nice!nano, or through our ItsyBitsy to ProMicro pinout adapter.
|
||||
This class is the main interface between end users and the inner workings of KMK.
|
||||
Let's dive in!
|
||||
|
||||
- Edit or create a file called `main.py` on your `CIRCUITPY` drive. You can also
|
||||
keep this file on your computer (perhaps under `user_keymaps` - please feel
|
||||
@ -17,9 +18,6 @@ interface between end users and the inner workings of KMK. Let's dive in!
|
||||
corruption bugs, or you might just have bad luck and delete the wrong file
|
||||
some day.
|
||||
|
||||
- Import the `KMKKeyboard` object for your keyboard from `kmk.boards` (or, if
|
||||
handwiring your keyboard, import `KMKKeyboard` from `kmk.kmk_keyboard`).
|
||||
|
||||
- Assign a `KMKKeyboard` instance to a variable (ex. `keyboard = KMKKeyboard()` - note
|
||||
the parentheses)
|
||||
|
||||
@ -77,29 +75,10 @@ keyboard.keymap = [[KC.A, KC.B]]
|
||||
|
||||
You can further define a bunch of other stuff:
|
||||
|
||||
- `debug_enabled` which will spew a ton of debugging information to the serial
|
||||
- `keyboard.debug_enabled` which will spew a ton of debugging information to the serial
|
||||
console. This is very rarely needed, but can provide very valuable information
|
||||
if you need to open an issue.
|
||||
|
||||
- `unicode_mode` from `kmk.consts.UnicodeMode`, which defines the default
|
||||
operating system implementation to use for unicode sequences (see examples
|
||||
below, or `unicode.md`. This can be changed after boot with a key (see
|
||||
`keycodes.md`)
|
||||
- `keyboard.tap_time` which defines how long `KC.TT` and `KC.LT` will wait before
|
||||
considering a key "held" (see `layers.md`)
|
||||
|
||||
- `tap_time` which defines how long `KC.TT` and `KC.LT` will wait before
|
||||
considering a key "held" (see `keycodes.md`)
|
||||
|
||||
- `leader_dictionary`, which defines leader sequences (see `leader.md`), defined
|
||||
as tuples of keycode objects (or you can use
|
||||
`kmk.keycodes.generate_leader_dictionary_seq` with a string)
|
||||
|
||||
We also support unicode sequences (emojis, emoticons, umlauted letters,
|
||||
whatever) if your operating system and system setup do! See `unicode.md` for
|
||||
details.
|
||||
|
||||
[Here's a giant example of all the
|
||||
above](https://github.com/KMKfw/kmk_firmware/blob/master/user_keymaps/klardotsh/klarank_featherm4.py).
|
||||
This is my personal 4x12 matrix layout running on a Planck Rev6 PCB, with a
|
||||
Feather M4 Express wired up to the outer matrix pins (in somewhat of a "spider"
|
||||
setup), utilizing most of the above features - it's one of the "kitchen sink
|
||||
tester" definitions we use on the KMK Core team.
|
||||
|
@ -3,7 +3,7 @@ Debug will output most of the useful state to the console. This can be enable in
|
||||
by setting this in your keymap. NOTE that it will be slower, so only enable this when you
|
||||
need debugging.
|
||||
```python
|
||||
DEBUG_ENABLE = True
|
||||
keyboard.debug_enabled = True
|
||||
```
|
||||
|
||||
The output can be viewed by connecting to the serial port of the keybord. Please refer to [THIS](https://learn.adafruit.com/welcome-to-circuitpython/kattni-connecting-to-the-serial-console) for
|
||||
|
@ -1,16 +0,0 @@
|
||||
# Examples
|
||||
Here you can find some examples of what some users have created in their personal keyboard configs. These are here to
|
||||
help you understand how some of the tools may be used.
|
||||
|
||||
## Changing LED color based on layers
|
||||
This allows you to create a layer key that also changes colors when pushing a layer key, and restore turn off the lights
|
||||
when you release the layer key. The example uses the MO though any layer switch keys can be used if imported. Just use the
|
||||
LAYER_1 key in your keymap, and it's ready to go! You can change animations, colors, or anything in there.
|
||||
|
||||
```python
|
||||
LAYER_1 = KC.MO(1)
|
||||
LAYER_1.after_press_handler(lambda *args, **kwargs: keyboard.pixels.set_hsv_fill(100, 100, 100))
|
||||
LAYER_1.after_release_handler(lambda *args, **kwargs: keyboard.pixels.set_hsv_fill(0, 0, 0))
|
||||
|
||||
keyboard.keymap = [ ....... LAYER_1 ....... ]
|
||||
```
|
14
docs/extensions.md
Normal file
14
docs/extensions.md
Normal file
@ -0,0 +1,14 @@
|
||||
# Extensions
|
||||
Extensions add features that change the experience, but not the core features of
|
||||
the keyboard. They are meant to be easy to add, and create your own. These live in
|
||||
a sandbox to help prevent any bad code from crashing your keyboard.
|
||||
|
||||
## Core Extensions
|
||||
These extensions are proveded in all builds and can be enabled. Currently offered
|
||||
extensions are
|
||||
|
||||
- [International](international.md): Adds international keycodes
|
||||
- [LED](led.md): Adds backlight support. This is for monocolor backlight, not RGB
|
||||
- [MediaKeys](media_keys.md): Adds support for media keys such as volume
|
||||
- [RGB](rgb.md): RGB lighting for underglow. Will work on most matrix RGB as will
|
||||
be treated the same as underglow.
|
@ -18,7 +18,7 @@ If you get permissions errors here, **don't run make as root or with sudo**. See
|
||||
`Troubleshooting` below.
|
||||
|
||||
```sh
|
||||
make MOUNTPOINT=/media/CIRCUITPY USER_KEYMAP=user_keymaps/nameofyourkeymap.py
|
||||
make MOUNTPOINT=/media/CIRCUITPY USER_KEYMAP=user_keymaps/nameofyourkeymap.py BOARD=board/nameofyourboard/kb.py
|
||||
```
|
||||
|
||||
# Troubleshooting
|
||||
|
6
docs/handwiring.md
Normal file
6
docs/handwiring.md
Normal file
@ -0,0 +1,6 @@
|
||||
# Handwire keyboards
|
||||
This guide will not talk about the physical wiring. Check out our
|
||||
[recommended microcontrollers](Offiially_Supported_Microcontrollers.md) and
|
||||
follow the amazing guide for that[here](https://docs.qmk.fm/#/hand_wire). That
|
||||
guide can be followed until you are setting up the firmware. After wiring the
|
||||
keyboard, you can refer to our porting guide [here](porting_to_kmk.md)
|
@ -1,35 +0,0 @@
|
||||
## Supported Devices
|
||||
|
||||
| Board | Chipset | Python Platform | Notes |
|
||||
| ----- | ------- | --------------- | ----- |
|
||||
| [Adafruit Feather M4 Express](https://www.adafruit.com/product/3857) | Atmel SAMD51 (Cortex M4F) | CircuitPython | An economical solution for basic USB keyboards |
|
||||
| [Adafruit ItsyBitsy M4 Express](https://www.adafruit.com/product/3800) | Atmel SAMD51 (Cortex M4F) | CircuitPython | A smaller solution for basic USB keyboards |
|
||||
| [Adafruit Feather NRF52840 Express](https://www.adafruit.com/product/4062) | Cortex M4F/nrf52840 | CircuitPython | Supports USB HID and soon BLE (Bluetooth) |
|
||||
| [Seeed nRF52840 Micro Dev Kit](https://www.seeedstudio.com/nRF52840-Micro-Development-Kit-p-3079.html) | M4F/nrf52840 | CircuitPython | Supports USB HID and soon BLE (Bluetooth) |
|
||||
|
||||
|
||||
## Support Planned/WIP
|
||||
| Board | Chipset | Python Platform | Notes |
|
||||
| ----- | ------- | --------------- | ----- |
|
||||
| [Planck rev6 Keyboard](https://olkb.com/planck) | STM32F303 | CircuitPython | Requires porting CircuitPython to STM32F3. |
|
||||
| [Proton C Controller?](https://olkb.com/parts/qmk-proton-c) | STM32F303CCT6 | CircuitPython | Requires porting CircuitPython to STM32F3. |
|
||||
|
||||
|
||||
|
||||
## Porting new devices
|
||||
Pull requests are welcome and encouraged to add support for new
|
||||
keyboards/microcontrollers. The base requirements for device support
|
||||
- CircuitPython
|
||||
- 256KB of flash storage
|
||||
- HID over USB and/or Bluetooth.
|
||||
|
||||
## Secondary Support
|
||||
|
||||
In the future, secondary support for lesser controllers is planned. One of
|
||||
these cases is the pro micro being used for a slave half of a split keyboard
|
||||
while all actual work is being done by a supported board. This could also be
|
||||
used to convert boards that use USB or i2c that run lesser chips to a KMK
|
||||
board, with a supported board acting as a translation layer. Support for
|
||||
a converter is planned with the inspiration coming from the [Hasu USB to
|
||||
USB Controller Converter](https://www.1upkeyboards.com/shop/controllers/usb-to-usb-converter/)
|
||||
and would allow for conversion to KMK as opposed to TMK or QMK with that board.
|
35
docs/international.md
Normal file
35
docs/international.md
Normal file
@ -0,0 +1,35 @@
|
||||
# International Keycodes
|
||||
International extention adds keys for non US layouts. It can simply be added to
|
||||
the extentions list.
|
||||
|
||||
```python
|
||||
from kmk.extensions.international import International
|
||||
keyboard.extensions.append(International())
|
||||
```
|
||||
|
||||
## Keycodes
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|-----------------------|--------------------|-----------------------------------------------|
|
||||
|`KC.NONUS_HASH` |`KC.NUHS` |Non-US `#` and `~` |
|
||||
|`KC.NONUS_BSLASH` |`KC.NUBS` |Non-US `\` and <code>|</code> |
|
||||
|`KC.INT1` |`KC.RO` |JIS `\` and <code>|</code> |
|
||||
|`KC.INT2` |`KC.KANA` |JIS Katakana/Hiragana |
|
||||
|`KC.INT3` |`KC.JYEN` |JIS `¥` |
|
||||
|`KC.INT4` |`KC.HENK` |JIS Henkan |
|
||||
|`KC.INT5` |`KC.MHEN` |JIS Muhenkan |
|
||||
|`KC.INT6` | |JIS Numpad `,` |
|
||||
|`KC.INT7` | |International 7 |
|
||||
|`KC.INT8` | |International 8 |
|
||||
|`KC.INT9` | |International 9 |
|
||||
|`KC.LANG1` |`KC.HAEN` |Hangul/English |
|
||||
|`KC.LANG2` |`KC.HANJ` |Hanja |
|
||||
|`KC.LANG3` | |JIS Katakana |
|
||||
|`KC.LANG4` | |JIS Hiragana |
|
||||
|`KC.LANG5` | |JIS Zenkaku/Hankaku |
|
||||
|`KC.LANG6` | |Language 6 |
|
||||
|`KC.LANG7` | |Language 7 |
|
||||
|`KC.LANG8` | |Language 8 |
|
||||
|`KC.LANG9` | |Language 9 |
|
||||
|
||||
|
@ -52,7 +52,6 @@
|
||||
|`KC.LBRACKET` |`KC.LBRC` |`[` and `{` |
|
||||
|`KC.RBRACKET` |`KC.RBRC` |`]` and `}` |
|
||||
|`KC.BSLASH` |`KC.BSLS` |`\` and <code>|</code> |
|
||||
|`KC.NONUS_HASH` |`KC.NUHS` |Non-US `#` and `~` |
|
||||
|`KC.SCOLON` |`KC.SCLN` |`;` and `:` |
|
||||
|`KC.QUOTE` |`KC.QUOT` |`'` and `"` |
|
||||
|`KC.GRAVE` |`KC.GRV`, `KC.ZKHK` |<code>`</code> and `~`, JIS Zenkaku/Hankaku|
|
||||
@ -102,7 +101,6 @@
|
||||
|`KC.KP_9` |`KC.P9` |Keypad `9` and Page Up |
|
||||
|`KC.KP_0` |`KC.P0` |Keypad `0` and Insert |
|
||||
|`KC.KP_DOT` |`KC.PDOT` |Keypad `.` and Delete |
|
||||
|`KC.NONUS_BSLASH` |`KC.NUBS` |Non-US `\` and <code>|</code> |
|
||||
|`KC.KP_EQUAL` |`KC.PEQL` |Keypad `=` |
|
||||
|`KC.F13` | |F13 |
|
||||
|`KC.F14` | |F14 |
|
||||
@ -121,24 +119,6 @@
|
||||
|`KC.LOCKING_SCROLL` |`KC.LSCR` |Locking Scroll Lock |
|
||||
|`KC.KP_COMMA` |`KC.PCMM` |Keypad `,` |
|
||||
|`KC.KP_EQUAL_AS400` | |Keypad `=` on AS/400 keyboards |
|
||||
|`KC.INT1` |`KC.RO` |JIS `\` and <code>|</code> |
|
||||
|`KC.INT2` |`KC.KANA` |JIS Katakana/Hiragana |
|
||||
|`KC.INT3` |`KC.JYEN` |JIS `¥` |
|
||||
|`KC.INT4` |`KC.HENK` |JIS Henkan |
|
||||
|`KC.INT5` |`KC.MHEN` |JIS Muhenkan |
|
||||
|`KC.INT6` | |JIS Numpad `,` |
|
||||
|`KC.INT7` | |International 7 |
|
||||
|`KC.INT8` | |International 8 |
|
||||
|`KC.INT9` | |International 9 |
|
||||
|`KC.LANG1` |`KC.HAEN` |Hangul/English |
|
||||
|`KC.LANG2` |`KC.HANJ` |Hanja |
|
||||
|`KC.LANG3` | |JIS Katakana |
|
||||
|`KC.LANG4` | |JIS Hiragana |
|
||||
|`KC.LANG5` | |JIS Zenkaku/Hankaku |
|
||||
|`KC.LANG6` | |Language 6 |
|
||||
|`KC.LANG7` | |Language 7 |
|
||||
|`KC.LANG8` | |Language 8 |
|
||||
|`KC.LANG9` | |Language 9 |
|
||||
|`KC.LCTRL` |`KC.LCTL` |Left Control |
|
||||
|`KC.LSHIFT` |`KC.LSFT` |Left Shift |
|
||||
|`KC.LALT` | |Left Alt |
|
||||
@ -190,11 +170,10 @@
|
||||
|
||||
|Key |Description |
|
||||
|-----------------------|---------------------------------------------------------------------|
|
||||
|`KC.RESET` |Put the keyboard into DFU mode for flashing |
|
||||
|`KC.RESET` |Restarts the keyboard |
|
||||
|`KC.DEBUG` |Toggle `debug_enabled`, which enables log spew to serial console |
|
||||
|`KC.GESC` |Escape when tapped, <code>`</code> when pressed with Shift or GUI|
|
||||
|`KC.BKDL` |Backspace when tapped, Delete when pressed with GUI |
|
||||
|`KC.LEAD` |The [Leader key] |
|
||||
|`KC.UC_MODE_NOOP` |Sets UnicodeMode to NOOP |
|
||||
|`KC.UC_MODE_LINUX` |Sets UnicodeMode to Linux |
|
||||
|`KC.UC_MODE_MACOS` |Sets UnicodeMode to MocOS |
|
||||
@ -202,19 +181,6 @@
|
||||
|`KC.MACRO_SLEEP_MS(ms)`|Sleeps in a macro. Check MACROS for more information. |
|
||||
|
||||
|
||||
## [Layer Switching]
|
||||
|
||||
|Key |Description |
|
||||
|-----------------|------------------------------------------------------------------------|
|
||||
|`KC.DF(layer)` |Switches the default layer |
|
||||
|`KC.MO(layer)` |Momentarily activates layer, switches off when you let go |
|
||||
|`KC.LM(layer, mod)` |As `MO(layer)` but with `mod` active |
|
||||
|`KC.LT(layer, kc)` |Momentarily activates layer if held, sends kc if tapped |
|
||||
|`KC.TG(layer)` |Toggles the layer (enables it if no active, and vise versa) |
|
||||
|`KC.TO(layer)` |Activates layer and deactivates all other layers |
|
||||
|`KC.TT(layer)` |Momentarily activates layer if held, toggles it if tapped repeatedly |
|
||||
|
||||
|
||||
## [Modifiers]
|
||||
|
||||
|Key |Description |
|
||||
@ -230,41 +196,6 @@
|
||||
|`KC.RALT(kc)`|Hold Right Alt and press `kc` |
|
||||
|`KC.RGUI(kc)`|Hold Right GUI and press `kc` |
|
||||
|
||||
## [RGB/Underglow]
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|-----------------------------|-------------------|----------------------------|
|
||||
|`KC.RGB_TOG` | |Toggles RGB |
|
||||
|`KC.RGB_HUI` | |Increase Hue |
|
||||
|`KC.RGB_HUD` | |Decrease Hue |
|
||||
|`KC.RGB_SAI` | |Increase Saturation |
|
||||
|`KC.RGB_SAD` | |Decrease Saturation |
|
||||
|`KC.RGB_VAI` | |Increase Value |
|
||||
|`KC.RGB_VAD` | |Decrease Value |
|
||||
|`KC.RGB_MODE_PLAIN` |`RGB_M_P` |Static RGB |
|
||||
|`KC.RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation |
|
||||
|`KC.RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation |
|
||||
|`KC.RGB_MODE_BREATHE_RAINBOW`|`RGB_M_BR` |Breathing rainbow animation |
|
||||
|`KC.RGB_MODE_KNIGHT` |`RGB_M_K` |Knightrider animation |
|
||||
|
||||
|
||||
## [Mod-Tap Keys]
|
||||
|
||||
|New Keycode | Description |
|
||||
|-------------------------------------------------------|-----------------------------------------------------------------|
|
||||
|LCTL = KC.MT(KC.SOMETHING, KC.LCTRL) |`LCTRL` if held `kc` if tapped |
|
||||
|LSFT = KC.MT(KC.SOMETHING, KC.LSFT) |`LSHIFT` if held `kc` if tapped |
|
||||
|LALT = KC.MT(KC.SOMETHING, KC.LALT) |`LALT` if held `kc` if tapped |
|
||||
|LGUI = KC.MT(KC.SOMETHING, KC.LGUI) |`LGUI` if held `kc` if tapped |
|
||||
|RCTL = KC.MT(KC.SOMETHING, KC.RCTRL) |`RCTRL` if held `kc` if tapped |
|
||||
|RSFT = KC.MT(KC.SOMETHING, KC.RSFT) |`RSHIFT` if held `kc` if tapped |
|
||||
|RALT = KC.MT(KC.SOMETHING, KC.RALT) |`RALT` if held `kc` if tapped |
|
||||
|RGUI = KC.MT(KC.SOMETHING, KC.RGUI) |`RGUI` if held `kc` if tapped |
|
||||
|SGUI = KC.MT(KC.SOMETHING, KC.LSHFT(KC.LGUI)) |`LSHIFT` and `LGUI` if held `kc` if tapped |
|
||||
|LCA = KC.MT(KC.SOMETHING, KC.LCTRL(KC.LALT)) |`LCTRL` and `LALT` if held `kc` if tapped |
|
||||
|LCAG = KC.MT(KC.SOMETHING, KC.LCTRL(KC.LALT(KC.LGUI))) |`LCTRL` and `LALT` and `LGUI` if held `kc` if tapped |
|
||||
|MEH = KC.MT(KC.SOMETHING, KC.LCTRL(KC.LSFT(KC.LALT))) |`CTRL` and `LSHIFT` and `LALT` if held `kc` if tapped |
|
||||
|HYPR = KC.MT(KC.SOMETHING, KC.HYPR) |`LCTRL` and `LSHIFT` and `LALT` and `LGUI` if held `kc` if tapped|
|
||||
|
||||
## [Bluetooth Keys]
|
||||
|
||||
|
21
docs/layers.md
Normal file
21
docs/layers.md
Normal file
@ -0,0 +1,21 @@
|
||||
# Layers
|
||||
Layers module adds keys for accessing other layers. It can simply be added to
|
||||
the extentions list.
|
||||
|
||||
```python
|
||||
from kmk.modules.layers import Layers
|
||||
keyboard.modules.append(Layers())
|
||||
```
|
||||
|
||||
## Keycodes
|
||||
|
||||
|Key |Description |
|
||||
|-----------------|------------------------------------------------------------------------|
|
||||
|`KC.DF(layer)` |Switches the default layer |
|
||||
|`KC.MO(layer)` |Momentarily activates layer, switches off when you let go |
|
||||
|`KC.LM(layer, mod)` |As `MO(layer)` but with `mod` active |
|
||||
|`KC.LT(layer, kc)` |Momentarily activates layer if held, sends kc if tapped |
|
||||
|`KC.TG(layer)` |Toggles the layer (enables it if no active, and vise versa) |
|
||||
|`KC.TO(layer)` |Activates layer and deactivates all other layers |
|
||||
|`KC.TT(layer)` |Momentarily activates layer if held, toggles it if tapped repeatedly |
|
||||
|
@ -1,68 +0,0 @@
|
||||
# Leader Key
|
||||
The leader key acts as a prefix to a key sequence. These can be used to trigger macros quickly
|
||||
without dedicated keys set to each function. For those of you who dislike key combos, such as
|
||||
Ctrl+Shift+Esc, then this feature is for you. This is very much inspired from vim.
|
||||
|
||||
Leader key sequences can be as long or short as you like. The action must be a macro, so it
|
||||
can be things like unicode macros, or generic macros. The example below shows how you would
|
||||
trigger task manager in Windows with a leader sequence.
|
||||
|
||||
1. Assign a key to KC.LEAD
|
||||
2. Above your keymap, include a LEADER_DICTIONARY.
|
||||
|
||||
```python
|
||||
from kmk.macros.simple import simple_key_sequence
|
||||
|
||||
# ...
|
||||
|
||||
keyboard.leader_dictionary = {
|
||||
(KC.T, KC.A, KC.S, KC.K): simple_key_sequence([Modifiers.KC_LCTRL(Modifiers.KC_LSHIFT(Common.KC_ESC))])
|
||||
}
|
||||
|
||||
keymap = [...KC.LEAD,...]
|
||||
|
||||
# ...
|
||||
```
|
||||
|
||||
If defining tuples of keycodes is too obtuse for you, we have a convenience
|
||||
function available for that, too!
|
||||
|
||||
```python
|
||||
from kmk.keycodes import generate_leader_dictionary_seq as glds
|
||||
|
||||
# ...
|
||||
|
||||
keyboard.leader_dictionary = {
|
||||
glds('task'): simple_key_sequence([Modifiers.KC_LCTRL(Modifiers.KC_LSHIFT(Common.KC_ESC))])
|
||||
}
|
||||
|
||||
# ...
|
||||
```
|
||||
|
||||
# Modes
|
||||
1. LeaderMode.TIMEOUT (the default)
|
||||
2. LeaderMode.ENTER
|
||||
|
||||
### Timeout Mode
|
||||
Will expire after a timer and trigger the sequence that matches if any.
|
||||
This can be enabled with
|
||||
```python
|
||||
from kmk.consts import LeaderMode
|
||||
keyboard.leader_mode = LeaderMode.TIMEOUT
|
||||
```
|
||||
|
||||
The timeout can be set like this
|
||||
```python
|
||||
keyboard.leader_timeout = 2000 # in milliseconds-ish
|
||||
```
|
||||
|
||||
The timeout defaults to `1000`, which is roughly a second.
|
||||
|
||||
### Enter Mode
|
||||
Has no timeout. To end sequence press the enter key, or cancel and do nothing, press escape.
|
||||
This can be enabled with
|
||||
|
||||
```python
|
||||
from kmk.consts import LeaderMode
|
||||
keyboard.leader_mode = LeaderMode.ENTER
|
||||
```
|
87
docs/led.md
87
docs/led.md
@ -1,6 +1,18 @@
|
||||
# LED (Mono color backlight)
|
||||
Want your keyboard to shine? Add some lights!
|
||||
|
||||
## Enabling the extention
|
||||
The only required values that you need to give the LED extention would be the
|
||||
pixel pin, and the number of pixels/LED's. If using a split keyboard, this number
|
||||
is per side, and not the total of both sides.
|
||||
```python
|
||||
from kmk.extensions.RGB import RGB
|
||||
from kb import led_pin # This can be imported or defined manually
|
||||
|
||||
led_ext = LED(led_pin=led_pin)
|
||||
keyboard.extensions.append(led_ext)
|
||||
```
|
||||
|
||||
## [Keycodes]
|
||||
|
||||
|Key |Aliases |Description |
|
||||
@ -14,69 +26,16 @@ Want your keyboard to shine? Add some lights!
|
||||
|`KC.LED_MODE_BREATHE` |`LED_M_B` |Breathing animation |
|
||||
|
||||
## Configuration
|
||||
|Define |Default |Description |
|
||||
|-----------------------------------------|-------------|------------------------------------------------|
|
||||
|`keyboard.led_config['brightness_step']` |`5` |The number of steps to change the brightness by |
|
||||
|`keyboard.led_config['brightness_limit']`|`100` |The maximum brightness level in percent |
|
||||
|
||||
## Built-in Animation Configuration
|
||||
|Define |Default |Description |
|
||||
|-----------------------------------------|-------------|-------------------------------------------------------------------------------------|
|
||||
|`keyboard.led_config['breath_center']` |`1.5` |Used to calculate the curve for the breathing animation. Anywhere from 1.0 - 2.7 is valid|
|
||||
|
||||
## Functions
|
||||
|
||||
If you want to create your own animations, or for example, change the lighting in a macro, or a layer switch, here are some functions that are available.
|
||||
|
||||
|Function |Description |
|
||||
|--------------------------------------------|--------------------------------------------------------------------------------------------|
|
||||
|`keyboard.pixels.increase_brightness(step)` |Increases hue by a given step |
|
||||
|`keyboard.pixels.decrease_brightness(step)` |Decreases hue by a given step |
|
||||
|`keyboard.pixels.set_brightness(percent)` |Increases saturation by a given step |
|
||||
|
||||
## Direct variable access
|
||||
|Define |Default |Description |
|
||||
|-----------------------------------|-----------|--------------------------------------------------------------------------------------------------------|
|
||||
|`keyboard.led.brightness` |`0` |Sets the brightness by percent 0-100 |
|
||||
|`keyboard.led.brightness_limit` |`100` |Sets the limit of brightness |
|
||||
|`keyboard.led.brightness_step` |`5` |Sets the step value to change brightness by |
|
||||
|`keyboard.led.animation_mode` |`static` |This can be changed to any modes included, or to something custom for user animations. Any string is valid |
|
||||
|`keyboard.led.animation_speed` |`1` |Increases animation speed of most animations. Recommended 1-5, Maximum 10. |
|
||||
|
||||
## User animations
|
||||
User animations can be created as well. An example of a light show would look like this
|
||||
All of these values can be set by default for when the keyboard boots.
|
||||
```python
|
||||
from kmk.keys import make_key
|
||||
|
||||
def start_flicker(*args, **kwargs):
|
||||
# Setting mode to user will use the user animation
|
||||
keyboard.led.animation_mode = 'user'
|
||||
|
||||
|
||||
def flicker(self):
|
||||
# This is the code that is run every cycle that can serve as an animation
|
||||
# Refer to the kmk/rgb.py for actual examples of what has been done
|
||||
if self.brightness == 0:
|
||||
self.brightness = 100
|
||||
else:
|
||||
self.brightness = 0
|
||||
keyboard.led.set_brightness(self.brightness)
|
||||
return self
|
||||
|
||||
|
||||
# This is what "gives" your function to KMK so it knows what your animation code is
|
||||
keyboard.led_config['user_animation'] = flicker
|
||||
|
||||
# Makes a key that would start your animation
|
||||
LS = make_key(on_press=start_flicker())
|
||||
|
||||
keymap = [...LS,...]
|
||||
from kmk.extentions.led import AnimationModes
|
||||
led_ext = LED(
|
||||
led_pin=led_pin,
|
||||
brightness_step=5,
|
||||
brightness_limit=100,
|
||||
breathe_center=1.5,
|
||||
animation_mode=AnimationModes.STATIC,
|
||||
animation_speed=1,
|
||||
val=100,
|
||||
)
|
||||
```
|
||||
|
||||
# Troubleshooting
|
||||
Make sure that your board supports LED backlight by checking for a line with "LED_PIN". If it does not, you can add it to your keymap.
|
||||
|
||||
|Define |Description |
|
||||
|---------------------|---------------------------------------------|
|
||||
|`keyboard.led_pin` |The pin connected to the data pin of the LEDs|
|
||||
|
||||
|
23
docs/media_keys.md
Normal file
23
docs/media_keys.md
Normal file
@ -0,0 +1,23 @@
|
||||
# Media Keys
|
||||
Media keys extention adds keys for common media control keys. It can simply be
|
||||
added to the extentions list.
|
||||
|
||||
```python
|
||||
from kmk.extensions.media_keys import MediaKeys
|
||||
keyboard.extensions.append(MediaKeys())
|
||||
```
|
||||
|
||||
## Keycodes
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|-----------------------|--------------------|-----------------------------------------------|
|
||||
|`KC.AUDIO_MUTE` |`KC.MUTE` |Mute |
|
||||
|`KC.AUDIO_VOL_UP` |`KC.VOLU` |Volume Up |
|
||||
|`KC.AUDIO_VOL_DOWN` |`KC.VOLD` |Volume Down |
|
||||
|`KC.MEDIA_NEXT_TRACK` |`KC.MNXT` |Next Track (Windows) |
|
||||
|`KC.MEDIA_PREV_TRACK` |`KC.MPRV` |Previous Track (Windows) |
|
||||
|`KC.MEDIA_STOP` |`KC.MSTP` |Stop Track (Windows) |
|
||||
|`KC.MEDIA_PLAY_PAUSE` |`KC.MPLY` |Play/Pause Track |
|
||||
|`KC.MEDIA_EJECT` |`KC.EJCT` |Eject (macOS) |
|
||||
|`KC.MEDIA_FAST_FORWARD`|`KC.MFFD` |Next Track (macOS) |
|
||||
|`KC.MEDIA_REWIND` |`KC.MRWD` |Previous Track (macOS) |
|
@ -1,10 +1,13 @@
|
||||
# ModTap
|
||||
One key if you tap it, one or more modifier keys if you hold it!
|
||||
# ModTap Keycodes
|
||||
Enabling ModTap will give you access to the following keycodes and can simply be
|
||||
added to the modules list.
|
||||
|
||||
```python
|
||||
from kmk.modules.modtap import ModTap
|
||||
keyboard.modules.append(ModTap())
|
||||
```
|
||||
|
||||
## Helpful examples
|
||||
Just copy the example from New Keycode above your keymap and change KC.SOMETHING to the key that you want when tapped.
|
||||
After that, just use the new keycode anywhere in your keymap.
|
||||
## Keycodes
|
||||
|
||||
|New Keycode | Description |
|
||||
|-------------------------------------------------------|-----------------------------------------------------------------|
|
||||
@ -22,9 +25,4 @@ After that, just use the new keycode anywhere in your keymap.
|
||||
|MEH = KC.MT(KC.SOMETHING, KC.LCTRL(KC.LSFT(KC.LALT))) |`CTRL` and `LSHIFT` and `LALT` if held `kc` if tapped |
|
||||
|HYPR = KC.MT(KC.SOMETHING, KC.HYPR) |`LCTRL` and `LSHIFT` and `LALT` and `LGUI` if held `kc` if tapped|
|
||||
|
||||
```python
|
||||
SHFT_HOME = KC.MT(KC.HOME, KC.LSFT)
|
||||
|
||||
keyboard.keymap = [[ ...., SHFT_HOME, ....], ....]
|
||||
```
|
||||
|
||||
|
15
docs/modules.md
Normal file
15
docs/modules.md
Normal file
@ -0,0 +1,15 @@
|
||||
# Modules
|
||||
Modules, unlike extensions, change how your keyboard works. These are meant to have
|
||||
the ability to alter the core code in any way. Unlike extensions, these are not in a
|
||||
sandbox, and can make massive changes to normal operation.
|
||||
|
||||
## Core Modules
|
||||
These modules are proveded in all builds and can be enabled. Currently offered
|
||||
modules are
|
||||
|
||||
- [Layers](layers.md): Adds layer support (Fn key) to allow many more keys to be
|
||||
put on your keyboard
|
||||
- [ModTap](modtap.md): Adds support for augmented modifier keys to act as one key
|
||||
when tapped, and modifier when held.
|
||||
- [Power](power.md): Power saving features. This is mostly useful when on battery power.
|
||||
- [Split](split_keyboards.md): Keyboards split in two. Seems ergonomic!
|
71
docs/porting_to_kmk.md
Normal file
71
docs/porting_to_kmk.md
Normal file
@ -0,0 +1,71 @@
|
||||
# Porting to KMK
|
||||
Porting a board to KMK is quite simple, and follows this base format.
|
||||
|
||||
```python
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
{EXTENTIONS_IMPORT}
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
{REQUIRED}
|
||||
extensions = []
|
||||
|
||||
```
|
||||
|
||||
## REQUIRED
|
||||
This is designed to be replaced with the defining pins of your keyboard. Rows,
|
||||
colums and the diode direction (if any), should be defined like this
|
||||
```python
|
||||
row_pins = [board.p0_31, board.p0_29, board.p0_02, board.p1_15]
|
||||
col_pins = [board.p0_22, board.p0_24, board.p1_00, board.p0_11, board.p1_04]
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
```
|
||||
|
||||
## Additional pins for extentions
|
||||
KMK includes built in extentions for RGB and split keyboards, and powersave. If
|
||||
these are applicible on your keyboard/microcontroller, the pins should be added
|
||||
here. Refer to the instructions on the respective extentions page on how to add
|
||||
them. If not adding any extentions, leave this as an empty list as shown.
|
||||
|
||||
# Coord mapping
|
||||
If your keyboard is not built electrically as a square (though most are), you can
|
||||
provide a mapping directly. An example of this is the
|
||||
[Corne](https://github.com/foostan/crkbd). That has 12 colums for 3 rows, and 6
|
||||
colums for the bottom row. Split keyboards count as the total keyboard, not per
|
||||
side. That would look like this
|
||||
```python
|
||||
from kmk.matrix import intify_coordinate as ic
|
||||
|
||||
coord_mapping = []
|
||||
coord_mapping.extend(ic(0, x) for x in range(12))
|
||||
coord_mapping.extend(ic(1, x) for x in range(12))
|
||||
coord_mapping.extend(ic(2, x) for x in range(12))
|
||||
# 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))
|
||||
```
|
||||
|
||||
|
||||
## Keymaps
|
||||
Keymaps are organized as a list of lists. Keycodes are added for every key on
|
||||
each layer. See [keycodes](keycodes.md) for more details on what keycodes are
|
||||
avaliable. If using layers or other extentions, also refer to the extentions
|
||||
page for additional keycodes.
|
||||
```python
|
||||
from kb import KMKKeyboard
|
||||
from kmk.keys import KC
|
||||
|
||||
keyboard = KMKKeyboard()
|
||||
|
||||
keyboard.keymap = [
|
||||
[KC.A, KC.B],
|
||||
[KC.C, KC.D],
|
||||
]
|
||||
|
||||
if __name__ == '__main__':
|
||||
keyboard.go()
|
||||
```
|
||||
|
||||
## More information
|
||||
More information on keymaps can be found [here](config_and_keymap.md)
|
42
docs/power.md
Normal file
42
docs/power.md
Normal file
@ -0,0 +1,42 @@
|
||||
# Power(save)
|
||||
This module allows you to save power and is targeted to bluetooth/battery
|
||||
based keyboards.
|
||||
|
||||
## Keycodes
|
||||
|Key |Description |
|
||||
|-----------------------|-------------------------|
|
||||
|`KC.PS_TOG ` |Toggles powersave on/off |
|
||||
|`KC.PS_ON ` |Turns powersave on |
|
||||
|`KC.PS_OFF ` |Turns powersave off |
|
||||
|
||||
# Enabling the extention
|
||||
To turn on basic power saving, this is all that is required.
|
||||
```python
|
||||
from kmk.modules.power import Power
|
||||
|
||||
power = Power()
|
||||
|
||||
keyboard.modules.append(power)
|
||||
|
||||
```
|
||||
|
||||
## Optional extra power saving
|
||||
On supported boards, such as the nice!nano, power can be cut on VCC saving extra
|
||||
power if OLEDS or RGBs are installed. These drain power even when off, so this
|
||||
will prevent them from doing so.
|
||||
|
||||
```python
|
||||
from kmk.modules.power import Power
|
||||
|
||||
# Your kb.py may already have this set. If not, add it like this
|
||||
# import board
|
||||
# keyboard.powersave_pin = board.P0_13
|
||||
power = Power(powersave_pin=keyboard.powersave_pin)
|
||||
|
||||
keyboard.modules.append(power)
|
||||
|
||||
```
|
||||
|
||||
Make sure that the pin is correct for your microcontroller. The example is for
|
||||
the nice!nano. Not all microcontrollers have this feature and this can be omitted
|
||||
if not and there will simply be less power saving.
|
91
docs/rgb.md
91
docs/rgb.md
@ -1,15 +1,17 @@
|
||||
# RGB/Underglow/Neopixel
|
||||
Want your keyboard to shine? Add some lights!
|
||||
This does require the neopixel library from Adafruit. This can be downloaded [here](https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel/blob/6e35cd2b40575a20e2904b096508325cef4a71d3/neopixel.py).
|
||||
It is part of the [Adafruit CircuitPython Bundle](https://github.com/adafruit/Adafruit_CircuitPython_Bundle).
|
||||
|
||||
## Circuitpython
|
||||
If not running KMKpython, this does require the neopixel library from Adafruit.
|
||||
This can be downloaded
|
||||
[here](https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel/blob/6e35cd2b40575a20e2904b096508325cef4a71d3/neopixel.py).
|
||||
It is part of the [Adafruit CircuitPython Bundle](https://github.com/adafruit/Adafruit_CircuitPython_Bundle).
|
||||
Simply put this in the "root" of your circuitpython device. If unsure, it's the folder with main.py in it, and should be the first folder you see when you open the device.
|
||||
|
||||
Currently we support the following addressable LEDs:
|
||||
|
||||
* WS2811, WS2812, WS2812B, WS2812C, etc.
|
||||
* SK6812, SK6812MINI, SK6805
|
||||
* All neopixels
|
||||
|
||||
### Color Selection
|
||||
|
||||
@ -19,6 +21,16 @@ Changing the **Hue** cycles around the circle.
|
||||
Changing the **Saturation** moves between the inner and outer sections of the wheel, affecting the intensity of the color.
|
||||
Changing the **Value** sets the overall brightness.
|
||||
|
||||
## Enabling the extention
|
||||
The only required values that you need to give the RGB extention would be the pixel pin, and the number of pixels/LED's. If using a split keyboard, this number is per side, and not the total of both sides.
|
||||
```python
|
||||
from kmk.extensions.RGB import RGB
|
||||
from kb import rgb_pixel_pin # This can be imported or defined manually
|
||||
|
||||
rgb_ext = RGB(pixel_pin=rgb_pixel_pin, num_pixels=27)
|
||||
keyboard.extensions.append(rgb_ext)
|
||||
```
|
||||
|
||||
## [Keycodes]
|
||||
|
||||
|Key |Aliases |Description |
|
||||
@ -92,55 +104,46 @@ If you want to create your own animations, or for example, change the lighting i
|
||||
|`keyboard.pixels.animation_mode` |`static` |This can be changed to any modes included, or to something custom for user animations. Any string is valid |
|
||||
|`keyboard.pixels.animation_speed` |`1` |Increases animation speed of most animations. Recommended 1-5, Maximum 10. |
|
||||
|
||||
```python
|
||||
from kmk.extentions.rgb import AnimationModes
|
||||
rgb_ext = RGB(pixel_pin=rgb_pixel_pin,
|
||||
num_pixels=27
|
||||
num_pixels=0,
|
||||
val_limit=100,
|
||||
hue_default=0,
|
||||
sat_default=100,
|
||||
rgb_order=(1, 0, 2), # GRB WS2812
|
||||
val_default=100,
|
||||
hue_step=5,
|
||||
sat_step=5,
|
||||
val_step=5,
|
||||
animation_speed=1,
|
||||
breathe_center=1, # 1.0-2.7
|
||||
knight_effect_length=3,
|
||||
animation_mode=AnimationModes.STATIC,
|
||||
reverse_animation=False,
|
||||
)
|
||||
```
|
||||
|
||||
## Hardware Modification
|
||||
|
||||
To add RGB LED's to boards that don't support them directly, you will have to add a 3 wires. The power wire will run on 3.3v or 5v (depending on the LED),
|
||||
ground, and data pins will need added to an unused pin on your microcontroller unless your keyboard has specific solder points for them. With those 3 wires
|
||||
connected, set the pixel_pin as described above, and you are ready to use your RGB LED's/Neopixels.
|
||||
|
||||
## ADVANCED USAGE
|
||||
If you wish to interact with these as you would normal LED's and do not want help from KMK, you can disable all helper functions from working and access the
|
||||
neopixel object directly like this.
|
||||
```python
|
||||
keyboard.pixels.disable_auto_write = True
|
||||
keyboard.pixels.neopixel() # <-- This is the neopixel object
|
||||
```
|
||||
|
||||
## User animations
|
||||
User animations can be created as well. An example of a light show would look like this
|
||||
```python
|
||||
from kmk.keys import make_key
|
||||
|
||||
def start_light_show(*args, **kwargs):
|
||||
# Setting mode to user will use the user animation
|
||||
keyboard.pixels.animation_mode = 'user'
|
||||
|
||||
|
||||
def light_show(self):
|
||||
# This is the code that is run every cycle that can serve as an animation
|
||||
# Refer to the kmk/rgb.py for actual examples of what has been done
|
||||
self.hue = (self.hue + 35) % 360
|
||||
keyboard.pixels.set_hsv_fill(self.hue, self.sat, self.val)
|
||||
return self
|
||||
|
||||
|
||||
# This is what "gives" your function to KMK so it knows what your animation code is
|
||||
keyboard.rgb_config['user_animation'] = light_show
|
||||
|
||||
# Makes a key that would start your animation
|
||||
LS = make_key(on_press=start_light_show)
|
||||
|
||||
keymap = [...LS,...]
|
||||
```
|
||||
To add RGB LED's to boards that don't support them directly, you will have to
|
||||
add a 3 wires. The power wire will run on 3.3v or 5v (depending on the LED),
|
||||
ground, and data pins will need added to an unused pin on your microcontroller
|
||||
unless your keyboard has specific solder points for them. With those 3 wires
|
||||
connected, set the `pixel_pin` as described above, and you are ready to use your
|
||||
RGB LED's/Neopixels.
|
||||
|
||||
## Troubleshooting
|
||||
### Incorrect colors
|
||||
If your colors are incorrect, check the pixel order of your specific LED's. Here are some common ones.
|
||||
* WS2811, WS2812, WS2812B, WS2812C are all GRB (1, 0, 2)
|
||||
* SK6812, SK6812MINI, SK6805 are all GRB (1, 0, 2)
|
||||
* Neopixels will vary depending on which one you buy. It will be listed on the product page.# Troubleshooting
|
||||
* Neopixels will vary depending on which one you buy. It will be listed on the product page.
|
||||
|
||||
### Lights don't turn on
|
||||
Make sure that your board supports LED backlight by checking for a line with "PIXEL_PIN". If it does not, you can add it to your keymap.
|
||||
If you added the LED's yourself, you will also need to set num_pixels to the number of installed LED's in total.
|
||||
|
||||
Make sure that your board supports LED backlight by checking for a line with
|
||||
`PIXEL_PIN`. If it does not, you can add it to your keymap. If you added the
|
||||
LED's yourself, you will also need to set `num_pixels` to the number of
|
||||
installed LED's in total.
|
||||
|
@ -70,35 +70,6 @@ keymap = [...emoticons.BEER, emoticons.HAND_WAVE...]
|
||||
> `kmk.types.AttrDict`, which you can think of as a read-only view over a
|
||||
> dictionary adding attribute-based (dot-notation) access.
|
||||
|
||||
Remember from the Leader Mode documentation that leader sequences simply bind to
|
||||
keys, so extrapolating this example out a bit, you can bind emojis to leader
|
||||
sequences matching some name or mnemonic representing the sequence you're
|
||||
looking to send. If you ever wanted to type `<Leader>fire` and see a fire emoji
|
||||
on your screen, welcome home.
|
||||
|
||||
```python
|
||||
from kmk.handlers.sequences import compile_unicode_string_sequences as cuss
|
||||
|
||||
emoticons = cuss({
|
||||
# Emojis
|
||||
'BEER': r'🍺',
|
||||
'BEER_TOAST': r'🍻',
|
||||
'FACE_THINKING': r'🤔',
|
||||
'FIRE': r'🔥',
|
||||
'FLAG_CA': r'🇨🇦',
|
||||
'FLAG_US': r'🇺🇸',
|
||||
})
|
||||
|
||||
keyboard.leader_dictionary = {
|
||||
'beer': emoticons.BEER,
|
||||
'beers': emoticons.BEER_TOAST,
|
||||
'fire': emoticons.FIRE,
|
||||
'uhh': emoticons.FACE_THINKING,
|
||||
'fca': emoticons.FLAG_CA,
|
||||
'fus': emoticons.FLAG_US,
|
||||
}
|
||||
```
|
||||
|
||||
Finally, if you need to send arbitrary unicode codepoints in raw form, that's
|
||||
supported too, through `unicode_codepoint_sequence`.
|
||||
|
||||
|
@ -1,35 +1,63 @@
|
||||
# Split Keyboards
|
||||
Split keyboards are mostly the same as unsplit and very easy to adapt a keymap for. Currently
|
||||
UART is supported, though other modes will come later such as Bluetooth and i2c.
|
||||
Split keyboards are mostly the same as unsplit. Wired UART and Bluetooth are supported.
|
||||
|
||||
|
||||
## UART
|
||||
To enable uart it's as simple as adding this line, of course changing the pin
|
||||
## Wired UART
|
||||
Wired connections can use UART over 1 or 2 wires. With 2 wires, you will be able
|
||||
to syncronize the halves allowing additional features in some extentions.
|
||||
```python
|
||||
keyboard.split_type = "UART"
|
||||
keyboard.uart_pin = board.SCL
|
||||
from kb import data_pin
|
||||
:from kmk.modules.split import Split, SplitType
|
||||
|
||||
split = Split(split_side=SplitSide.LEFT)
|
||||
keyboard.modules.append(split)
|
||||
```
|
||||
|
||||
## Config
|
||||
## Bluetooth split (aka no TRRS)
|
||||
Wireless splits are fully featured with 2 way communication allowing all extentions to work 100%.
|
||||
```python
|
||||
from kb import data_pin
|
||||
from kmk.modules.split import Split, SplitType, Split_Side
|
||||
|
||||
|
||||
split = Split(split_type=Split.BLE, split_side=SplitSide.LEFT)
|
||||
OR
|
||||
split = Split(split_type=Split.BLE, split_side=SplitSide.LEFT)
|
||||
keyboard.modules.append(split)
|
||||
```
|
||||
|
||||
### Config
|
||||
Useful config options:
|
||||
```python
|
||||
keyboard.split_flip = True # If your boards are identical but one is flipped, this option is for you
|
||||
keyboard.split_offsets = [6, 6, 6, 6] # This is the how many keys are on each column on the "target" half
|
||||
split = Split(
|
||||
split_flip=True, # If both halves are the same, but flipped, set this True
|
||||
split_side=None, # Sets if this is to SplitSide.LEFT or SplitSide.RIGHT, or use EE hands
|
||||
split_type=SplitType.UART, # Defaults to UART
|
||||
split_target_left=True, # If you want the right to be the target, change this to false
|
||||
uart_interval=20, # Sets the uarts delay. Lower numbers draw more power
|
||||
data_pin=None, # The primary data pin to talk to the secondary device with
|
||||
data_pin2=None, # Second uart pin to allow 2 way communication
|
||||
target_left=True, # Assumes that left will be the one on USB. Set to folse if it will be the right
|
||||
uart_flip=True, # Reverses the RX and TX pins if both are provided
|
||||
)
|
||||
|
||||
```
|
||||
|
||||
### EE HANDS
|
||||
If you want to plug in on either side, it can be done fairly easily but requires setup.
|
||||
If you want to plug USB in on either side, or are using bluetooth, this is for
|
||||
you.
|
||||
|
||||
On each half of your keyboard make a file called kmk_side.py and add one of these lines to the file
|
||||
depending on where each piece is physically located.
|
||||
Rename your CIRCUITPY drive to something different. The left side must
|
||||
end in L, the right must is in R. The name must be 11 characters or less! This is
|
||||
a limitation of the filesystem. You will receive an error if you choose a name
|
||||
longer than 11 characters. Instructions on how to do that are
|
||||
[here](https://learn.adafruit.com/welcome-to-circuitpython/the-circuitpy-drive).
|
||||
For example on NYQUISTL for left and NYQUISTR for the right.
|
||||
|
||||
For wired connections you don't need to pass anything. For bluetooth, remove the `split_side` like this
|
||||
```python
|
||||
split_target = "Left"
|
||||
OR
|
||||
split_target = "Right"
|
||||
# Wired
|
||||
split = Split()
|
||||
# Wireless
|
||||
split = Split(split_type=Split.BLE)
|
||||
```
|
||||
|
||||
and then in your keymap, add the line
|
||||
```python
|
||||
from kmk_side import split_target
|
||||
```
|
||||
|
||||
|
@ -1,13 +1,15 @@
|
||||
# Support
|
||||
|
||||
If you are having any issues in installing, configuring, or otherwise issues
|
||||
with KMK, please reach out to us and our community here.
|
||||
|
||||
If you need support with KMK or just want to say hi, find us in [#kmkfw:klar.sh
|
||||
on Matrix](https://matrix.to/#/#kmkfw:klar.sh). This channel is bridged to
|
||||
Discord [here](https://discordapp.com/widget?id=493256121075761173&theme=dark)
|
||||
for convenience.
|
||||
|
||||
If you ask for help on chat or open a bug report, if possible please give us
|
||||
your commit SHA, found by running `from kmk.consts import KMK_RELEASE;
|
||||
print(KMK_RELEASE)` in the REPL on your controller.
|
||||
your commit SHA, found by running
|
||||
|
||||
```python
|
||||
from kmk.consts import KMK_RELEASE; print(KMK_RELEASE)
|
||||
```
|
||||
|
||||
in the REPL on your controller.
|
||||
|
@ -32,15 +32,9 @@ are planned to be worked around "eventually", but for now are noteworthy:
|
||||
we strongly recommend avoiding `KC.MO` (or any other layer switch keys that
|
||||
use momentary switch behavior - `KC.LM`, `KC.LT`, and `KC.TT`)
|
||||
|
||||
- Super fancy stuff like sending a keypress only when the leader key is released
|
||||
(perhaps based on how long the leader key was held) is **unsupported** - an
|
||||
example use case might be "tap for Home, hold for Shift"
|
||||
|
||||
Here's an example of all this in action:
|
||||
|
||||
```python
|
||||
# user_keymaps/some_silly_example.py
|
||||
from kmk.boards.klarank import KMKKeyboard
|
||||
from kmk.keycodes import KC
|
||||
from kmk.macros.simple import send_string
|
||||
|
||||
|
102
kmk/ble.py
102
kmk/ble.py
@ -1,102 +0,0 @@
|
||||
from adafruit_ble import BLERadio
|
||||
from adafruit_ble.advertising.standard import ProvideServicesAdvertisement
|
||||
from adafruit_ble.services.standard.hid import HIDService
|
||||
|
||||
from kmk.hid import AbstractHID
|
||||
|
||||
BLE_APPEARANCE_HID_KEYBOARD = 961
|
||||
# Hardcoded in CPy
|
||||
MAX_CONNECTIONS = 2
|
||||
|
||||
|
||||
class BLEHID(AbstractHID):
|
||||
def post_init(self, ble_name='KMK Keyboard', **kwargs):
|
||||
self.conn_id = -1
|
||||
|
||||
self.ble = BLERadio()
|
||||
self.ble.name = ble_name
|
||||
self.hid = HIDService()
|
||||
self.hid.protocol_mode = 0 # Boot protocol
|
||||
|
||||
# Security-wise this is not right. While you're away someone turns
|
||||
# on your keyboard and they can pair with it nice and clean and then
|
||||
# listen to keystrokes.
|
||||
# On the other hand we don't have LESC so it's like shouting your
|
||||
# keystrokes in the air
|
||||
if not self.ble.connected or not self.hid.devices:
|
||||
self.start_advertising()
|
||||
|
||||
self.conn_id = 0
|
||||
|
||||
@property
|
||||
def devices(self):
|
||||
'''Search through the provided list of devices to find the ones with the
|
||||
send_report attribute.'''
|
||||
if not self.ble.connected:
|
||||
return []
|
||||
|
||||
result = []
|
||||
# Security issue:
|
||||
# This introduces a race condition. Let's say you have 2 active
|
||||
# connections: Alice and Bob - Alice is connection 1 and Bob 2.
|
||||
# Now Chuck who has already paired with the device in the past
|
||||
# (this assumption is needed only in the case of LESC)
|
||||
# wants to gather the keystrokes you send to Alice. You have
|
||||
# selected right now to talk to Alice (1) and you're typing a secret.
|
||||
# If Chuck kicks Alice off and is quick enough to connect to you,
|
||||
# which means quicker than the running interval of this function,
|
||||
# he'll be earlier in the `self.hid.devices` so will take over the
|
||||
# selected 1 position in the resulted array.
|
||||
# If no LESC is in place, Chuck can sniff the keystrokes anyway
|
||||
for device in self.hid.devices:
|
||||
if hasattr(device, 'send_report'):
|
||||
result.append(device)
|
||||
|
||||
return result
|
||||
|
||||
def _check_connection(self):
|
||||
devices = self.devices
|
||||
if not devices:
|
||||
return False
|
||||
|
||||
if self.conn_id >= len(devices):
|
||||
self.conn_id = len(devices) - 1
|
||||
|
||||
if self.conn_id < 0:
|
||||
return False
|
||||
|
||||
if not devices[self.conn_id]:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
def hid_send(self, evt):
|
||||
if not self._check_connection():
|
||||
return
|
||||
|
||||
device = self.devices[self.conn_id]
|
||||
|
||||
while len(evt) < len(device._characteristic.value) + 1:
|
||||
evt.append(0)
|
||||
|
||||
return device.send_report(evt[1:])
|
||||
|
||||
def clear_bonds(self):
|
||||
import _bleio
|
||||
|
||||
_bleio.adapter.erase_bonding()
|
||||
|
||||
def next_connection(self):
|
||||
self.conn_id = (self.conn_id + 1) % len(self.devices)
|
||||
|
||||
def previous_connection(self):
|
||||
self.conn_id = (self.conn_id - 1) % len(self.devices)
|
||||
|
||||
def start_advertising(self):
|
||||
advertisement = ProvideServicesAdvertisement(self.hid)
|
||||
advertisement.appearance = BLE_APPEARANCE_HID_KEYBOARD
|
||||
|
||||
self.ble.start_advertising(advertisement)
|
||||
|
||||
def stop_advertising(self):
|
||||
self.ble.stop_advertising()
|
@ -1,20 +0,0 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
col_pins = (
|
||||
board.RX,
|
||||
board.D13,
|
||||
board.A0,
|
||||
board.D11,
|
||||
board.A4,
|
||||
board.A5,
|
||||
board.D10,
|
||||
board.D9,
|
||||
board.SCK,
|
||||
)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
rgb_pixel_pin = board.TX
|
@ -1,15 +0,0 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
col_pins = (board.A1, board.A2, board.A3, board.A4, board.A5, board.SCK, board.MOSI)
|
||||
row_pins = (board.A0, board.D11, board.D10, board.D9)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
rgb_pixel_pin = board.TX
|
||||
uart_pin = board.SCL
|
||||
split_type = 'UART'
|
||||
split_flip = True
|
||||
split_offsets = [7, 7, 7, 7]
|
@ -1,15 +0,0 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
col_pins = (board.A2, board.A3, board.A4, board.A5, board.SCK, board.MOSI)
|
||||
row_pins = (board.D11, board.D10, board.D9, board.D7, board.D13)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
rgb_pixel_pin = board.TX
|
||||
uart_pin = board.SCL
|
||||
split_type = 'UART'
|
||||
split_flip = True
|
||||
split_offsets = [6, 6, 6, 6, 6]
|
@ -1,28 +0,0 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
col_pins = (
|
||||
board.SDA,
|
||||
board.A2,
|
||||
board.A3,
|
||||
board.A4,
|
||||
board.A5,
|
||||
board.SCK,
|
||||
board.MOSI,
|
||||
)
|
||||
row_pins = (
|
||||
board.TX,
|
||||
board.A0,
|
||||
board.RX,
|
||||
board.A1,
|
||||
board.D11,
|
||||
board.D9,
|
||||
board.D12,
|
||||
board.D10,
|
||||
)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
rgb_pixel_pin = board.D13
|
@ -1,15 +0,0 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
col_pins = (board.A2, board.A3, board.A4, board.A5, board.SCK, board.A0)
|
||||
row_pins = (board.D11, board.D10, board.D9, board.D7)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
rgb_pixel_pin = board.TX
|
||||
uart_pin = board.SCL
|
||||
split_type = 'UART'
|
||||
split_flip = True
|
||||
split_offsets = [6, 6, 6, 6]
|
@ -1,15 +0,0 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
col_pins = (board.A2, board.A3, board.A4, board.A5, board.SCK, board.MOSI)
|
||||
row_pins = (board.D13, board.D11, board.D10, board.D9, board.D7)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
rgb_pixel_pin = board.TX
|
||||
uart_pin = board.SCL
|
||||
split_type = 'UART'
|
||||
split_flip = True
|
||||
split_offsets = [6, 6, 6, 6, 6]
|
@ -1,25 +0,0 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
# Will need additional work and testing
|
||||
col_pins = (
|
||||
board.A1,
|
||||
board.A2,
|
||||
board.A3,
|
||||
board.A4,
|
||||
board.A5,
|
||||
board.SCK,
|
||||
board.MOSI,
|
||||
board.D12,
|
||||
)
|
||||
row_pins = (board.A0, board.D13, board.D11, board.D10, board.D9, board.D7)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
rgb_pixel_pin = board.TX
|
||||
uart_pin = board.SCL
|
||||
split_type = 'UART'
|
||||
split_flip = False
|
||||
split_offsets = [8, 8, 8, 8, 8, 8]
|
@ -1,15 +0,0 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
col_pins = (board.A2, board.A3, board.A4, board.A5, board.SCK, board.MOSI)
|
||||
row_pins = (board.D11, board.D10, board.D9, board.RX, board.D13)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
rgb_pixel_pin = board.TX
|
||||
uart_pin = board.SCL
|
||||
split_type = 'UART'
|
||||
split_flip = True
|
||||
split_offsets = [6, 6, 6, 6, 6]
|
@ -1,29 +0,0 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
col_pins = (
|
||||
board.A0,
|
||||
board.A1,
|
||||
board.A2,
|
||||
board.A3,
|
||||
board.A4,
|
||||
board.A5,
|
||||
board.SCK,
|
||||
board.MOSI,
|
||||
)
|
||||
row_pins = (
|
||||
board.TX,
|
||||
board.RX,
|
||||
board.SDA,
|
||||
board.SCL,
|
||||
board.D9,
|
||||
board.D10,
|
||||
board.D12,
|
||||
board.D11,
|
||||
board.D13,
|
||||
)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
@ -1,15 +0,0 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
col_pins = (board.A1, board.A2, board.A3, board.A4, board.A5, board.SCK, board.MOSI)
|
||||
row_pins = (board.D13, board.D11, board.D10, board.D9, board.D7)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
rgb_pixel_pin = board.TX
|
||||
uart_pin = board.SCL
|
||||
split_type = 'UART'
|
||||
split_flip = True
|
||||
split_offsets = [7, 7, 7, 7, 7]
|
@ -1,15 +0,0 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
col_pins = (board.A0, board.A1, board.A2, board.A3, board.A4, board.A5, board.SCK)
|
||||
row_pins = (board.D13, board.D11, board.D10, board.D9, board.D7)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
rgb_pixel_pin = board.TX
|
||||
uart_pin = board.SCL
|
||||
split_type = 'UART'
|
||||
split_flip = True
|
||||
split_offsets = [7, 7, 7, 7, 7]
|
@ -1,15 +0,0 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
col_pins = (board.A5, board.A4, board.A3, board.A2, board.A1, board.A0)
|
||||
row_pins = (board.D7, board.D9, board.D10, board.D11)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
rgb_pixel_pin = board.TX
|
||||
uart_pin = board.SCL
|
||||
split_type = 'UART'
|
||||
split_flip = True
|
||||
split_offsets = [6, 6, 6, 6]
|
@ -1,15 +0,0 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
col_pins = (board.MOSI, board.SCK, board.A5, board.A4, board.A3, board.A2)
|
||||
row_pins = (board.D11, board.D10, board.D9, board.D7)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
rgb_pixel_pin = board.TX
|
||||
uart_pin = board.SCL
|
||||
split_type = 'UART'
|
||||
split_flip = True
|
||||
split_offsets = [6, 6, 6, 6]
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user