This commit is contained in:
Jack Hartstein 2021-01-09 15:17:04 -08:00
commit 66bce40b79
83 changed files with 647 additions and 279 deletions

10
.github/dependabot.yml vendored Normal file
View file

@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/docs"
schedule:
interval: "daily"

View file

@ -32,6 +32,8 @@ jobs:
- cradio_right
- crbn
- eek
- helix_left
- helix_right
- iris_left
- iris_right
- jian_left

View file

@ -293,6 +293,50 @@ config ZMK_KSCAN_COMPOSITE_DRIVER
#KSCAN Settings
endmenu
menu "USB Logging"
config ZMK_USB_LOGGING
bool "Enable USB CDC ACM logging to help debug"
select LOG
select USB
select USB_DEVICE_STACK
select USB_CDC_ACM
select SERIAL
select CONSOLE
select UART_INTERRUPT_DRIVEN
select UART_LINE_CTRL
select UART_CONSOLE
select USB_UART_CONSOLE
if ZMK_USB_LOGGING
config ZMK_LOG_LEVEL
default 4
config USB_CDC_ACM_RINGBUF_SIZE
default 1024
config USB_CDC_ACM_DEVICE_NAME
default "CDC_ACM"
config USB_CDC_ACM_DEVICE_COUNT
default 1
config UART_CONSOLE_ON_DEV_NAME
default "CDC_ACM_0"
config LOG_BUFFER_SIZE
default 8192
config LOG_STRDUP_BUF_COUNT
default 16
#ZMK_USB_LOGGING
endif
#USB Logging
endmenu
if SETTINGS
config ZMK_SETTINGS_SAVE_DEBOUNCE
@ -317,6 +361,9 @@ config KERNEL_BIN_NAME
config REBOOT
default y
config USB
default y if HAS_HW_NRF_USBD
module = ZMK
module-str = zmk
source "subsys/logging/Kconfig.template.log_config"

View file

@ -1,7 +1,5 @@
#
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
#
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/../tools/uf2/utils/uf2conv.py

View file

@ -1,7 +1,5 @@
#
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
#
config BOARD_ENABLE_DCDC
bool "Enable DCDC mode"

View file

@ -1,8 +1,7 @@
# Maker Diary nrf52840 M.2 board configuration
#
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
#
config BOARD_NRF52840_M2
bool "nrf52480_m2"

View file

@ -1,7 +1,5 @@
#
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
#
if BOARD_NRF52840_M2

View file

@ -1,7 +1,5 @@
#
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
#
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")

View file

@ -1,7 +1,5 @@
#
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
#
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y

View file

@ -3,12 +3,12 @@
if SHIELD_BFO9000_LEFT
config ZMK_SPLIT_BLE_ROLE_CENTRAL
default y
config ZMK_KEYBOARD_NAME
default "BFO9000 Left"
config ZMK_SPLIT_BLE_ROLE_CENTRAL
default y
endif
if SHIELD_BFO9000_RIGHT

View file

@ -13,9 +13,6 @@ if SHIELD_CORNE_RIGHT
config ZMK_KEYBOARD_NAME
default "Corne Right"
config USB
default y
endif
if SHIELD_CORNE_LEFT || SHIELD_CORNE_RIGHT

View file

@ -16,9 +16,6 @@ if SHIELD_CRADIO_RIGHT
config ZMK_KEYBOARD_NAME
default "cradio right"
config USB
default y
endif
if SHIELD_CRADIO_LEFT || SHIELD_CRADIO_RIGHT

View file

@ -1,7 +1,5 @@
#
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
#
if SHIELD_CRBN

View file

@ -1,7 +1,5 @@
#
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
#
config SHIELD_CRBN
def_bool $(shields_list_contains,crbn)

View file

@ -1,8 +1,5 @@
#
# Copyright (c) 2020 The ZMK Contributors
#
# SPDX-License-Identifier: MIT
#
if SHIELD_EEK

View file

@ -0,0 +1,26 @@
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
if SHIELD_HELIX_LEFT
config ZMK_KEYBOARD_NAME
default "Helix Left"
config ZMK_SPLIT_BLE_ROLE_CENTRAL
default y
endif
if SHIELD_HELIX_RIGHT
config ZMK_KEYBOARD_NAME
default "Helix Right"
endif
if SHIELD_HELIX_LEFT || SHIELD_HELIX_RIGHT
config ZMK_SPLIT
default y
endif

View file

@ -0,0 +1,8 @@
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
config SHIELD_HELIX_LEFT
def_bool $(shields_list_contains,helix_left)
config SHIELD_HELIX_RIGHT
def_bool $(shields_list_contains,helix_right)

View file

@ -0,0 +1,12 @@
#### Note to user:
- If desired, RGB underglow must be manually enabled before building and flashing. Check 'helix.conf' to do so.
- Peripheral RGB function is impaired until full support is implemented in the master branch.
- OLED displays are not currently included in this shield. This will be updated after OLED support is live.
- 'KANA' and 'EISUU' input is currently utilized under the 'LANG1' and 'LANG2' keycodes respectively.
---
Thanks to Nicell, KemoNine, petejohanson, TJ "Chormbo The Great", joelspadin/Rinh, Wofiel, Okke, innovaker,
and the rest of the ZMK contributors for their support in constructing this shield. I appreciate your assistance greatly.
This has been a valuable learning experience for me. May this contribution serve the community well.

View file

@ -0,0 +1,34 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
&spi1 {
compatible = "nordic,nrf-spim";
status = "okay";
mosi-pin = <6>;
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
sck-pin = <5>;
miso-pin = <7>;
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
label = "WS2812";
/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <4000000>;
/* WS2812 */
chain-length = <32>; /* number of LEDs */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
};
};
/ {
chosen {
zmk,underglow = &led_strip;
};
};

View file

@ -0,0 +1,6 @@
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
# Enables RGB functionality (Uncomment lines below to enable.)
# CONFIG_ZMK_RGB_UNDERGLOW=y
# CONFIG_WS2812_STRIP=y

View file

@ -0,0 +1,47 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <dt-bindings/zmk/matrix_transform.h>
/ {
chosen {
zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform;
};
default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <14>;
rows = <5>;
// | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 |
// | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 |
// | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 |
// | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 | SW25 | | SW25 | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 |
// | SW26 | SW27 | SW28 | SW29 | SW30 | SW31 | SW32 | | SW32 | SW31 | SW30 | SW29 | SW28 | SW27 | SW26 |
map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13)
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,13)
>;
};
kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN";
diode-direction = "col2row";
row-gpios
= <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
};
};

View file

@ -0,0 +1,88 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/rgb.h>
#include <dt-bindings/zmk/ext_power.h>
#include <dt-bindings/zmk/outputs.h>
#define DEFAULT 0
#define LOWER 1
#define RAISE 2
#define ADJUST 3
/* NOTE: At the time of the creation of this keymap, there are no specified codes for 'eisuu' and 'kana' input in ZMK.
However, 'LANG1' and 'LANG2' are fully-functioning candidates for 'kana' and 'eisuu' input respectively.
As such, those are in use within the default layer at this time.*/
/ {
keymap {
compatible = "zmk,keymap";
default_layer {
// ---------------------------------------------------------------------------------------------------------------------------------
// | GRAVE | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | DEL |
// | TAB | Q | W | E | R | T | | Y | U | I | O | P | BSPC |
// | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' |
// | SHIFT | Z | X | C | V | B | LBKT | | RBKT | N | M | , | . | / | RET |
// | ADJUST | ESC | ALT | LGUI | EISUU | LOWER | SPACE | | SPACE | RAISE | KANA | LEFT | DOWN | UP | RIGHT |
bindings = <
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp DEL
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC
&kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LBKT &kp RBKT &kp N &kp M &kp COMMA &kp PERIOD &kp SLASH &kp RET
&mo ADJUST &kp ESC &kp LALT &kp LGUI &kp LANG2 &mo LOWER &kp SPACE &kp SPACE &mo RAISE &kp LANG1 &kp LEFT &kp DOWN &kp UP &kp RIGHT
>;
};
lower_layer {
// ---------------------------------------------------------------------------------------------------------------------------------
// | | | | | | | | | | | | | |
// | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |
// | | | | | | | | | _ | + | { | } | PIPE |
// | | | | | | | ( | | ) | | | | HOME | END | |
// | | | | | | | | | | | | | | | |
bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&kp TILDE &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR &trans
&trans &trans &trans &trans &trans &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE
&trans &trans &trans &trans &trans &trans &kp LPAR &kp RPAR &trans &trans &trans &kp HOME &kp END &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
};
raise_layer {
// ---------------------------------------------------------------------------------------------------------------------------------
// | | | | | | | | | | | | | |
// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | DEL |
// | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ |
// | | F7 | F8 | F9 | F10 | F11 | | | | F12 | | PSCRN | PG_DN | PG_UP | |
// | | | | | | | | | | | | NEXT | VOL- | VOL+ | PLAY |
bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp DEL
&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH
&trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &trans &trans &kp F12 &trans &kp PSCRN &kp PG_DN &kp PG_UP &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PP
>;
};
adjust_layer {
// ---------------------------------------------------------------------------------------------------------------------------------
// | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | EP TOG |
// | BT CLR | BT SEL0 | BT SEL1 | BT SEL2 | BGT SEL3 | BT SEL4 | | RGB EFF+ | RGB HUE+ | RGB SAT+ | RGB SPD+ | RGB BRI+ | RGB TOG |
// | BT NXT | OUT TOG | OUT USB | OUT BLE | | | | RGB EFF- | RGB HUE- | RGB SAT- | RGB SPD- | RGB BRI- | |
// | BT PRV | | | | | | { | | } | | | | | | |
// | | | | | | | | | | | | | | | |
bindings = <
&kp GRAVE &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR &ext_power EP_TOG
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &rgb_ug RGB_EFF &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_SPI &rgb_ug RGB_BRI &rgb_ug RGB_TOG
&bt BT_NXT &out OUT_TOG &out OUT_USB &out OUT_BLE &trans &trans &rgb_ug RGB_EFR &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_SPD &rgb_ug RGB_BRD &trans
&bt BT_PRV &trans &trans &trans &trans &trans &kp LBRC &kp RBRC &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
};
};
};

View file

@ -0,0 +1,19 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include "helix.dtsi"
&kscan0 {
col-gpios
= <&pro_micro_a 3 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 2 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 1 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 0 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 15 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 14 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 16 GPIO_ACTIVE_HIGH>
;
};

View file

@ -0,0 +1,23 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include "helix.dtsi"
&default_transform {
col-offset = <7>;
};
&kscan0 {
col-gpios
= <&pro_micro_d 16 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 14 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 15 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 0 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 1 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 2 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 3 GPIO_ACTIVE_HIGH>
;
};

View file

@ -16,9 +16,6 @@ if SHIELD_IRIS_RIGHT
config ZMK_KEYBOARD_NAME
default "Iris Right"
config USB
default y
endif
if SHIELD_IRIS_LEFT || SHIELD_IRIS_RIGHT

View file

@ -15,9 +15,6 @@ if SHIELD_JIAN_RIGHT
config ZMK_KEYBOARD_NAME
default "Jian Right"
config USB
default y
endif
if SHIELD_JIAN_LEFT || SHIELD_JIAN_RIGHT

View file

@ -15,9 +15,6 @@ if SHIELD_JORNE_RIGHT
config ZMK_KEYBOARD_NAME
default "Jorne Right"
config USB
default y
endif
if SHIELD_JORNE_LEFT || SHIELD_JORNE_RIGHT

View file

@ -15,9 +15,6 @@ if SHIELD_KYRIA_RIGHT
config ZMK_KEYBOARD_NAME
default "Kyria Right"
config USB
default y
endif
if SHIELD_KYRIA_LEFT || SHIELD_KYRIA_RIGHT

View file

@ -14,9 +14,6 @@ if SHIELD_LILY58_RIGHT
config ZMK_KEYBOARD_NAME
default "Lily58 Right"
config USB
default y
endif
if SHIELD_LILY58_LEFT || SHIELD_LILY58_RIGHT

View file

@ -1,7 +1,5 @@
#
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
#
if SHIELD_M60

View file

@ -1,7 +1,5 @@
#
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
#
config SHIELD_M60
def_bool $(shields_list_contains,m60)

View file

@ -17,9 +17,6 @@ if SHIELD_MICRODOX_RIGHT
config ZMK_KEYBOARD_NAME
default "Microdox Right"
config USB
default y
endif
if SHIELD_MICRODOX_LEFT || SHIELD_MICRODOX_RIGHT

View file

@ -1,5 +1,5 @@
#Copyright (c) 2020 The ZMK Contributors
#SPDX-License-Identifier: MIT
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
if SHIELD_QUEFRENCY_LEFT
@ -17,9 +17,6 @@ if SHIELD_QUEFRENCY_RIGHT
config ZMK_KEYBOARD_NAME
default "Quefrency Right"
config USB
default y
endif
if SHIELD_QUEFRENCY_LEFT || SHIELD_QUEFRENCY_RIGHT

View file

@ -16,9 +16,6 @@ if SHIELD_SOFLE_RIGHT
config ZMK_KEYBOARD_NAME
default "Sofle Right"
config USB
default y
endif
if SHIELD_SOFLE_LEFT || SHIELD_SOFLE_RIGHT

View file

@ -1,6 +1,6 @@
#Copyright (c) 2020 Derek Schmell
#SPDX-License-Identifier: MIT
# Copyright (c) 2020 Derek Schmell
# SPDX-License-Identifier: MIT
if SHIELD_SPLITREUS62_LEFT
@ -18,9 +18,6 @@ if SHIELD_SPLITREUS62_RIGHT
config ZMK_KEYBOARD_NAME
default "Splitreus62 Right"
config USB
default y
endif
if SHIELD_SPLITREUS62_LEFT || SHIELD_SPLITREUS62_RIGHT

View file

@ -4,6 +4,6 @@
if SHIELD_TG4X
config ZMK_KEYBOARD_NAME
default "TG4X"
default "TG4x"
endif

View file

@ -0,0 +1,11 @@
# TG4x
Standard setup for the [TG4x](https://github.com/MythosMann/tg4x/) 40% keyboard.
## Board Revision and Layout Notes
This TG4x implementation is for...
* rev 2.1 of the board
* Split spacebar with 2.25U on the left and 2.75U on the right
* 2U right shift

View file

@ -0,0 +1,7 @@
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
# Enable underglow
CONFIG_ZMK_RGB_UNDERGLOW=y
# Use the STRIP config specific to the LEDs you're using
CONFIG_WS2812_STRIP=y

View file

@ -0,0 +1,34 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
&spi1 {
compatible = "nordic,nrf-spim";
status = "okay";
mosi-pin = <8>;
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
sck-pin = <5>;
miso-pin = <7>;
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
label = "WS2812";
/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <4000000>;
/* WS2812 */
chain-length = <7>; /* number of LEDs */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
};
};
/ {
chosen {
zmk,underglow = &led_strip;
};
};

View file

@ -0,0 +1,2 @@
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT

View file

@ -8,51 +8,47 @@
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#define DEFAULT 0
#define LOWER 1
#define RAISE 2
/ {
behaviors {
hm: homerow_mods {
ht: hold_tap {
compatible = "zmk,behavior-hold-tap";
label = "homerow mods";
label = "Hold Tap";
#binding-cells = <2>;
tapping_term_ms = <225>;
tapping_term_ms = <200>;
flavor = "tap-preferred";
bindings = <&kp>, <&kp>;
};
};
};
/ {
keymap {
compatible = "zmk,keymap";
default_layer {
bindings = <
&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC
&kp TAB &hm LGUI A &hm LALT S &hm LCTRL D &hm LSHFT F &kp G &kp H &hm RSHFT J &hm RCTRL K &hm RALT L &hm RGUI SEMI &kp RET
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp SQT
&kp LCTRL &kp LALT &kp LGUI &lt 1 BSPC &lt 2 SPACE &kp LEFT &kp DOWN &kp UP &kp RIGHT
>;
};
lower {
bindings = <
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp PSCRN
&kp DEL &trans &kp K_VOL_UP &trans &trans &trans &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans
&trans &trans &kp K_VOL_DN &trans &trans &trans &trans &trans &trans &bt BT_PRV &bt BT_NXT &bt BT_CLR
&bootloader &reset &trans &trans &trans &trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3
&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp SEMI &kp BSPC
&ht CAPS TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp APOS &kp RET
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp RSHFT
&kp LCTRL &kp LGUI &kp LALT &lt 1 SPACE &kp SPACE &kp RALT &kp RGUI &mo 2 &kp RCTRL
>;
};
raise {
function_layer {
bindings = <
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp PSCRN
&kp DEL &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH
&trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp TILDE &kp HOME &kp PG_UP &kp PG_DN &kp END
&trans &trans &trans &trans &trans &trans &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PP
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp DEL
&none &kp HOME &kp PG_UP &trans &trans &trans &kp LBKT &kp RBKT &kp EQUAL &kp BSLH &kp FSLH &trans
&trans &kp END &kp PG_DN &trans &trans &trans &trans &trans &trans &kp UP &trans
&trans &trans &trans &trans &trans &trans &kp LEFT &kp DOWN &kp RIGHT
>;
};
other_layer {
bindings = <
&kp PRINTSCREEN &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &bt BT_CLR &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &bootloader &reset &trans
&trans &trans &trans &trans &trans &kp C_VOL_UP &kp C_VOL_DN &kp C_PP
>;
};
};
};

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2020 The ZMK Contrbutors
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
@ -7,28 +7,23 @@
#include <dt-bindings/zmk/matrix_transform.h>
/ {
chosen {
zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform;
};
default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <7>;
rows = <8>;
map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,5)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4)
RC(3,0) RC(3,1) RC(3,2) RC(3,4) RC(3,5) RC(7,1) RC(7,2) RC(7,3) RC(7,4)
>;
};
kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN";
diode-direction = "col2row";
row-gpios
= <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
col-gpios
= <&pro_micro_d 1 GPIO_ACTIVE_HIGH>
, <&pro_micro_d 14 GPIO_ACTIVE_HIGH>
@ -38,19 +33,23 @@
, <&pro_micro_a 2 GPIO_ACTIVE_HIGH>
, <&pro_micro_a 3 GPIO_ACTIVE_HIGH>
;
row-gpios
= <&pro_micro_a 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_a 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_a 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_a 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro_d 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
};
};
default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
rows = <8>;
columns = <7>;
map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(6,0) RC(6,1) RC(6,2) RC(6,4)
RC(3,0) RC(3,1) RC(3,2) RC(3,4) RC(3,5) RC(7,1) RC(7,2) RC(7,3) RC(7,4)
>;
};
chosen {
zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform;
};
};

View file

@ -9,7 +9,7 @@
rgb_ug: behavior_rgb_underglow {
compatible = "zmk,behavior-rgb-underglow";
label = "RGB_UNDERGLOW";
#binding-cells = <1>;
#binding-cells = <2>;
};
};
};

View file

@ -1,4 +1,4 @@
# Copyright (c) 2020, Pete Johanson
# Copyright (c) 2020 Pete Johanson
# SPDX-License-Identifier: MIT
properties:

View file

@ -1,4 +1,4 @@
# Copyright (c) 2020, Pete Johanson
# Copyright (c) 2020 Pete Johanson
# SPDX-License-Identifier: MIT
properties:

View file

@ -1,4 +1,4 @@
# Copyright (c) 2020, Pete Johanson
# Copyright (c) 2020 Pete Johanson
# SPDX-License-Identifier: MIT
properties:

View file

@ -1,4 +1,4 @@
# Copyright (c) 2020, Peter Johanson
# Copyright (c) 2020 Peter Johanson
# SPDX-License-Identifier: MIT
description: Bluetooth Behavior

View file

@ -1,7 +1,5 @@
#
# Copyright (c) 2020, The ZMK Contributors
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
#
description: External power control Behavior

View file

@ -1,4 +1,4 @@
# Copyright (c) 2020, Pete Johanson
# Copyright (c) 2020 Pete Johanson
# SPDX-License-Identifier: MIT
description: Key press/release behavior

View file

@ -1,4 +1,4 @@
# Copyright (c) 2020, Pete Johanson
# Copyright (c) 2020 Pete Johanson
# SPDX-License-Identifier: MIT
description: Momentary layer on press/release behavior

View file

@ -1,4 +1,4 @@
# Copyright (c) 2020, Pete Johanson
# Copyright (c) 2020 Pete Johanson
# SPDX-License-Identifier: MIT
description: None Binding Behavior

View file

@ -1,7 +1,5 @@
#
# Copyright (c) 2020, The ZMK Contributors
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
#
description: Output Selection Behavior

View file

@ -1,4 +1,4 @@
# Copyright (c) 2020, Pete Johanson
# Copyright (c) 2020 Pete Johanson
# SPDX-License-Identifier: MIT
description: Keyboard Reset Behavior

View file

@ -5,4 +5,4 @@ description: RGB Underglow Action
compatible: "zmk,behavior-rgb-underglow"
include: one_param.yaml
include: two_param.yaml

View file

@ -1,4 +1,4 @@
# Copyright (c) 2020, The ZMK Contributors
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
description: Sensor rotate key press/release behavior

View file

@ -1,4 +1,4 @@
# Copyright (c) 2020, Pete Johanson
# Copyright (c) 2020 Pete Johanson
# SPDX-License-Identifier: MIT
description: Transparent Binding Behavior

View file

@ -1,7 +1,5 @@
#
# Copyright (c) 2020, The ZMK Contributors
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
#
description: |
Generic driver for controlling the external power output

View file

@ -1,7 +1,5 @@
#
# Copyright (c) 2020, The ZMK Contributors
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
#
description: |
Allows defining the collection of sensors bound in the keymap layers

View file

@ -4,14 +4,29 @@
* SPDX-License-Identifier: MIT
*/
#define RGB_TOG 0
#define RGB_HUI 1
#define RGB_HUD 2
#define RGB_SAI 3
#define RGB_SAD 4
#define RGB_BRI 5
#define RGB_BRD 6
#define RGB_SPI 7
#define RGB_SPD 8
#define RGB_EFF 9
#define RGB_EFR 10
#define RGB_TOG_CMD 0
#define RGB_HUI_CMD 1
#define RGB_HUD_CMD 2
#define RGB_SAI_CMD 3
#define RGB_SAD_CMD 4
#define RGB_BRI_CMD 5
#define RGB_BRD_CMD 6
#define RGB_SPI_CMD 7
#define RGB_SPD_CMD 8
#define RGB_EFF_CMD 9
#define RGB_EFR_CMD 10
#define RGB_COLOR_HSB_CMD 11
#define RGB_TOG RGB_TOG_CMD 0
#define RGB_HUI RGB_HUI_CMD 0
#define RGB_HUD RGB_HUD_CMD 0
#define RGB_SAI RGB_SAI_CMD 0
#define RGB_SAD RGB_SAD_CMD 0
#define RGB_BRI RGB_BRI_CMD 0
#define RGB_BRD RGB_BRD_CMD 0
#define RGB_SPI RGB_SPI_CMD 0
#define RGB_SPD RGB_SPD_CMD 0
#define RGB_EFF RGB_EFF_CMD 0
#define RGB_EFR RGB_EFR_CMD 0
#define RGB_COLOR_HSB(h, s, v) RGB_COLOR_HSB_CMD(((h) << 16) + ((s) << 8) + (v))
#define RGB_COLOR_HSV RGB_COLOR_HSB

View file

@ -16,5 +16,6 @@ int zmk_keymap_layer_activate(uint8_t layer);
int zmk_keymap_layer_deactivate(uint8_t layer);
int zmk_keymap_layer_toggle(uint8_t layer);
int zmk_keymap_layer_to(uint8_t layer);
const char *zmk_keymap_layer_label(uint8_t layer);
int zmk_keymap_position_state_changed(uint32_t position, bool pressed, int64_t timestamp);

View file

@ -12,3 +12,4 @@ int zmk_rgb_underglow_change_hue(int direction);
int zmk_rgb_underglow_change_sat(int direction);
int zmk_rgb_underglow_change_brt(int direction);
int zmk_rgb_underglow_change_spd(int direction);
int zmk_rgb_underglow_set_hsb(uint16_t hue, uint8_t saturation, uint8_t brightness);

View file

@ -1,9 +1,8 @@
#!/bin/sh
#
# Copyright (c) 2020 The ZMK Contributors
#
# SPDX-License-Identifier: MIT
#
if [ -z "$1" ]; then
echo "Usage: ./run-test.sh <path to testcase>"
exit 1

View file

@ -1,4 +1,4 @@
# Copyright (c) 2020, ZMK Contributors
# Copyright (c) 2020 ZMK Contributors
# SPDX-License-Identifier: MIT
west-commands:

View file

@ -1,5 +1,4 @@
# Copyright (c) 2020 The ZMK Contributors
#
# SPDX-License-Identifier: MIT
'''Test runner for ZMK.'''

View file

@ -21,28 +21,31 @@ static int behavior_rgb_underglow_init(const struct device *dev) { return 0; }
static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding,
struct zmk_behavior_binding_event event) {
switch (binding->param1) {
case RGB_TOG:
case RGB_TOG_CMD:
return zmk_rgb_underglow_toggle();
case RGB_HUI:
case RGB_HUI_CMD:
return zmk_rgb_underglow_change_hue(1);
case RGB_HUD:
case RGB_HUD_CMD:
return zmk_rgb_underglow_change_hue(-1);
case RGB_SAI:
case RGB_SAI_CMD:
return zmk_rgb_underglow_change_sat(1);
case RGB_SAD:
case RGB_SAD_CMD:
return zmk_rgb_underglow_change_sat(-1);
case RGB_BRI:
case RGB_BRI_CMD:
return zmk_rgb_underglow_change_brt(1);
case RGB_BRD:
case RGB_BRD_CMD:
return zmk_rgb_underglow_change_brt(-1);
case RGB_SPI:
case RGB_SPI_CMD:
return zmk_rgb_underglow_change_spd(1);
case RGB_SPD:
case RGB_SPD_CMD:
return zmk_rgb_underglow_change_spd(-1);
case RGB_EFF:
case RGB_EFF_CMD:
return zmk_rgb_underglow_cycle_effect(1);
case RGB_EFR:
case RGB_EFR_CMD:
return zmk_rgb_underglow_cycle_effect(-1);
case RGB_COLOR_HSB_CMD:
return zmk_rgb_underglow_set_hsb((binding->param2 >> 16) & 0xFFFF,
(binding->param2 >> 8) & 0xFF, binding->param2 & 0xFF);
}
return -ENOTSUP;

View file

@ -33,12 +33,23 @@ void layer_status_init() {
void set_layer_symbol(lv_obj_t *label) {
int active_layer_index = zmk_keymap_highest_layer_active();
char text[6] = {};
LOG_DBG("Layer changed to %i", active_layer_index);
sprintf(text, LV_SYMBOL_KEYBOARD "%i ", active_layer_index);
const char *layer_label = zmk_keymap_layer_label(active_layer_index);
if (layer_label == NULL) {
char text[6] = {};
sprintf(text, LV_SYMBOL_KEYBOARD "%i", active_layer_index);
lv_label_set_text(label, text);
} else {
char text[12] = {};
snprintf(text, 12, LV_SYMBOL_KEYBOARD "%s", layer_label);
lv_label_set_text(label, text);
}
}
int zmk_widget_layer_status_init(struct zmk_widget_layer_status *widget, lv_obj_t *parent) {

View file

@ -59,6 +59,8 @@ static uint8_t _zmk_keymap_layer_default = 0;
#endif /* ZMK_KEYMAP_HAS_SENSORS */
#define LAYER_LABEL(node) COND_CODE_0(DT_NODE_HAS_PROP(node, label), (NULL), (DT_LABEL(node))),
// State
// When a behavior handles a key position "down" event, we record the layer state
@ -69,6 +71,9 @@ static uint32_t zmk_keymap_active_behavior_layer[ZMK_KEYMAP_LEN];
static struct zmk_behavior_binding zmk_keymap[ZMK_KEYMAP_LAYERS_LEN][ZMK_KEYMAP_LEN] = {
DT_INST_FOREACH_CHILD(0, TRANSFORMED_LAYER)};
static const char *zmk_keymap_layer_names[ZMK_KEYMAP_LAYERS_LEN] = {
DT_INST_FOREACH_CHILD(0, LAYER_LABEL)};
#if ZMK_KEYMAP_HAS_SENSORS
static struct zmk_behavior_binding zmk_sensor_keymap[ZMK_KEYMAP_LAYERS_LEN]
@ -143,6 +148,18 @@ int zmk_keymap_layer_to(uint8_t layer) {
return 0;
}
bool is_active_layer(uint8_t layer, zmk_keymap_layers_state_t layer_state) {
return (layer_state & BIT(layer)) == BIT(layer) || layer == _zmk_keymap_layer_default;
}
const char *zmk_keymap_layer_label(uint8_t layer) {
if (layer >= ZMK_KEYMAP_LAYERS_LEN) {
return NULL;
}
return zmk_keymap_layer_names[layer];
}
int zmk_keymap_apply_position_state(int layer, uint32_t position, bool pressed, int64_t timestamp) {
struct zmk_behavior_binding *binding = &zmk_keymap[layer][position];
const struct device *behavior;

View file

@ -346,6 +346,18 @@ int zmk_rgb_underglow_toggle() {
return zmk_rgb_underglow_save_state();
}
int zmk_rgb_underglow_set_hsb(uint16_t hue, uint8_t saturation, uint8_t brightness) {
if (hue > 360 || saturation > 100 || brightness > 100) {
return -ENOTSUP;
}
state.hue = hue;
state.saturation = saturation;
state.brightness = brightness;
return 0;
}
int zmk_rgb_underglow_change_hue(int direction) {
if (!led_strip)
return -ENODEV;

View file

@ -22,7 +22,7 @@ This will allow you to reference the actions defined in this header such as `RGB
Here is a table describing the action for each define:
| Define | Action |
| --------- | --------------------------------------------------------- |
| --------------- | ---------------------------------------------------------------------------------------------- |
| `RGB_TOG` | Toggles the RGB feature on and off |
| `RGB_HUI` | Increases the hue of the RGB feature |
| `RGB_HUD` | Decreases the hue of the RGB feature |
@ -34,6 +34,7 @@ Here is a table describing the action for each define:
| `RGB_SPD` | Decreases the speed of the RGB feature effect's animation |
| `RGB_EFF` | Cycles the RGB feature's effect forwards |
| `RGB_EFR` | Cycles the RGB feature's effect reverse |
| `RGB_COLOR_HSB` | Sets a specific [HSB (HSV)](https://en.wikipedia.org/wiki/HSL_and_HSV) value for the underglow |
## RGB Underglow
@ -42,10 +43,31 @@ The "RGB underglow" behavior completes an RGB action given on press.
### Behavior Binding
- Reference: `&rgb_ug`
- Parameter: The RGB action define, e.g. `RGB_TOG` or `RGB_BRI`
- Parameter #1: The RGB action define, e.g. `RGB_TOG` or `RGB_BRI`
- Parameter #2: Only applies to `RGB_COLOR_HSB` and is the HSB values of the color to set within parenthesis and separated by a common (see below for an example)
Example:
:::note HSB Values
```
&rgb_ug RGB_TOG
```
When specifying HSB values you'll need to use `RGB_COLOR_HSB(h, s, b)` in your keymap file. See below for an example.
Value Limits:
- Hue values can _not_ exceed 360 (degrees)
- Saturation values can _not_ exceed 100 (percent)
- Brightness values can _not_ exceed 100 (percent)
:::
### Examples
1. Toggle underglow on/off
```
&rgb_ug RGB_TOG
```
1. Set a specific HSB color (green)
```
&rgb_ug RGB_COLOR_HSB(128,100,100)
```

View file

@ -91,6 +91,9 @@ endif
```
Similarly to defining the halves of a split board in `Kconfig.shield` it is important to set the `ZMK_KEYBOARD_NAME` for each half of a split keyboard.
You'll also want to set which half is the central side. Most boards set it to the left.
Then on the peripheral half, you'll want to turn USB on so that it shows USB status on displays properly.
Finally, you'll want to turn on the split option for both sides. This can all be seen below.
```
if SHIELD_MY_BOARD_LEFT
@ -98,6 +101,9 @@ if SHIELD_MY_BOARD_LEFT
config ZMK_KEYBOARD_NAME
default "My Awesome Keyboard Left"
config ZMK_SPLIT_BLE_ROLE_CENTRAL
default y
endif
if SHIELD_MY_BOARD_RIGHT
@ -105,6 +111,13 @@ if SHIELD_MY_BOARD_RIGHT
config ZMK_KEYBOARD_NAME
default "My Awesome Keyboard Right"
endif
if SHIELD_MY_BOARD_LEFT || SHIELD_MY_BOARD_RIGHT
config ZMK_SPLIT
default y
endif
```
@ -203,6 +216,7 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,2) RC(4,9) RC(3,6) RC(3,7)
;
};
};
```
:::note
@ -264,24 +278,7 @@ For example, a split board called `my_awesome_split_board` would have the follow
- `my_awesome_split_board_left.conf` - Configuration elements only affect left half
- `my_awesome_split_board_right.conf` - Configuration elements only affect right half
For proper communication between keyboard halves and that between the central half and the computer,
the **the central and peripheral halves of the keyboard must be defined**. This can be seen below.
```
// Central Half (Usually the left side: my_awesome_split_board_left.conf)
CONFIG_ZMK_SPLIT=y
CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y
```
```
// Peripheral Half (Usually the right side: my_awesome_split_board_right.conf)
CONFIG_ZMK_SPLIT=y
CONFIG_ZMK_SPLIT_BLE_ROLE_Peripheral=y
```
Using the .conf file that affects both halves of a split board would be for adding features like deep-sleep or rotary encoders.
In most case you'll only need to use the .conf file that affects both halves of a split board. It's used for adding features like deep-sleep or rotary encoders.
```
// my_awesome_split_board.conf

View file

@ -20,8 +20,8 @@ It is recommended to only enable logging when needed, and not leaving it on by d
## Kconfig
The following KConfig values need to be set, either by copy and pasting into the `app/prj.conf` file, or by running
`west build -t menuconfig` and manually enabling the various settings in that UI.
The `CONFIG_ZMK_USB_LOGGING` KConfig value needs to be set, either by copy and pasting into the `app/prj.conf` file, or by running
`west build -t menuconfig` and manually enabling the setting in that UI at `ZMK -> Advanced -> USB Logging`.
:::note
If you are debugging your own keyboard in your [user config repository](./user-setup.md), use
@ -32,27 +32,7 @@ for you successfully.
```
# Turn on logging, and set ZMK logging to debug output
CONFIG_LOG=y
CONFIG_ZMK_LOG_LEVEL_DBG=y
# Turn on USB CDC ACM device
CONFIG_USB=y
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_CDC_ACM=y
CONFIG_USB_CDC_ACM_RINGBUF_SIZE=1024
CONFIG_USB_CDC_ACM_DEVICE_NAME="CDC_ACM"
CONFIG_USB_CDC_ACM_DEVICE_COUNT=1
# Enable serial console
CONFIG_SERIAL=y
CONFIG_CONSOLE=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_LINE_CTRL=y
# Enable USB UART, and set the console device
CONFIG_UART_CONSOLE=y
CONFIG_USB_UART_CONSOLE=y
CONFIG_UART_CONSOLE_ON_DEV_NAME="CDC_ACM_0"
CONFIG_ZMK_USB_LOGGING=y
```
## Viewing Logs

View file

@ -25,6 +25,7 @@ That being said, there are currently only a few specific [boards](/docs/faq#what
- [Kyria](https://splitkb.com/products/kyria-pcb-kit) (`kyria_left` and `kyria_right`)
- [Corne](https://github.com/foostan/crkbd) (`corne_left` and `corne_right`)
- [Helix](https://github.com/mcmadhatter/helix) (`helix_left` and `helix_right`)
- [Lily58](https://github.com/kata0510/Lily58) (`lily58_left` and `lily58_right`)
- [Sofle](https://github.com/josefadamcik/SofleKeyboard) (`sofle_left` and `sofle_right`)
- [Splitreus62](https://github.com/Na-Cly/splitreus62) (`splitreus62_left` and `splitreus62_right`)

View file

@ -23,17 +23,17 @@ ZMK is currently missing some features found in other popular firmware. This tab
| [Keyboard Codes](codes/#keyboard) | ✅ | ✅ | ✅ |
| [Media](codes/#media-controls) & [Consumer](codes/#consumer-controls) Codes | ✅ | ✅ | ✅ |
| [Encoders](features/encoders)[^1] | ✅ | | ✅ |
| [OLED Display Support](features/displays)[^2] | 🚧 | 🚧 | ✅ |
| [Display Support](features/displays)[^2] | 🚧 | 🚧 | ✅ |
| [RGB Underglow](features/underglow) | ✅ | ✅ | ✅ |
| One Shot Keys | 🚧 | ✅ | ✅ |
| Combo Keys | 🚧 | | ✅ |
| One Shot Keys | | ✅ | ✅ |
| [Combo Keys](https://github.com/zmkfirmware/zmk/pull/504) | 🚧 | | ✅ |
| Macros | 🚧 | ✅ | ✅ |
| Mouse Keys | | ✅ | ✅ |
| Mouse Keys | 💡 | ✅ | ✅ |
| Low Active Power Usage | ✅ | | |
| [Low Power Sleep States](https://github.com/zmkfirmware/zmk/pull/211) | 🚧 | ✅ | |
| [Low Power Mode (VCC Shutoff)](https://github.com/zmkfirmware/zmk/pull/242) | 🚧 | | |
| [Battery Reporting](https://github.com/zmkfirmware/zmk/issues/47) | 🚧 | ✅ | |
| Shell over BLE | | | |
| Low Power Sleep States | ✅ | ✅ | |
| [Low Power Mode (VCC Shutoff)](behaviors/power) | ✅ | | |
| Battery Reporting | ✅ | ✅ | |
| Shell over BLE | 💡 | | |
| Realtime Keymap Updating | 💡 | | ✅ |
| AVR/8 Bit | | | ✅ |
| [Wide Range of ARM Chips Supported](https://docs.zephyrproject.org/latest/boards/index.html) | ✅ | | |

View file

@ -54,7 +54,10 @@ Since then, a much simpler procedure of performing a bluetooth reset for split k
**New Procedure:**
1. Log into Github and download the "settings clear" UF2 image from the [latest build in Github Actions](https://github.com/zmkfirmware/zmk/actions?query=workflow%3ABuild+branch%3Amain)
1. [Open the GitHub `Actions` tab and select the `Build` workflow](https://github.com/zmkfirmware/zmk/actions?query=workflow%3ABuild+branch%3Amain).
1. Select the top 'result' on that page.
1. From the next page under "Artifacts", download the `$boardname-settings_reset-zmk` zip file.
1. Unzip the downloaded file.
1. Put each half of the split keyboard into bootloader mode
1. Flash one of the halves of the split with the "settings clear" UF2 image from step 1. Immediately after flashing "settings clear" to the chosen half, immediately put it into bootloader mode
to avoid accidental bonding between the halves.

View file

@ -1,5 +1,4 @@
# Copyright (c) 2020 The ZMK Contributors
#
# SPDX-License-Identifier: MIT
$ErrorActionPreference = "Stop"
@ -91,9 +90,9 @@ Write-Host "Keyboard Shield Selection:"
$prompt = "Pick a keyboard"
# TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos.
$options = "Kyria", "Lily58", "Corne", "Splitreus62", "Sofle", "Iris", "Reviung41", "RoMac", "RoMac+", "makerdiary M60", "Microdox", "TG4X", "QAZ", "NIBBLE", "Jorne", "Jian", "CRBN", "Tidbit", "Eek!", "BFO-9000"
$names = "kyria", "lily58", "corne", "splitreus62", "sofle", "iris", "reviung41", "romac", "romac_plus", "m60", "microdox", "tg4x", "qaz", "nibble", "jorne", "jian", "crbn", "tidbit", "eek", "bfo9000"
$splits = "y", "y", "y", "y", "y", "y", "n", "n", "n", "n", "y", "n", "n", "n", "y", "y", "n", "n", "n", "n"
$options = "Kyria", "Lily58", "Corne", "Splitreus62", "Sofle", "Iris", "Reviung41", "RoMac", "RoMac+", "makerdiary M60", "Microdox", "TG4X", "QAZ", "NIBBLE", "Jorne", "Jian", "CRBN", "Tidbit", "Eek!", "BFO-9000", "Helix"
$names = "kyria", "lily58", "corne", "splitreus62", "sofle", "iris", "reviung41", "romac", "romac_plus", "m60", "microdox", "tg4x", "qaz", "nibble", "jorne", "jian", "crbn", "tidbit", "eek", "bfo9000", "helix"
$splits = "y", "y", "y", "y", "y", "y", "n", "n", "n", "n", "y", "n", "n", "n", "y", "y", "n", "n", "n", "n", "y"
$choice = Get-Choice-From-Options -Options $options -Prompt $prompt
$shield_title = $($options[$choice])

View file

@ -1,7 +1,6 @@
#!/bin/bash
# Copyright (c) 2020 The ZMK Contributors
#
# SPDX-License-Identifier: MIT
set -e
@ -92,7 +91,7 @@ echo ""
echo "Keyboard Shield Selection:"
prompt="Pick an keyboard:"
options=("Kyria" "Lily58" "Corne" "Splitreus62" "Sofle" "Iris" "Reviung41" "RoMac" "RoMac+" "makerdiary M60" "Microdox" "TG4X" "QAZ" "Jorne" "Jian" "CRBN" "Tidbit" "Eek!" "BF0-9000")
options=("Kyria" "Lily58" "Corne" "Splitreus62" "Sofle" "Iris" "Reviung41" "RoMac" "RoMac+" "makerdiary M60" "Microdox" "TG4X" "QAZ" "NIBBLE" "Jorne" "Jian" "CRBN" "Tidbit" "Eek!" "BF0-9000" "Helix")
PS3="$prompt "
# TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos.
@ -120,7 +119,8 @@ select opt in "${options[@]}" "Quit"; do
17 ) shield_title="CRBN" shield="crbn"; split="n"; break;;
18 ) shield_title="Tidbit" shield="tidbit"; split="n" break;;
19 ) shield_title="Eek!" shield="eek"; split="n" break;;
17 ) shield_title="BFO-9000" shield="bfo9000"; split="y"; break;;
20 ) shield_title="BFO-9000" shield="bfo9000"; split="y"; break;;
21 ) shield_title="Helix" shield="helix"; split="y"; break;;
# Add link to docs on adding your own custom shield in your ZMK config!
# $(( ${#options[@]}+1 )) ) echo "Other!"; break;;