Added board definition for nyquist and add RGB and LED pins for nyquest and iris
This commit is contained in:
parent
f7a1d54752
commit
54d63037bf
@ -8,26 +8,9 @@ when you release the layer key. The example uses the MO though any layer switch
|
||||
LAYER_1 key in your keymap, and it's ready to go! You can change animations, colors, or anything in there.
|
||||
|
||||
```python
|
||||
from kmk.handlers.layers import (mo_pressed, mo_released)
|
||||
from kmk.keys import KC, layer_key_validator, make_argumented_key
|
||||
|
||||
|
||||
def layer1p(*args, **kwargs):
|
||||
keyboard.pixels.set_hsv_fill(100, 100, 100)
|
||||
return mo_pressed(*args, **kwargs)
|
||||
|
||||
|
||||
def layer1r(*args, **kwargs):
|
||||
keyboard.pixels.set_hsv_fill.fill(0, 0, 0)
|
||||
return mo_released(*args, **kwargs)
|
||||
|
||||
make_argumented_key(
|
||||
validator=layer_key_validator,
|
||||
names=('LAYER_1',),
|
||||
on_press=layer1p,
|
||||
on_release=layer1r,
|
||||
)
|
||||
|
||||
LAYER_1 = KC.LAYER_1(1)
|
||||
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 ....... ]
|
||||
```
|
@ -4,12 +4,13 @@
|
||||
| ----- | ------- | --------------- | ----- |
|
||||
| [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 |
|
||||
| ----- | ------- | --------------- | ----- |
|
||||
| [Seeed nRF52840 Micro Dev Kit](https://www.seeedstudio.com/nRF52840-Micro-Development-Kit-p-3079.html) | nRF52840 | [CircuitPython](https://github.com/KMKfw/circuitpython/tree/topic-nrf52840-mdk) | This is basically as bleeding edge as it gets. Will support BLE HID to PC as well as BLE split boards |
|
||||
| [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. |
|
||||
|
||||
@ -20,7 +21,7 @@ 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 or Bluetooth.
|
||||
- HID over USB and/or Bluetooth.
|
||||
|
||||
## Secondary Support
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
> can be found in `keycodes.md`. It's probably worth a look at the raw source if
|
||||
> you're stumped: `kmk/keys.py`.
|
||||
|
||||
This is a bunch of documentation about how physical keypress translate to
|
||||
This is a bunch of documentation about how a physical keypress translates to
|
||||
events (and the lifecycle of said events) in KMK. It's somewhat technical, but
|
||||
if you're looking to extend your keyboard's functionality with extra code,
|
||||
you'll need at least some of this technical knowledge.
|
||||
|
16
docs/led.md
16
docs/led.md
@ -1,15 +1,6 @@
|
||||
# LED (Mono color backlight)
|
||||
Want your keyboard to shine? Add some lights!
|
||||
|
||||
## Usage
|
||||
At minimum you will need to make sure that this set in either your keymap is importing an MCU directly, or it should be included in the predefined boards if they support them.
|
||||
|
||||
|Define |Description |
|
||||
|---------------------|---------------------------------------------|
|
||||
|`keyboard.led_pin` |The pin connected to the data pin of the LEDs|
|
||||
|
||||
Then you should be able to use the keycodes below to change the LED lighting to your liking.
|
||||
|
||||
## [Keycodes]
|
||||
|
||||
|Key |Aliases |Description |
|
||||
@ -52,3 +43,10 @@ If you want to create your own animations, or for example, change the lighting i
|
||||
|`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. |
|
||||
|
||||
# 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|
|
||||
|
||||
|
21
docs/rgb.md
21
docs/rgb.md
@ -11,16 +11,6 @@ Currently we support the following addressable LEDs:
|
||||
* SK6812, SK6812MINI, SK6805
|
||||
* All neopixels
|
||||
|
||||
## Usage
|
||||
At minimum you will need to make sure that these are set in either your keymap is importing an MCU directly, or it should be included in the predefined boards if they support them.
|
||||
|
||||
|Define |Description |
|
||||
|---------------------|---------------------------------------------|
|
||||
|`keyboard.pixel_pin` |The pin connected to the data pin of the LEDs|
|
||||
|`keyboard.num_pixels`|The number of LEDs connected |
|
||||
|
||||
Then you should be able to use the keycodes below to change the RGB lighting to your liking.
|
||||
|
||||
### Color Selection
|
||||
|
||||
KMK uses [Hue, Saturation, and Value](https://en.wikipedia.org/wiki/HSL_and_HSV) to select colors rather than RGB. The color wheel below demonstrates how this works.
|
||||
@ -116,4 +106,13 @@ keyboard.pixels.neopixel() # <-- This is the neopixel object
|
||||
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.
|
||||
* Neopixels will vary depending on which one you buy. It will be listed on the product page.# Troubleshooting
|
||||
|
||||
### 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.
|
||||
|
||||
|Define |Description |
|
||||
|---------------------|---------------------------------------------|
|
||||
|`keyboard.pixel_pin` |The pin connected to the data pin of the LEDs|
|
||||
|`keyboard.num_pixels`|The number of LEDs connected |
|
||||
|
@ -1,7 +1,6 @@
|
||||
# Support
|
||||
If you are having any issues in installing, configuring, or otherwise issues with KMK, please reach out to us and
|
||||
our community here. We do have a bridge to allow communication between the platforms as well, though we recommend
|
||||
using Matrix if possible.
|
||||
our community here.
|
||||
|
||||
# Matrix
|
||||
* [Software Support](https://matrix.to/#/#kmk-support:kmkfw.io)
|
||||
|
@ -16,8 +16,11 @@ class Firmware(_Firmware):
|
||||
|
||||
split_flip = True
|
||||
split_offsets = (6, 6, 6, 6, 6)
|
||||
split_type = "UART"
|
||||
split_type = 'UART'
|
||||
uart_pin = board.SCL
|
||||
extra_data_pin = board.SDA
|
||||
rgb_pixel_pin = board.TX
|
||||
led_pin = board.D7
|
||||
|
||||
coord_mapping = []
|
||||
coord_mapping.extend(ic(0, x) for x in range(12))
|
19
kmk/boards/levinson_converter.py
Normal file
19
kmk/boards/levinson_converter.py
Normal file
@ -0,0 +1,19 @@
|
||||
import board
|
||||
|
||||
from kmk.consts import DiodeOrientation
|
||||
from kmk.mcus.circuitpython_samd51 import Firmware as _Firmware
|
||||
from kmk.pins import Pin as P
|
||||
|
||||
|
||||
class Firmware(_Firmware):
|
||||
col_pins = (P.A2, P.A3, P.A4, P.A5, P.SCK, P.MOSI)
|
||||
row_pins = (P.D13, P.D11, P.D10, P.D9)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
|
||||
split_type = 'UART'
|
||||
split_flip = True
|
||||
split_offsets = [6, 6, 6, 6, 6]
|
||||
uart_pin = board.SCL
|
||||
extra_data_pin = board.SDA
|
||||
rgb_pixel_pin = board.TX
|
||||
#led_pin = board.D7
|
19
kmk/boards/nyquist_converter.py
Normal file
19
kmk/boards/nyquist_converter.py
Normal file
@ -0,0 +1,19 @@
|
||||
import board
|
||||
|
||||
from kmk.consts import DiodeOrientation
|
||||
from kmk.mcus.circuitpython_samd51 import Firmware as _Firmware
|
||||
from kmk.pins import Pin as P
|
||||
|
||||
|
||||
class Firmware(_Firmware):
|
||||
col_pins = (P.RX, P.A1, P.A2, P.A3, P.A4, P.A5)
|
||||
row_pins = (P.D13, P.D11, P.D10, P.D9, P.D7)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
|
||||
split_type = 'UART'
|
||||
split_flip = True
|
||||
split_offsets = [6, 6, 6, 6, 6]
|
||||
uart_pin = board.SCL
|
||||
rgb_pixel_pin = board.TX
|
||||
extra_data_pin = board.SDA
|
||||
|
@ -150,16 +150,22 @@ class Firmware:
|
||||
self._send_hid()
|
||||
|
||||
def _handle_matrix_report(self, update=None):
|
||||
"""
|
||||
'''
|
||||
Bulk processing of update code for each cycle
|
||||
:param update:
|
||||
"""
|
||||
'''
|
||||
if update is not None:
|
||||
self._state.matrix_changed(
|
||||
update[0],
|
||||
update[1],
|
||||
update[2],
|
||||
)
|
||||
# TODO Sort why this is needed when mashing keys on split half
|
||||
# This is a dirty hack to prevent crashes in unrealistic cases
|
||||
try:
|
||||
self._state.matrix_changed(
|
||||
update[0],
|
||||
update[1],
|
||||
update[2],
|
||||
)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
print(update)
|
||||
|
||||
def _send_to_master(self, update):
|
||||
if self.split_master_left:
|
||||
@ -181,11 +187,11 @@ class Firmware:
|
||||
return None
|
||||
|
||||
def _send_debug(self, message):
|
||||
"""
|
||||
'''
|
||||
Prepends DEB and appends a newline to allow debug messages to
|
||||
be detected and handled differently than typical keypresses.
|
||||
:param message: Debug message
|
||||
"""
|
||||
'''
|
||||
if self.uart is not None:
|
||||
self.uart.write('DEB')
|
||||
self.uart.write(message, '\n')
|
||||
@ -221,9 +227,9 @@ class Firmware:
|
||||
if self.split_flip and not self._master_half():
|
||||
self.col_pins = list(reversed(self.col_pins))
|
||||
|
||||
if self.split_side == "Left":
|
||||
if self.split_side == 'Left':
|
||||
self.split_master_left = self._master_half()
|
||||
elif self.split_side == "Right":
|
||||
elif self.split_side == 'Right':
|
||||
self.split_master_left = not self._master_half()
|
||||
|
||||
if self.uart_pin is not None:
|
||||
@ -262,7 +268,7 @@ class Firmware:
|
||||
del self.leader_dictionary[k]
|
||||
|
||||
if self.debug_enabled:
|
||||
print("Firin' lazers. Keyboard is booted.")
|
||||
print('Firin\' lazers. Keyboard is booted.')
|
||||
|
||||
while True:
|
||||
state_changed = False
|
||||
|
16
kmk/keys.py
16
kmk/keys.py
@ -432,18 +432,18 @@ make_key(code=39, names=('0', 'N0'))
|
||||
gc.collect()
|
||||
|
||||
# More ASCII standard keys
|
||||
make_key(code=40, names=('ENTER', 'ENT', "\n"))
|
||||
make_key(code=40, names=('ENTER', 'ENT', '\n'))
|
||||
make_key(code=41, names=('ESCAPE', 'ESC'))
|
||||
make_key(code=42, names=('BACKSPACE', 'BSPC', 'BKSP'))
|
||||
make_key(code=43, names=('TAB', "\t"))
|
||||
make_key(code=43, names=('TAB', '\t'))
|
||||
make_key(code=44, names=('SPACE', 'SPC', ' '))
|
||||
make_key(code=45, names=('MINUS', 'MINS', '-'))
|
||||
make_key(code=46, names=('EQUAL', 'EQL', '='))
|
||||
make_key(code=47, names=('LBRACKET', 'LBRC', '['))
|
||||
make_key(code=48, names=('RBRACKET', 'RBRC', ']'))
|
||||
make_key(code=49, names=('BACKSLASH', 'BSLASH', 'BSLS', "\\"))
|
||||
make_key(code=49, names=('BACKSLASH', 'BSLASH', 'BSLS', '\\'))
|
||||
make_key(code=51, names=('SEMICOLON', 'SCOLON', 'SCLN', ';'))
|
||||
make_key(code=52, names=('QUOTE', 'QUOT', "'"))
|
||||
make_key(code=52, names=('QUOTE', 'QUOT', '\''))
|
||||
make_key(code=53, names=('GRAVE', 'GRV', 'ZKHK', '`'))
|
||||
make_key(code=54, names=('COMMA', 'COMM', ','))
|
||||
make_key(code=55, names=('DOT', '.'))
|
||||
@ -531,7 +531,7 @@ make_key(code=134, names=('KP_EQUAL_AS400', 'NUMPAD_EQUAL_AS400'))
|
||||
gc.collect()
|
||||
|
||||
# Making life better for folks on tiny keyboards especially: exposes
|
||||
# the "shifted" keys as raw keys. Under the hood we're still
|
||||
# the 'shifted' keys as raw keys. Under the hood we're still
|
||||
# sending Shift+(whatever key is normally pressed) to get these, so
|
||||
# for example `KC_AT` will hold shift and press 2.
|
||||
make_shifted_key('GRAVE', names=('TILDE', 'TILD', '~'))
|
||||
@ -551,7 +551,7 @@ make_shifted_key('LBRACKET', names=('LEFT_CURLY_BRACE', 'LCBR', '{'))
|
||||
make_shifted_key('RBRACKET', names=('RIGHT_CURLY_BRACE', 'RCBR', '}'))
|
||||
make_shifted_key('BACKSLASH', names=('PIPE', '|'))
|
||||
make_shifted_key('SEMICOLON', names=('COLON', 'COLN', ':'))
|
||||
make_shifted_key('QUOTE', names=('DOUBLE_QUOTE', 'DQUO', 'DQT', '"'))
|
||||
make_shifted_key('QUOTE', names=('DOUBLE_QUOTE', 'DQUO', 'DQT', '\''))
|
||||
make_shifted_key('COMMA', names=('LEFT_ANGLE_BRACKET', 'LABK', '<'))
|
||||
make_shifted_key('DOT', names=('RIGHT_ANGLE_BRACKET', 'RABK', '>'))
|
||||
make_shifted_key('SLSH', names=('QUESTION', 'QUES', '?'))
|
||||
@ -584,9 +584,9 @@ make_key(code=152, names=('LANG9',))
|
||||
|
||||
gc.collect()
|
||||
|
||||
# Consumer ("media") keys. Most known keys aren't supported here. A much
|
||||
# Consumer ('media') keys. Most known keys aren't supported here. A much
|
||||
# longer list used to exist in this file, but the codes were almost certainly
|
||||
# incorrect, conflicting with each other, or otherwise "weird". We'll add them
|
||||
# incorrect, conflicting with each other, or otherwise 'weird'. We'll add them
|
||||
# back in piecemeal as needed. PRs welcome.
|
||||
#
|
||||
# A super useful reference for these is http://www.freebsddiary.org/APC/usb_hid_usages.php
|
||||
|
137
user_keymaps/Default/nyquist_converter.py
Normal file
137
user_keymaps/Default/nyquist_converter.py
Normal file
@ -0,0 +1,137 @@
|
||||
from kmk.boards.nyquist_converter import Firmware
|
||||
from kmk.keys import KC
|
||||
|
||||
keyboard = Firmware()
|
||||
|
||||
_______ = KC.TRNS
|
||||
XXXXXXX = KC.NO
|
||||
|
||||
LOWER = KC.MO(3)
|
||||
RAISE = KC.MO(4)
|
||||
ADJUST = KC.MO(5)
|
||||
|
||||
keyboard.keymap = [
|
||||
# Qwerty
|
||||
# ,-----------------------------------------------------------------------------------.
|
||||
# | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
# |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
# | Tab | Q | W | E | R | T | Y | U | I | O | P | Del |
|
||||
# |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
# | 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.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],
|
||||
[ADJUST, KC.LCTL, KC.LALT, KC.LGUI, LOWER, KC.SPC, KC.SPC, RAISE, KC.LEFT, KC.DOWN, KC.UP, KC.RGHT],
|
||||
],
|
||||
|
||||
# Colemak
|
||||
# ,-----------------------------------------------------------------------------------.
|
||||
# | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
# |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
# | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del |
|
||||
# |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
# | 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.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.F, KC.P, KC.G, KC.J, KC.L, KC.U, KC.Y, KC.SCLN, KC.DEL],
|
||||
[KC.ESC, 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
|
||||
# ,-----------------------------------------------------------------------------------.
|
||||
# | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
# |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
# | Tab | " | , | . | P | Y | F | G | C | R | L | Del |
|
||||
# |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
# | 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.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.QUOT, KC.COMM, KC.DOT, KC.P, KC.Y, KC.F, KC.G, KC.C, KC.R, KC.L, KC.DEL],
|
||||
[KC.ESC, 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
|
||||
# ,-----------------------------------------------------------------------------------.
|
||||
# | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||
# |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
# | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | 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.BSPC],
|
||||
[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 | Bksp |
|
||||
# |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
# | ` | 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.BSPC],
|
||||
[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
|
||||
# ,-----------------------------------------------------------------------------------.
|
||||
# | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
# |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
# | | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn|Sat Up|Sat Dn|Val Up|Val Dn| | Del |
|
||||
# |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
# | | | | | | | |Qwerty|Colemk|Dvorak| | |
|
||||
# |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
# | | | | | | | | | | | | |
|
||||
# |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
# | | | | | | | | | | | |
|
||||
# `-----------------------------------------------------------------------------------'
|
||||
[
|
||||
[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.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()
|
@ -13,12 +13,6 @@ keyboard.col_pins = (P.A2, P.A3, P.A4, P.A5, P.SCK, P.MOSI)
|
||||
keyboard.row_pins = (P.D13, P.D11, P.D10, P.D9)
|
||||
keyboard.diode_orientation = DiodeOrientation.COLUMNS
|
||||
|
||||
keyboard.split_type = "UART"
|
||||
keyboard.split_flip = True
|
||||
keyboard.split_offsets = [6, 6, 6, 6]
|
||||
keyboard.uart_pin = board.SCL
|
||||
keyboard.extra_data_pin = board.SDA
|
||||
|
||||
# ------------------User level config variables ---------------------------------------
|
||||
keyboard.leader_mode = LeaderMode.TIMEOUT
|
||||
keyboard.unicode_mode = UnicodeMode.LINUX
|
||||
|
@ -1,26 +1,10 @@
|
||||
import board
|
||||
import busio
|
||||
|
||||
from kmk.consts import DiodeOrientation, LeaderMode, UnicodeMode
|
||||
from kmk.handlers.layers import (df_pressed, lt_pressed, lt_released,
|
||||
mo_pressed, mo_released)
|
||||
from kmk.boards.nyquist_converter import Firmware
|
||||
from kmk.consts import LeaderMode, UnicodeMode
|
||||
from kmk.handlers.sequences import compile_unicode_string_sequences
|
||||
from kmk.keys import KC, layer_key_validator, make_argumented_key
|
||||
from kmk.mcus.circuitpython_samd51 import Firmware
|
||||
from kmk.pins import Pin as P
|
||||
from kmk.keys import KC
|
||||
|
||||
keyboard = Firmware()
|
||||
|
||||
keyboard.col_pins = (P.RX, P.A1, P.A2, P.A3, P.A4, P.A5)
|
||||
keyboard.row_pins = (P.D13, P.D11, P.D10, P.D9, P.D7)
|
||||
keyboard.diode_orientation = DiodeOrientation.COLUMNS
|
||||
|
||||
keyboard.split_type = "UART"
|
||||
keyboard.split_flip = True
|
||||
keyboard.split_offsets = [6, 6, 6, 6, 6]
|
||||
keyboard.uart_pin = board.SCL
|
||||
keyboard.extra_data_pin = board.SDA
|
||||
|
||||
# ------------------User level config variables ---------------------------------------
|
||||
keyboard.leader_mode = LeaderMode.TIMEOUT
|
||||
keyboard.unicode_mode = UnicodeMode.LINUX
|
||||
@ -29,7 +13,6 @@ keyboard.leader_timeout = 2000
|
||||
keyboard.debug_enabled = True
|
||||
|
||||
# RGB Config (underglow)
|
||||
keyboard.rgb_pixel_pin = board.TX
|
||||
keyboard.rgb_num_pixels = 12
|
||||
|
||||
keyboard.rgb_val_limit = 150
|
||||
@ -67,89 +50,13 @@ keyboard.leader_dictionary = {
|
||||
'yay': emoticons.YAY,
|
||||
}
|
||||
|
||||
|
||||
df = 0
|
||||
gw = 1
|
||||
r1 = 2
|
||||
r2 = 3
|
||||
r3 = 4
|
||||
|
||||
|
||||
def base(*args, **kwargs):
|
||||
return df_pressed(*args, **kwargs)
|
||||
|
||||
|
||||
def layer1p(*args, **kwargs):
|
||||
return mo_pressed(*args, **kwargs)
|
||||
|
||||
|
||||
def layer1r(*args, **kwargs):
|
||||
return mo_released(*args, **kwargs)
|
||||
|
||||
|
||||
def layer2p(*args, **kwargs):
|
||||
return lt_pressed(*args, **kwargs)
|
||||
|
||||
|
||||
def layer2r(*args, **kwargs):
|
||||
return lt_released(*args, **kwargs)
|
||||
|
||||
|
||||
def layer3p(*args, **kwargs):
|
||||
return mo_pressed(*args, **kwargs)
|
||||
|
||||
|
||||
def layer3r(*args, **kwargs):
|
||||
return mo_released(*args, **kwargs)
|
||||
|
||||
|
||||
def gaming(*args, **kwargs):
|
||||
return df_pressed(*args, **kwargs)
|
||||
|
||||
|
||||
make_argumented_key(
|
||||
validator=layer_key_validator,
|
||||
names=('LAYER_BASE',),
|
||||
on_press=base,
|
||||
)
|
||||
|
||||
make_argumented_key(
|
||||
validator=layer_key_validator,
|
||||
names=('LAYER_1',),
|
||||
on_press=layer1p,
|
||||
on_release=layer1r,
|
||||
)
|
||||
|
||||
make_argumented_key(
|
||||
validator=layer_key_validator,
|
||||
names=('LAYER_2',),
|
||||
on_press=layer2p,
|
||||
on_release=layer2r,
|
||||
)
|
||||
|
||||
make_argumented_key(
|
||||
validator=layer_key_validator,
|
||||
names=('LAYER_3',),
|
||||
on_press=layer3p,
|
||||
on_release=layer3r,
|
||||
)
|
||||
|
||||
|
||||
make_argumented_key(
|
||||
validator=layer_key_validator,
|
||||
names=('LAYER_GAMING',),
|
||||
on_press=gaming,
|
||||
)
|
||||
|
||||
_______ = KC.TRNS
|
||||
XXXXXXX = KC.NO
|
||||
SHFT_INS = KC.LSHIFT(KC.INS)
|
||||
|
||||
BASE = KC.LAYER_BASE(df)
|
||||
LAYER_1 = KC.LAYER_1(r1)
|
||||
LT2_SP = KC.LAYER_2(r2, KC.SPC)
|
||||
LAYER_3 = KC.LAYER_3(r3)
|
||||
GAMING = KC.LAYER_GAMING(gw)
|
||||
BASE = KC.DF(0)
|
||||
LT2_SP = KC.LT(3, KC.SPC)
|
||||
GAMING = KC.DF(1)
|
||||
|
||||
# ---------------------- Keymap ---------------------------------------------------------
|
||||
|
||||
@ -160,7 +67,7 @@ keyboard.keymap = [
|
||||
[KC.GRV, KC.QUOTE, KC.COMMA, KC.DOT, KC.P, KC.Y, KC.F, KC.G, KC.C, KC.R, KC.L, KC.BKSP],
|
||||
[KC.TAB, KC.A, KC.O, KC.E, KC.U, KC.I, KC.D, KC.H, KC.T, KC.N, KC.S, KC.ENT],
|
||||
[KC.LSFT, KC.SCLN, KC.Q, KC.J, KC.K, KC.X, KC.B, KC.M, KC.W, KC.V, KC.Z, KC.SLSH],
|
||||
[KC.LCTRL, KC.LGUI, KC.LALT, KC.RGB_TOG, LAYER_1, KC.LT(r2, KC.SPC), KC.LT(r2, KC.SPC), LAYER_3, KC.LEFT, KC.DOWN, KC.UP, KC.RIGHT],
|
||||
[KC.LCTRL, KC.LGUI, KC.LALT, KC.RGB_TOG, KC.MO(2), LT2_SP, LT2_SP, KC.MO(4), KC.LEFT, KC.DOWN, KC.UP, KC.RIGHT],
|
||||
],
|
||||
[
|
||||
# gw
|
||||
@ -168,7 +75,7 @@ keyboard.keymap = [
|
||||
[KC.TAB, KC.QUOT, KC.COMM, KC.DOT, KC.P, KC.Y, KC.F, KC.G, KC.C, KC.R, KC.L, KC.BKSP],
|
||||
[KC.ESC, KC.A, KC.O, KC.E, KC.U, KC.I, KC.D, KC.H, KC.T, KC.N, KC.S, KC.ENT],
|
||||
[KC.LSFT, KC.SCLN, KC.Q, KC.J, KC.K, KC.X, KC.B, KC.M, KC.W, KC.V, KC.Z, KC.SLSH],
|
||||
[KC.LCTRL, KC.LGUI, KC.LALT, KC.F1, KC.F2, KC.SPC, KC.LT(r2, KC.SPC), KC.MO(r3), KC.LEFT, KC.DOWN, KC.UP, KC.RIGHT],
|
||||
[KC.LCTRL, KC.LGUI, KC.LALT, KC.F1, KC.F2, KC.SPC, LT2_SP, KC.MO(4), KC.LEFT, KC.DOWN, KC.UP, KC.RIGHT],
|
||||
],
|
||||
[
|
||||
# r1
|
||||
|
@ -1,4 +1,4 @@
|
||||
from kmk.boards.kitsym4_iris import Firmware
|
||||
from kmk.boards.iris_converter import Firmware
|
||||
from kmk.consts import LeaderMode, UnicodeMode
|
||||
from kmk.handlers.sequences import compile_unicode_string_sequences as cuss
|
||||
from kmk.handlers.sequences import send_string, simple_key_sequence
|
||||
|
Loading…
Reference in New Issue
Block a user