Corne with display dongle full compilation

This commit is contained in:
mctechnology17 2024-08-21 17:25:04 +02:00 committed by github-actions[bot]
parent 44e05230cf
commit 95d732af57
92 changed files with 5264 additions and 1881 deletions

BIN
config/boards/.DS_Store.gz Normal file

Binary file not shown.

View file

@ -0,0 +1,47 @@
#include <dt-bindings/led/led.h>
&pinctrl {
spi3_default: spi3_default {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
};
};
spi3_sleep: spi3_sleep {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
low-power-enable;
};
};
};
&spi3 {
compatible = "nordic,nrf-spim";
status = "okay";
pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_sleep>;
pinctrl-names = "default", "sleep";
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <4000000>;
/* WS2812 */
chain-length = <10>; /* arbitrary; change at will */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
};
};
/ {
chosen {
zmk,underglow = &led_strip;
};
};
// vim: filetype=dts fdm=marker:

View file

@ -0,0 +1,47 @@
#include <dt-bindings/led/led.h>
&pinctrl {
spi3_default: spi3_default {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
};
};
spi3_sleep: spi3_sleep {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
low-power-enable;
};
};
};
&spi3 {
compatible = "nordic,nrf-spim";
status = "okay";
pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_sleep>;
pinctrl-names = "default", "sleep";
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <4000000>;
/* WS2812 */
chain-length = <10>; /* arbitrary; change at will */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
};
};
/ {
chosen {
zmk,underglow = &led_strip;
};
};
// vim: filetype=dts fdm=marker:

View file

@ -25,7 +25,6 @@
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
label = "WS2812";
/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
@ -45,3 +44,4 @@
zmk,underglow = &led_strip;
};
};
// vim: filetype=dts fdm=marker:

View file

@ -0,0 +1,47 @@
#include <dt-bindings/led/led.h>
&pinctrl {
spi1_default: spi1_default {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
};
};
spi1_sleep: spi1_sleep {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
low-power-enable;
};
};
};
&spi1 {
compatible = "nordic,nrf-spim";
status = "okay";
pinctrl-0 = <&spi1_default>;
pinctrl-1 = <&spi1_sleep>;
pinctrl-names = "default", "sleep";
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <4000000>;
/* WS2812 */
chain-length = <10>; /* arbitrary; change at will */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
};
};
/ {
chosen {
zmk,underglow = &led_strip;
};
};
// vim: filetype=dts fdm=marker:

View file

@ -25,7 +25,7 @@
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
label = "WS2812";
// label = "WS2812";
/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
@ -45,3 +45,5 @@
zmk,underglow = &led_strip;
};
};
// vim: filetype=dts fdm=marker:

View file

@ -25,14 +25,14 @@
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
label = "WS2812";
// label = "WS2812";
/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <4000000>;
/* WS2812 10 default, cambie a 54*/
chain-length = <27>; /* There are per-key RGB, but the first 6 are underglow */
/* WS2812 */
chain-length = <10>; /* arbitrary; change at will */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;

View file

@ -0,0 +1,54 @@
if SHIELD_CORNE_LEFT || SHIELD_CORNE_DONGLE_XIAO || SHIELD_CORNE_DONGLE_PRO_MICRO
config ZMK_KEYBOARD_NAME
default "Corne"
config ZMK_SPLIT_ROLE_CENTRAL
default y
config ZMK_USB
default y
endif
if SHIELD_CORNE_LEFT || SHIELD_CORNE_RIGHT || SHIELD_CORNE_DONGLE_XIAO || SHIELD_CORNE_LEFT_PERIPHERAL || SHIELD_CORNE_DONGLE_PRO_MICRO
config ZMK_SPLIT
default y
if ZMK_DISPLAY
config I2C
default y
config SSD1306
default y
if SHIELD_CORNE_DONGLE_XIAO || SHIELD_CORNE_DONGLE_PRO_MICRO
choice ZMK_DISPLAY_WORK_QUEUE
default ZMK_DISPLAY_WORK_QUEUE_DEDICATED
endchoice
endif
endif # ZMK_DISPLAY
if LVGL
config LV_Z_VDB_SIZE
default 64
config LV_DPI_DEF
default 148
config LV_Z_BITS_PER_PIXEL
default 1
choice LV_COLOR_DEPTH
default LV_COLOR_DEPTH_1
endchoice
endif # LVGL
endif

View file

@ -0,0 +1,17 @@
# Copyright (c) 2020 Pete Johanson
# SPDX-License-Identifier: MIT
config SHIELD_CORNE_LEFT
def_bool $(shields_list_contains,corne_left)
config SHIELD_CORNE_RIGHT
def_bool $(shields_list_contains,corne_right)
config SHIELD_CORNE_DONGLE_XIAO
def_bool $(shields_list_contains,corne_dongle_xiao)
config SHIELD_CORNE_LEFT_PERIPHERAL
def_bool $(shields_list_contains,corne_left_peripheral)
config SHIELD_CORNE_DONGLE_PRO_MICRO
def_bool $(shields_list_contains,corne_dongle_pro_micro)

View file

@ -0,0 +1,46 @@
#include <dt-bindings/led/led.h>
&pinctrl {
spi3_default: spi3_default {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
};
};
spi3_sleep: spi3_sleep {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
low-power-enable;
};
};
};
&spi3 {
compatible = "nordic,nrf-spim";
status = "okay";
pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_sleep>;
pinctrl-names = "default", "sleep";
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <4000000>;
/* WS2812 */
chain-length = <10>; /* arbitrary; change at will */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
};
};
/ {
chosen {
zmk,underglow = &led_strip;
};
};

View file

@ -0,0 +1,46 @@
#include <dt-bindings/led/led.h>
&pinctrl {
spi3_default: spi3_default {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
};
};
spi3_sleep: spi3_sleep {
group1 {
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
low-power-enable;
};
};
};
&spi3 {
compatible = "nordic,nrf-spim";
status = "okay";
pinctrl-0 = <&spi3_default>;
pinctrl-1 = <&spi3_sleep>;
pinctrl-names = "default", "sleep";
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <4000000>;
/* WS2812 */
chain-length = <10>; /* arbitrary; change at will */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
};
};
/ {
chosen {
zmk,underglow = &led_strip;
};
};

View file

@ -0,0 +1,6 @@
# Uncomment the following lines to enable the Corne RGB Underglow
# CONFIG_ZMK_RGB_UNDERGLOW=y
# CONFIG_WS2812_STRIP=y
# Uncomment the following line to enable the Corne OLED Display
# CONFIG_ZMK_DISPLAY=y

View file

@ -0,0 +1,83 @@
/*
* Copyright (c) 2020 Pete Johanson
*
* SPDX-License-Identifier: MIT
*/
#include <dt-bindings/zmk/matrix_transform.h>
/ {
chosen {
zephyr,display = &oled;
zmk,kscan = &kscan0;
zmk,matrix-transform = &default_transform;
};
default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <12>;
rows = <4>;
// | 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 | | SW21 | SW20 | SW19 |
map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11)
RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8)
>;
};
five_column_transform: keymap_transform_1 {
compatible = "zmk,matrix-transform";
columns = <10>;
rows = <4>;
// | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 |
// | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 |
// | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 |
// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 |
map = <
RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10)
RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10)
RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10)
RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8)
>;
};
kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix";
wakeup-source;
diode-direction = "col2row";
row-gpios
= <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
};
// TODO: per-key RGB node(s)?
};
&pro_micro_i2c {
status = "okay";
oled: ssd1306@3c {
compatible = "solomon,ssd1306fb";
reg = <0x3c>;
width = <128>;
height = <32>;
segment-offset = <0>;
page-offset = <0>;
display-offset = <0>;
multiplex-ratio = <31>;
segment-remap;
com-invdir;
com-sequential;
inversion-on;
prechargep = <0x22>;
};
};

View file

@ -0,0 +1,58 @@
// #include "../../../corne.keymap"
/*
* 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>
/ {
keymap {
compatible = "zmk,keymap";
default_layer {
// -----------------------------------------------------------------------------------------
// | TAB | Q | W | E | R | T | | Y | U | I | O | P | BKSP |
// | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' |
// | SHFT | Z | X | C | V | B | | N | M | , | . | / | ESC |
// | GUI | LWR | SPC | | ENT | RSE | ALT |
bindings = <
&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 N &kp M &kp COMMA &kp DOT &kp FSLH &kp ESC
&kp LGUI &mo 1 &kp SPACE &kp RET &mo 2 &kp RALT
>;
};
lower_layer {
// -----------------------------------------------------------------------------------------
// | TAB | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BKSP |
// | BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 | | LFT | DWN | UP | RGT | | |
// | SHFT | | | | | | | | | | | | |
// | GUI | | SPC | | ENT | | ALT |
bindings = <
&kp TAB &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &trans
&kp LSHFT &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT
>;
};
raise_layer {
// -----------------------------------------------------------------------------------------
// | TAB | ! | @ | # | $ | % | | ^ | & | * | ( | ) | BKSP |
// | CTRL | | | | | | | - | = | [ | ] | \ | ` |
// | SHFT | | | | | | | _ | + | { | } | "|" | ~ |
// | GUI | | SPC | | ENT | | ALT |
bindings = <
&kp TAB &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR &kp BSPC
&kp LCTRL &trans &trans &trans &trans &trans &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE
&kp LSHFT &trans &trans &trans &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE
&kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT
>;
};
};
};

View file

@ -0,0 +1,17 @@
file_format: "1"
id: corne
name: Corne
type: shield
url: https://github.com/foostan/crkbd/
requires: [pro_micro]
exposes: [i2c_oled]
features:
- keys
- display
- underglow
siblings:
- corne_left
- corne_right
- corne_left_peripheral
- corne_dongle_xiao
- corne_dongle_pro_micro

View file

@ -0,0 +1,49 @@
# MC:
# compatible with all versions of nrf52840 (pro micro):
# - nice_nano (not tested)
# - nice_nano_v2 (tested)
# - nice_nano_v2 (super mini -> nice_nano_v2 clon) (tested)
# - nrfmicro_11 (not tested)
# - nrfmicro_11_flipped (not tested)
# - nrfmicro_13 (not tested)
# - puchi_ble_v1 (tested)
# 3 profiles (n+2)
CONFIG_BT_MAX_CONN=5
CONFIG_BT_MAX_PAIRED=5
# dongle mode
CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS=2
# display
CONFIG_ZMK_DISPLAY=y
CONFIG_BT_BAS=n
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y
# enable logging and configure zmk logging to debug output
# CONFIG_ZMK_USB_LOGGING=y
# CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=8000
### POWER OPTIONS
CONFIG_ZMK_EXT_POWER=y
# the battery power report interval unit is seconds
CONFIG_ZMK_BATTERY_REPORT_INTERVAL=60
# MC: changed so that he always stays awake
CONFIG_ZMK_SLEEP=n
# 1800000 milliseconds = 30 minutes * 60 seconds * 1000
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000
# number of milliseconds of inactivity before entering idle state
CONFIG_ZMK_IDLE_TIMEOUT=60000
# add keyboard bounce
# CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=5
# CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5
# Increase the transmission power of the keyboard ble radio to solve the
# problem of left and right delay and poor communication.
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y
# change default keyboard display name
# CONFIG_ZMK_KEYBOARD_NAME="Nice_Dongle_Oled"
CONFIG_ZMK_MOUSE=y
### Improves compatibility with iPad
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y

View file

@ -0,0 +1,153 @@
#include <dt-bindings/zmk/matrix_transform.h>
/ {
chosen {
zmk,kscan = &mock_kscan;
zmk,matrix-transform = &default_transform;
zephyr,display = &oled;
};
default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <12>;
rows = <4>;
// | 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 | | SW21 | SW20 | SW19 |
map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11)
RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8)
>;
};
five_column_transform: keymap_transform_1 {
compatible = "zmk,matrix-transform";
columns = <10>;
rows = <4>;
// | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 |
// | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 |
// | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 |
// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 |
map = <
RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10)
RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10)
RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10)
RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8)
>;
};
mock_kscan: kscan_0 {
compatible = "zmk,kscan-mock";
// wakeup-source;
columns = <0>;
rows = <0>;
events = <0>;
};
// TODO: per-key RGB node(s)?
};
&pro_micro_i2c {
status = "okay";
oled: ssd1306@3c {
compatible = "solomon,ssd1306fb";
reg = <0x3c>;
width = <128>;
height = <64>;
segment-offset = <0>;
page-offset = <0>;
display-offset = <0>;
multiplex-ratio = <63>;
segment-remap;
com-invdir;
inversion-on;
prechargep = <0x22>;
};
};
/*
// 128x64 OLED
&pro_micro_i2c {
status = "okay";
oled: ssd1306@3c {
compatible = "solomon,ssd1306fb";
reg = <0x3c>;
width = <128>;
height = <64>;
segment-offset = <0>;
page-offset = <0>;
display-offset = <0>;
multiplex-ratio = <63>;
segment-remap;
com-invdir;
inversion-on;
prechargep = <0x22>;
};
};
// 128x32 OLED
&pro_micro_i2c {
status = "okay";
oled: ssd1306@3c {
compatible = "solomon,ssd1306fb";
reg = <0x3c>;
width = <128>;
height = <32>;
segment-offset = <0>;
page-offset = <0>;
display-offset = <0>;
multiplex-ratio = <31>;
segment-remap;
com-invdir;
com-sequential;
inversion-on;
prechargep = <0x22>;
};
};
// 128x64 OLED model sh1106
&pro_micro_i2c {
status = "okay";
oled: sh1106@3c {
compatible = "sinowealth,sh1106";
reg = <0x3c>;
width = <129>;
height = <64>;
segment-offset = <1>;
page-offset = <0>;
display-offset = <0>;
multiplex-ratio = <63>;
segment-remap;
com-invdir;
inversion-on;
prechargep = <0x22>;
};
};
// 128x128 OLED model sh1107
&pro_micro_i2c {
status = "okay";
oled: sh1106@3c {
compatible = "sinowealth,sh1106";
reg = <0x3c>;
width = <120>;
height = <128>;
segment-offset = <0>;
page-offset = <0>;
display-offset = <0>;
multiplex-ratio = <119>;
segment-remap;
com-invdir;
inversion-on;
prechargep = <0x22>;
};
};
*/
// vim: filetype=dts fdm=marker:

View file

@ -0,0 +1,43 @@
# MC:
# compatible with all versions of nrf52840 (xiao):
# - seeeduino_xiao_ble (tested)
# 3 profiles (n+2)
CONFIG_BT_MAX_CONN=5
CONFIG_BT_MAX_PAIRED=5
# dongle mode
CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS=2
# display
CONFIG_ZMK_DISPLAY=y
CONFIG_BT_BAS=n
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y
# enable logging and configure zmk logging to debug output
# CONFIG_ZMK_USB_LOGGING=y
# CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=8000
### POWER OPTIONS
CONFIG_ZMK_EXT_POWER=y
# the battery power report interval unit is seconds
CONFIG_ZMK_BATTERY_REPORT_INTERVAL=60
# MC: changed so that he always stays awake
CONFIG_ZMK_SLEEP=n
# 1800000 milliseconds = 30 minutes * 60 seconds * 1000
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000
# number of milliseconds of inactivity before entering idle state
CONFIG_ZMK_IDLE_TIMEOUT=60000
# add keyboard bounce
# CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=5
# CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5
# Increase the transmission power of the keyboard ble radio to solve the
# problem of left and right delay and poor communication.
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y
# change default keyboard display name
# CONFIG_ZMK_KEYBOARD_NAME="Nice_Dongle_Oled"
CONFIG_ZMK_MOUSE=y
### Improves compatibility with iPad
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y

View file

@ -0,0 +1,184 @@
/*
* Copyright (c) 2020 Pete Johanson
*
* SPDX-License-Identifier: MIT
*/
#include <dt-bindings/zmk/matrix_transform.h>
/ {
chosen {
zmk,kscan = &mock_kscan;
zmk,matrix-transform = &default_transform;
zephyr,display = &oled;
};
default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <12>;
rows = <4>;
// | 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 | | SW21 | SW20 | SW19 |
map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11)
RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8)
>;
};
five_column_transform: keymap_transform_1 {
compatible = "zmk,matrix-transform";
columns = <10>;
rows = <4>;
// | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 |
// | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 |
// | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 |
// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 |
map = <
RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10)
RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10)
RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10)
RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8)
>;
};
mock_kscan: kscan_0 {
compatible = "zmk,kscan-mock";
// wakeup-source;
columns = <0>;
rows = <0>;
events = <0>;
};
// TODO: per-key RGB node(s)?
};
&xiao_i2c {
status = "okay";
oled: sh1106@3c {
compatible = "sinowealth,sh1106";
reg = <0x3c>;
width = <120>;
height = <128>;
segment-offset = <0>;
page-offset = <0>;
display-offset = <0>;
multiplex-ratio = <119>;
segment-remap;
com-invdir;
inversion-on;
prechargep = <0x22>;
};
};
/*
// 128x64 OLED
&xiao_i2c {
status = "okay";
oled: ssd1306@3c {
compatible = "solomon,ssd1306fb";
reg = <0x3c>;
width = <128>;
height = <64>;
segment-offset = <0>;
page-offset = <0>;
display-offset = <0>;
multiplex-ratio = <63>;
segment-remap;
com-invdir;
inversion-on;
prechargep = <0x22>;
};
};
// 128x32 OLED
&xiao_i2c {
status = "okay";
oled: ssd1306@3c {
compatible = "solomon,ssd1306fb";
reg = <0x3c>;
width = <128>;
height = <32>;
segment-offset = <0>;
page-offset = <0>;
display-offset = <0>;
multiplex-ratio = <31>;
segment-remap;
com-invdir;
com-sequential;
inversion-on;
prechargep = <0x22>;
};
};
// 128x64 OLED model sh1106
&xiao_i2c {
status = "okay";
oled: sh1106@3c {
compatible = "sinowealth,sh1106";
reg = <0x3c>;
width = <129>;
height = <64>;
segment-offset = <1>;
page-offset = <0>;
display-offset = <0>;
multiplex-ratio = <63>;
segment-remap;
com-invdir;
inversion-on;
prechargep = <0x22>;
};
};
// 128x128 OLED model sh1107
&xiao_i2c {
status = "okay";
oled: sh1106@3c {
compatible = "sinowealth,sh1106";
reg = <0x3c>;
width = <120>;
height = <128>;
segment-offset = <0>;
page-offset = <0>;
display-offset = <0>;
multiplex-ratio = <119>;
segment-remap;
com-invdir;
inversion-on;
prechargep = <0x22>;
};
};
// TODO: niceview
&pinctrl {
spi0_default: spi0_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 5)>,
<NRF_PSEL(SPIM_MOSI, 0, 4)>,
<NRF_PSEL(SPIM_MISO, 0, 8)>;
};
};
spi0_sleep: spi0_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 5)>, // D5
<NRF_PSEL(SPIM_MOSI, 0, 4)>, // D4
<NRF_PSEL(SPIM_MISO, 0, 8)>;
low-power-enable;
};
};
};
nice_view_spi: &spi0 {
compatible = "nordic,nrf-spim";
pinctrl-0 = <&spi0_default>;
pinctrl-1 = <&spi0_sleep>;
pinctrl-names = "default", "sleep";
cs-gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; // D6
};
*/
// vim: filetype=dts fdm=marker:

View file

@ -0,0 +1,43 @@
### OLED Display
# CONFIG_ZMK_DISPLAY=y
# esto creo que ya no es necesario
# CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
# CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y
# Enable and adjust nice!view
CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y
# CONFIG_ZMK_WIDGET_WPM_STATUS=n
CONFIG_ZMK_WIDGET_LAYER_STATUS=y
CONFIG_ZMK_WIDGET_BATTERY_STATUS=y
CONFIG_ZMK_WIDGET_OUTPUT_STATUS=y
# Disable in-built nice!view widget
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y
# Enable custom nice!view widget
CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_26=y
CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y
# Increase the bluetooth transmission power
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y
### POWER OPTIONS
# CONFIG_ZMK_EXT_POWER=y
# CONFIG_ZMK_SLEEP=n
# 1800000 milisegundos = 30 minutos * 60 segundos * 1000
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000
# Número de milisegundos de inactividad antes de entrar en estado inactivo
# CONFIG_ZMK_IDLE_TIMEOUT=60000
### MOUSE
CONFIG_ZMK_MOUSE=y
### Improves compatibility with iPad
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y
### HID para nice!view ePaperDisplay
# Enable eager debouncing
# "Eager Debouncing"
# Trying to lower the input lag.
CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1
CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5

View file

@ -0,0 +1,18 @@
/*
* Copyright (c) 2020 Pete Johanson
*
* SPDX-License-Identifier: MIT
*/
#include "corne.dtsi"
&kscan0 {
col-gpios
= <&pro_micro 21 GPIO_ACTIVE_HIGH>
, <&pro_micro 20 GPIO_ACTIVE_HIGH>
, <&pro_micro 19 GPIO_ACTIVE_HIGH>
, <&pro_micro 18 GPIO_ACTIVE_HIGH>
, <&pro_micro 15 GPIO_ACTIVE_HIGH>
, <&pro_micro 14 GPIO_ACTIVE_HIGH>
;
};

View file

@ -0,0 +1,38 @@
# Increase the bluetooth transmission power
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y
### MOUSE
CONFIG_ZMK_MOUSE=y
### POWER OPTIONS
# CONFIG_ZMK_EXT_POWER=y
# CONFIG_ZMK_SLEEP=n
# 1800000 milisegundos = 30 minutos * 60 segundos * 1000
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000
# Número de milisegundos de inactividad antes de entrar en estado inactivo
# CONFIG_ZMK_IDLE_TIMEOUT=60000
# Enable and adjust nice!view
CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y
CONFIG_ZMK_WIDGET_BATTERY_STATUS=y
# Disable other widgets, because don't work with pheripherals
CONFIG_ZMK_WIDGET_WPM_STATUS=n
CONFIG_ZMK_WIDGET_LAYER_STATUS=n
CONFIG_ZMK_WIDGET_OUTPUT_STATUS=n
# Disable in-built nice!view widget
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y
# Enable custom nice!view widget
CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_26=y
CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y
### Improves compatibility with iPad
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y
### HID para nice!view ePaperDisplay
# Enable eager debouncing
# "Eager Debouncing"
# Trying to lower the input lag.
CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1
CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5

View file

@ -0,0 +1,18 @@
/*
* Copyright (c) 2020 Pete Johanson
*
* SPDX-License-Identifier: MIT
*/
#include "corne.dtsi"
&kscan0 {
col-gpios
= <&pro_micro 21 GPIO_ACTIVE_HIGH>
, <&pro_micro 20 GPIO_ACTIVE_HIGH>
, <&pro_micro 19 GPIO_ACTIVE_HIGH>
, <&pro_micro 18 GPIO_ACTIVE_HIGH>
, <&pro_micro 15 GPIO_ACTIVE_HIGH>
, <&pro_micro 14 GPIO_ACTIVE_HIGH>
;
};

View file

@ -0,0 +1,38 @@
# Increase the bluetooth transmission power
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y
### MOUSE
CONFIG_ZMK_MOUSE=y
### POWER OPTIONS
# CONFIG_ZMK_EXT_POWER=y
# CONFIG_ZMK_SLEEP=n
# 1800000 milisegundos = 30 minutos * 60 segundos * 1000
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000
# Número de milisegundos de inactividad antes de entrar en estado inactivo
# CONFIG_ZMK_IDLE_TIMEOUT=60000
# Enable and adjust nice!view
CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y
CONFIG_ZMK_WIDGET_BATTERY_STATUS=y
# Disable other widgets, because don't work with pheripherals
CONFIG_ZMK_WIDGET_WPM_STATUS=n
CONFIG_ZMK_WIDGET_LAYER_STATUS=n
CONFIG_ZMK_WIDGET_OUTPUT_STATUS=n
# Disable in-built nice!view widget
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y
# Enable custom nice!view widget
CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_26=y
CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y
### Improves compatibility with iPad
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y
### HID para nice!view ePaperDisplay
# Enable eager debouncing
# "Eager Debouncing"
# Trying to lower the input lag.
CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1
CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5

View file

@ -0,0 +1,26 @@
/*
* Copyright (c) 2020 Pete Johanson
*
* SPDX-License-Identifier: MIT
*/
#include "corne.dtsi"
&default_transform {
col-offset = <6>;
};
&five_column_transform {
col-offset = <6>;
};
&kscan0 {
col-gpios
= <&pro_micro 14 GPIO_ACTIVE_HIGH>
, <&pro_micro 15 GPIO_ACTIVE_HIGH>
, <&pro_micro 18 GPIO_ACTIVE_HIGH>
, <&pro_micro 19 GPIO_ACTIVE_HIGH>
, <&pro_micro 20 GPIO_ACTIVE_HIGH>
, <&pro_micro 21 GPIO_ACTIVE_HIGH>
;
};

View file

@ -0,0 +1,18 @@
if(CONFIG_ZMK_DISPLAY AND CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM AND ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL))
zephyr_library()
zephyr_library_sources(${ZEPHYR_BASE}/misc/empty_file.c)
zephyr_library_include_directories(${ZEPHYR_LVGL_MODULE_DIR})
zephyr_library_include_directories(${ZEPHYR_BASE}/lib/gui/lvgl/)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
zephyr_library_include_directories(${CMAKE_SOURCE_DIR}/include)
zephyr_library_sources(custom_status_screen.c)
zephyr_library_sources(widgets/battery_status.c)
zephyr_library_sources(widgets/bongo_cat.c)
zephyr_library_sources(widgets/bongo_cat_images.c)
target_sources_ifdef(CONFIG_ZMK_HID_INDICATORS app PRIVATE widgets/hid_indicators.c)
zephyr_library_sources(widgets/layer_status.c)
zephyr_library_sources(widgets/modifiers.c)
zephyr_library_sources(widgets/modifiers_sym.c)
zephyr_library_sources(widgets/output_status.c)
zephyr_library_sources(widgets/output_status_sym.c)
endif()

View file

@ -0,0 +1,41 @@
# Copyright (c) 2024 The ZMK Contributors
# SPDX-License-Identifier: MIT
if SHIELD_DONGLE_DISPLAY
choice ZMK_DISPLAY_STATUS_SCREEN
default ZMK_DISPLAY_STATUS_SCREEN_CUSTOM
endchoice
config ZMK_DISPLAY_STATUS_SCREEN_CUSTOM
select LV_USE_LABEL
select LV_USE_IMG
select LV_USE_CANVAS
select LV_USE_ANIMIMG
select LV_USE_ANIMATION
select LV_USE_LINE
select LV_FONT_UNSCII_8
select ZMK_WPM
imply ZMK_HID_INDICATORS
choice ZMK_DISPLAY_WORK_QUEUE
default ZMK_DISPLAY_WORK_QUEUE_DEDICATED
endchoice
config LV_Z_MEM_POOL_SIZE
default 8192
config LV_Z_VDB_SIZE
default 64
config LV_DPI_DEF
default 148
config LV_Z_BITS_PER_PIXEL
default 1
choice LV_COLOR_DEPTH
default LV_COLOR_DEPTH_1
endchoice
endif

View file

@ -0,0 +1,5 @@
# Copyright (c) 2024 The ZMK Contributors
# SPDX-License-Identifier: MIT
config SHIELD_DONGLE_DISPLAY
def_bool $(shields_list_contains,dongle_display)

View file

@ -0,0 +1,63 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include "custom_status_screen.h"
#include "widgets/battery_status.h"
#include "widgets/modifiers.h"
#include "widgets/bongo_cat.h"
#include "widgets/layer_status.h"
#include "widgets/output_status.h"
#include "widgets/hid_indicators.h"
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
static struct zmk_widget_output_status output_status_widget;
static struct zmk_widget_layer_status layer_status_widget;
static struct zmk_widget_peripheral_battery_status peripheral_battery_status_widget;
static struct zmk_widget_modifiers modifiers_widget;
static struct zmk_widget_bongo_cat bongo_cat_widget;
#if IS_ENABLED(CONFIG_ZMK_HID_INDICATORS)
static struct zmk_widget_hid_indicators hid_indicators_widget;
#endif
lv_style_t global_style;
lv_obj_t *zmk_display_status_screen() {
lv_obj_t *screen;
screen = lv_obj_create(NULL);
lv_style_init(&global_style);
lv_style_set_text_font(&global_style, &lv_font_unscii_8);
lv_style_set_text_letter_space(&global_style, 1);
lv_style_set_text_line_space(&global_style, 1);
lv_obj_add_style(screen, &global_style, LV_PART_MAIN);
zmk_widget_output_status_init(&output_status_widget, screen);
lv_obj_align(zmk_widget_output_status_obj(&output_status_widget), LV_ALIGN_TOP_LEFT, 0, 0);
zmk_widget_bongo_cat_init(&bongo_cat_widget, screen);
lv_obj_align(zmk_widget_bongo_cat_obj(&bongo_cat_widget), LV_ALIGN_BOTTOM_RIGHT, 0, -7);
zmk_widget_modifiers_init(&modifiers_widget, screen);
lv_obj_align(zmk_widget_modifiers_obj(&modifiers_widget), LV_ALIGN_BOTTOM_LEFT, 0, 0);
#if IS_ENABLED(CONFIG_ZMK_HID_INDICATORS)
zmk_widget_hid_indicators_init(&hid_indicators_widget, screen);
lv_obj_align_to(zmk_widget_hid_indicators_obj(&hid_indicators_widget), zmk_widget_modifiers_obj(&modifiers_widget), LV_ALIGN_OUT_TOP_LEFT, 0, -2);
#endif
zmk_widget_layer_status_init(&layer_status_widget, screen);
// lv_obj_align(zmk_widget_layer_status_obj(&layer_status_widget), LV_ALIGN_BOTTOM_LEFT, 2, -18);
lv_obj_align_to(zmk_widget_layer_status_obj(&layer_status_widget), zmk_widget_bongo_cat_obj(&bongo_cat_widget), LV_ALIGN_BOTTOM_LEFT, 0, 5);
zmk_widget_peripheral_battery_status_init(&peripheral_battery_status_widget, screen);
lv_obj_align(zmk_widget_peripheral_battery_status_obj(&peripheral_battery_status_widget), LV_ALIGN_TOP_RIGHT, 0, 0);
return screen;
}

View file

@ -0,0 +1,12 @@
/*
*
* Copyright (c) 2024 The ZMK Contributors
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <lvgl.h>
lv_obj_t *zmk_display_status_screen();

View file

@ -0,0 +1,17 @@
CONFIG_ZMK_DISPLAY=y
CONFIG_BT_BAS=n
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y
# The battery power report interval unit is seconds
CONFIG_ZMK_BATTERY_REPORT_INTERVAL=60
CONFIG_ZMK_SLEEP=n
# 1800000 milliseconds = 30 minutes * 60 seconds * 1000
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000
# number of milliseconds of inactivity before entering idle state
CONFIG_ZMK_IDLE_TIMEOUT=60000
# add keyboard bounce
# CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=5
# CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5
# Increase the transmission power of the keyboard ble radio to solve
# the problem of left and right delay and poor communication.
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_ZMK_MOUSE=y

View file

@ -0,0 +1,5 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

View file

@ -0,0 +1,7 @@
file_format: "1"
id: dongle_display
name: dongle_display
type: shield
url: https://github.com/englmaxi/zmk-config
requires:
- i2c_oled

View file

@ -0,0 +1,115 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <zephyr/kernel.h>
#include <zephyr/bluetooth/services/bas.h>
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
#include <zmk/display.h>
#include <zmk/display/widgets/battery_status.h>
#include <zmk/usb.h>
#include <zmk/ble.h>
#include <zmk/events/usb_conn_state_changed.h>
#include <zmk/event_manager.h>
#include <zmk/events/battery_state_changed.h>
#include "battery_status.h"
static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets);
struct peripheral_battery_state {
uint8_t source;
uint8_t level;
};
static lv_color_t battery_image_buffer[ZMK_SPLIT_BLE_PERIPHERAL_COUNT][5 * 8];
static void draw_battery(lv_obj_t *canvas, uint8_t level) {
lv_canvas_fill_bg(canvas, lv_color_black(), LV_OPA_COVER);
lv_draw_rect_dsc_t rect_fill_dsc;
lv_draw_rect_dsc_init(&rect_fill_dsc);
rect_fill_dsc.bg_color = lv_color_white();
lv_canvas_set_px(canvas, 0, 0, lv_color_white());
lv_canvas_set_px(canvas, 4, 0, lv_color_white());
if (level > 90) {
// full
} else if (level > 70) {
lv_canvas_draw_rect(canvas, 1, 2, 3, 1, &rect_fill_dsc);
} else if (level > 50) {
lv_canvas_draw_rect(canvas, 1, 2, 3, 2, &rect_fill_dsc);
} else if (level > 30) {
lv_canvas_draw_rect(canvas, 1, 2, 3, 3, &rect_fill_dsc);
} else if (level > 10) {
lv_canvas_draw_rect(canvas, 1, 2, 3, 4, &rect_fill_dsc);
} else {
lv_canvas_draw_rect(canvas, 1, 2, 3, 5, &rect_fill_dsc);
}
}
static void set_battery_symbol(lv_obj_t *widget, struct peripheral_battery_state state) {
lv_obj_t *symbol = lv_obj_get_child(widget, state.source * 2);
lv_obj_t *label = lv_obj_get_child(widget, state.source * 2 + 1);
draw_battery(symbol, state.level);
lv_label_set_text_fmt(label, "%3u%%", state.level);
if (state.level > 0) {
lv_obj_clear_flag(symbol, LV_OBJ_FLAG_HIDDEN);
lv_obj_clear_flag(label, LV_OBJ_FLAG_HIDDEN);
} else {
lv_obj_add_flag(symbol, LV_OBJ_FLAG_HIDDEN);
lv_obj_add_flag(label, LV_OBJ_FLAG_HIDDEN);
}
}
void battery_status_update_cb(struct peripheral_battery_state state) {
struct zmk_widget_battery_status *widget;
SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_battery_symbol(widget->obj, state); }
}
static struct peripheral_battery_state battery_status_get_state(const zmk_event_t *eh) {
const struct zmk_peripheral_battery_state_changed *ev = as_zmk_peripheral_battery_state_changed(eh);
return (struct peripheral_battery_state){
.source = ev->source,
.level = ev->state_of_charge,
};
}
ZMK_DISPLAY_WIDGET_LISTENER(widget_battery_status, struct peripheral_battery_state,
battery_status_update_cb, battery_status_get_state)
ZMK_SUBSCRIPTION(widget_battery_status, zmk_peripheral_battery_state_changed);
int zmk_widget_peripheral_battery_status_init(struct zmk_widget_peripheral_battery_status *widget, lv_obj_t *parent) {
widget->obj = lv_obj_create(parent);
lv_obj_set_size(widget->obj, LV_SIZE_CONTENT, LV_SIZE_CONTENT);
for (int i = 0; i < ZMK_SPLIT_BLE_PERIPHERAL_COUNT; i++) {
lv_obj_t *image_canvas = lv_canvas_create(widget->obj);
lv_obj_t *battery_label = lv_label_create(widget->obj);
lv_canvas_set_buffer(image_canvas, battery_image_buffer[i], 5, 8, LV_IMG_CF_TRUE_COLOR);
lv_obj_align(image_canvas, LV_ALIGN_TOP_RIGHT, 0, i * 10);
lv_obj_align(battery_label, LV_ALIGN_TOP_RIGHT, -7, i * 10);
}
sys_slist_append(&widgets, &widget->node);
widget_battery_status_init();
return 0;
}
lv_obj_t *zmk_widget_peripheral_battery_status_obj(struct zmk_widget_peripheral_battery_status *widget) {
return widget->obj;
}

View file

@ -0,0 +1,18 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#pragma once
#include <lvgl.h>
#include <zephyr/kernel.h>
struct zmk_widget_peripheral_battery_status {
sys_snode_t node;
lv_obj_t *obj;
};
int zmk_widget_peripheral_battery_status_init(struct zmk_widget_peripheral_battery_status *widget, lv_obj_t *parent);
lv_obj_t *zmk_widget_peripheral_battery_status_obj(struct zmk_widget_peripheral_battery_status *widget);

View file

@ -0,0 +1,148 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <zephyr/kernel.h>
#include <zephyr/bluetooth/services/bas.h>
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
#include <zmk/display.h>
#include <zmk/event_manager.h>
#include <zmk/events/wpm_state_changed.h>
#include <zmk/wpm.h>
#include "bongo_cat.h"
#define SRC(array) (const void **)array, sizeof(array) / sizeof(lv_img_dsc_t *)
static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets);
LV_IMG_DECLARE(bongo_cat_none);
LV_IMG_DECLARE(bongo_cat_left1);
LV_IMG_DECLARE(bongo_cat_left2);
LV_IMG_DECLARE(bongo_cat_right1);
LV_IMG_DECLARE(bongo_cat_right2);
LV_IMG_DECLARE(bongo_cat_both1);
LV_IMG_DECLARE(bongo_cat_both1_open);
LV_IMG_DECLARE(bongo_cat_both2);
#define ANIMATION_SPEED_IDLE 10000
const lv_img_dsc_t *idle_imgs[] = {
&bongo_cat_both1_open,
&bongo_cat_both1_open,
&bongo_cat_both1_open,
&bongo_cat_both1,
};
#define ANIMATION_SPEED_SLOW 2000
const lv_img_dsc_t *slow_imgs[] = {
&bongo_cat_left1,
&bongo_cat_both1,
&bongo_cat_both1,
&bongo_cat_right1,
&bongo_cat_both1,
&bongo_cat_both1,
&bongo_cat_left1,
&bongo_cat_both1,
&bongo_cat_both1,
};
#define ANIMATION_SPEED_MID 500
const lv_img_dsc_t *mid_imgs[] = {
&bongo_cat_left2,
&bongo_cat_left1,
&bongo_cat_none,
&bongo_cat_right2,
&bongo_cat_right1,
&bongo_cat_none,
};
#define ANIMATION_SPEED_FAST 200
const lv_img_dsc_t *fast_imgs[] = {
&bongo_cat_both2,
&bongo_cat_both1,
&bongo_cat_none,
&bongo_cat_none,
};
struct bongo_cat_wpm_status_state {
uint8_t wpm;
};
enum anim_state {
anim_state_none,
anim_state_idle,
anim_state_slow,
anim_state_mid,
anim_state_fast
} current_anim_state;
static void set_animation(lv_obj_t *animing, struct bongo_cat_wpm_status_state state) {
if (state.wpm < 5) {
if (current_anim_state != anim_state_idle) {
lv_animimg_set_src(animing, SRC(idle_imgs));
lv_animimg_set_duration(animing, ANIMATION_SPEED_IDLE);
lv_animimg_set_repeat_count(animing, LV_ANIM_REPEAT_INFINITE);
lv_animimg_start(animing);
current_anim_state = anim_state_idle;
}
} else if (state.wpm < 30) {
if (current_anim_state != anim_state_slow) {
lv_animimg_set_src(animing, SRC(slow_imgs));
lv_animimg_set_duration(animing, ANIMATION_SPEED_SLOW);
lv_animimg_set_repeat_count(animing, LV_ANIM_REPEAT_INFINITE);
lv_animimg_start(animing);
current_anim_state = anim_state_slow;
}
} else if (state.wpm < 70) {
if (current_anim_state != anim_state_mid) {
lv_animimg_set_src(animing, SRC(mid_imgs));
lv_animimg_set_duration(animing, ANIMATION_SPEED_MID);
lv_animimg_set_repeat_count(animing, LV_ANIM_REPEAT_INFINITE);
lv_animimg_start(animing);
current_anim_state = anim_state_mid;
}
} else {
if (current_anim_state != anim_state_fast) {
lv_animimg_set_src(animing, SRC(fast_imgs));
lv_animimg_set_duration(animing, ANIMATION_SPEED_FAST);
lv_animimg_set_repeat_count(animing, LV_ANIM_REPEAT_INFINITE);
lv_animimg_start(animing);
current_anim_state = anim_state_fast;
}
}
}
struct bongo_cat_wpm_status_state bongo_cat_wpm_status_get_state(const zmk_event_t *eh) {
struct zmk_wpm_state_changed *ev = as_zmk_wpm_state_changed(eh);
return (struct bongo_cat_wpm_status_state) { .wpm = ev->state };
};
void bongo_cat_wpm_status_update_cb(struct bongo_cat_wpm_status_state state) {
struct zmk_widget_bongo_cat *widget;
SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_animation(widget->obj, state); }
}
ZMK_DISPLAY_WIDGET_LISTENER(widget_bongo_cat, struct bongo_cat_wpm_status_state,
bongo_cat_wpm_status_update_cb, bongo_cat_wpm_status_get_state)
ZMK_SUBSCRIPTION(widget_bongo_cat, zmk_wpm_state_changed);
int zmk_widget_bongo_cat_init(struct zmk_widget_bongo_cat *widget, lv_obj_t *parent) {
widget->obj = lv_animimg_create(parent);
lv_obj_center(widget->obj);
sys_slist_append(&widgets, &widget->node);
widget_bongo_cat_init();
return 0;
}
lv_obj_t *zmk_widget_bongo_cat_obj(struct zmk_widget_bongo_cat *widget) {
return widget->obj;
}

View file

@ -0,0 +1,19 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#pragma once
#include <lvgl.h>
#include <zephyr/kernel.h>
#include <dt-bindings/zmk/modifiers.h>
struct zmk_widget_bongo_cat {
sys_snode_t node;
lv_obj_t *obj;
};
int zmk_widget_bongo_cat_init(struct zmk_widget_bongo_cat *widget, lv_obj_t *parent);
lv_obj_t *zmk_widget_bongo_cat_obj(struct zmk_widget_bongo_cat *widget);

View file

@ -0,0 +1,383 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BONGO_CAT_NONE
#define LV_ATTRIBUTE_IMG_BONGO_CAT_NONE
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BONGO_CAT_NONE uint8_t bongo_cat_none_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x18, 0x7c, 0x02, 0x00, 0x00,
0x00, 0x00, 0x20, 0x07, 0xc5, 0x00, 0x00,
0x00, 0x00, 0x40, 0x00, 0x79, 0x00, 0x00,
0x00, 0x18, 0x80, 0x00, 0x11, 0x00, 0x00,
0x00, 0x24, 0x80, 0x00, 0x01, 0x00, 0x00,
0x00, 0x43, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00, 0x40, 0x08, 0x00, 0x02, 0x00, 0x00,
0x00, 0x40, 0x14, 0x10, 0x02, 0x00, 0x00,
0xe0, 0x20, 0x00, 0x29, 0x82, 0x00, 0x00,
0x1f, 0x10, 0x01, 0x02, 0x41, 0x00, 0x00,
0x00, 0xfc, 0x03, 0x84, 0x21, 0x80, 0x00,
0x00, 0x03, 0xe0, 0x04, 0x10, 0x80, 0x00,
0x00, 0x00, 0x1f, 0x84, 0x00, 0x80, 0x00,
0x00, 0x00, 0x00, 0x7e, 0x00, 0xc0, 0x00,
0x00, 0x00, 0x00, 0x03, 0xf0, 0x40, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bongo_cat_none = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 50,
.header.h = 26,
.data_size = 190,
.data = bongo_cat_none_map,
};
#ifndef LV_ATTRIBUTE_IMG_BONGO_CAT_LEFT1
#define LV_ATTRIBUTE_IMG_BONGO_CAT_LEFT1
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BONGO_CAT_LEFT1 uint8_t bongo_cat_left1_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x18, 0x7c, 0x02, 0x00, 0x00,
0x00, 0x00, 0x20, 0x07, 0xc5, 0x00, 0x00,
0x00, 0x00, 0x40, 0x00, 0x79, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x11, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x01, 0x00, 0x00,
0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00, 0x01, 0x08, 0x00, 0x02, 0x00, 0x00,
0x00, 0x02, 0x14, 0x10, 0x02, 0x00, 0x00,
0xe0, 0x04, 0x00, 0x29, 0x82, 0x00, 0x00,
0x1f, 0x08, 0x01, 0x02, 0x41, 0x00, 0x00,
0x00, 0xf0, 0x03, 0x84, 0x21, 0x80, 0x00,
0x00, 0x10, 0x20, 0x04, 0x10, 0x80, 0x00,
0x00, 0x10, 0x7f, 0x84, 0x00, 0x80, 0x00,
0x00, 0x09, 0x80, 0x7e, 0x00, 0xc0, 0x00,
0x00, 0x06, 0x00, 0x03, 0xf0, 0x40, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bongo_cat_left1 = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 50,
.header.h = 26,
.data_size = 190,
.data = bongo_cat_left1_map,
};
#ifndef LV_ATTRIBUTE_IMG_BONGO_CAT_LEFT2
#define LV_ATTRIBUTE_IMG_BONGO_CAT_LEFT2
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BONGO_CAT_LEFT2 uint8_t bongo_cat_left2_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x18, 0x7c, 0x02, 0x00, 0x00,
0x00, 0x00, 0x20, 0x07, 0xc5, 0x00, 0x00,
0x00, 0x00, 0x40, 0x00, 0x79, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x11, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x01, 0x00, 0x00,
0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00, 0x01, 0x08, 0x00, 0x02, 0x00, 0x00,
0x00, 0x02, 0x14, 0x10, 0x02, 0x00, 0x00,
0xe0, 0x04, 0x00, 0x29, 0x82, 0x00, 0x00,
0x1f, 0x08, 0x01, 0x02, 0x41, 0x00, 0x00,
0x00, 0xf0, 0x03, 0x84, 0x21, 0x80, 0x00,
0x00, 0x10, 0x20, 0x04, 0x10, 0x80, 0x00,
0x00, 0x10, 0x7f, 0x84, 0x00, 0x80, 0x00,
0x00, 0x09, 0x80, 0x7e, 0x00, 0xc0, 0x00,
0x00, 0x66, 0x00, 0x03, 0xf0, 0x40, 0x00,
0x00, 0x40, 0x80, 0x00, 0x0f, 0xe0, 0x00,
0x00, 0x04, 0x80, 0x00, 0x00, 0x3e, 0x00,
0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0xc0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bongo_cat_left2 = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 50,
.header.h = 26,
.data_size = 190,
.data = bongo_cat_left2_map,
};
#ifndef LV_ATTRIBUTE_IMG_BONGO_CAT_RIGHT1
#define LV_ATTRIBUTE_IMG_BONGO_CAT_RIGHT1
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BONGO_CAT_RIGHT1 uint8_t bongo_cat_right1_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x18, 0x7c, 0x02, 0x00, 0x00,
0x00, 0x00, 0x20, 0x07, 0xc5, 0x00, 0x00,
0x00, 0x00, 0x40, 0x00, 0x79, 0x00, 0x00,
0x00, 0x18, 0x80, 0x00, 0x11, 0x00, 0x00,
0x00, 0x24, 0x80, 0x00, 0x01, 0x00, 0x00,
0x00, 0x43, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00, 0x40, 0x08, 0x00, 0x02, 0x00, 0x00,
0x00, 0x40, 0x14, 0x10, 0x02, 0x00, 0x00,
0xe0, 0x20, 0x00, 0x28, 0x02, 0x00, 0x00,
0x1f, 0x10, 0x01, 0x00, 0x01, 0x00, 0x00,
0x00, 0xfc, 0x03, 0x80, 0x01, 0x80, 0x00,
0x00, 0x03, 0xe0, 0x00, 0x00, 0x80, 0x00,
0x00, 0x00, 0x1f, 0x82, 0x00, 0x80, 0x00,
0x00, 0x00, 0x00, 0x7c, 0x00, 0xc0, 0x00,
0x00, 0x00, 0x00, 0x08, 0x10, 0x40, 0x00,
0x00, 0x00, 0x00, 0x08, 0x2f, 0xe0, 0x00,
0x00, 0x00, 0x00, 0x04, 0x40, 0x3e, 0x00,
0x00, 0x00, 0x00, 0x03, 0x80, 0x01, 0xc0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bongo_cat_right1 = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 50,
.header.h = 26,
.data_size = 190,
.data = bongo_cat_right1_map,
};
#ifndef LV_ATTRIBUTE_IMG_BONGO_CAT_RIGHT2
#define LV_ATTRIBUTE_IMG_BONGO_CAT_RIGHT2
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BONGO_CAT_RIGHT2 uint8_t bongo_cat_right2_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x18, 0x7c, 0x02, 0x00, 0x00,
0x00, 0x00, 0x20, 0x07, 0xc5, 0x00, 0x00,
0x00, 0x00, 0x40, 0x00, 0x79, 0x00, 0x00,
0x00, 0x18, 0x80, 0x00, 0x11, 0x00, 0x00,
0x00, 0x24, 0x80, 0x00, 0x01, 0x00, 0x00,
0x00, 0x43, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00, 0x40, 0x08, 0x00, 0x02, 0x00, 0x00,
0x00, 0x40, 0x14, 0x10, 0x02, 0x00, 0x00,
0xe0, 0x20, 0x00, 0x28, 0x02, 0x00, 0x00,
0x1f, 0x10, 0x01, 0x00, 0x01, 0x00, 0x00,
0x00, 0xfc, 0x03, 0x80, 0x01, 0x80, 0x00,
0x00, 0x03, 0xe0, 0x00, 0x00, 0x80, 0x00,
0x00, 0x00, 0x1f, 0x82, 0x00, 0x80, 0x00,
0x00, 0x00, 0x00, 0x7c, 0x00, 0xc0, 0x00,
0x00, 0x00, 0x00, 0x08, 0x10, 0x40, 0x00,
0x00, 0x00, 0x00, 0x08, 0x2f, 0xe0, 0x00,
0x00, 0x00, 0x00, 0x04, 0x40, 0x3e, 0x00,
0x00, 0x00, 0x00, 0x33, 0x80, 0x01, 0xc0,
0x00, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00,
0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bongo_cat_right2 = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 50,
.header.h = 26,
.data_size = 190,
.data = bongo_cat_right2_map,
};
#ifndef LV_ATTRIBUTE_IMG_BONGO_CAT_BOTH1
#define LV_ATTRIBUTE_IMG_BONGO_CAT_BOTH1
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BONGO_CAT_BOTH1 uint8_t bongo_cat_both1_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x18, 0x7c, 0x02, 0x00, 0x00,
0x00, 0x00, 0x20, 0x07, 0xc5, 0x00, 0x00,
0x00, 0x00, 0x40, 0x00, 0x79, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x11, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x01, 0x00, 0x00,
0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00, 0x01, 0x08, 0x00, 0x02, 0x00, 0x00,
0x00, 0x02, 0x14, 0x10, 0x02, 0x00, 0x00,
0xe0, 0x04, 0x00, 0x28, 0x02, 0x00, 0x00,
0x1f, 0x08, 0x01, 0x00, 0x01, 0x00, 0x00,
0x00, 0xf0, 0x03, 0x80, 0x01, 0x80, 0x00,
0x00, 0x10, 0x20, 0x00, 0x00, 0x80, 0x00,
0x00, 0x10, 0x7f, 0x82, 0x00, 0x80, 0x00,
0x00, 0x09, 0x80, 0x7c, 0x00, 0xc0, 0x00,
0x00, 0x06, 0x00, 0x08, 0x10, 0x40, 0x00,
0x00, 0x00, 0x00, 0x08, 0x2f, 0xe0, 0x00,
0x00, 0x00, 0x00, 0x04, 0x40, 0x3e, 0x00,
0x00, 0x00, 0x00, 0x03, 0x80, 0x01, 0xc0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bongo_cat_both1 = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 50,
.header.h = 26,
.data_size = 190,
.data = bongo_cat_both1_map,
};
#ifndef LV_ATTRIBUTE_IMG_BONGO_CAT_BOTH1_OPEN
#define LV_ATTRIBUTE_IMG_BONGO_CAT_BOTH1_OPEN
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BONGO_CAT_BOTH1_OPEN uint8_t bongo_cat_both1_open_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x18, 0x7c, 0x02, 0x00, 0x00,
0x00, 0x00, 0x20, 0x07, 0xc5, 0x00, 0x00,
0x00, 0x00, 0x40, 0x00, 0x79, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x11, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x01, 0x00, 0x00,
0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00,
0x00, 0x02, 0x08, 0x00, 0x02, 0x00, 0x00,
0xe0, 0x04, 0x00, 0x10, 0x02, 0x00, 0x00,
0x1f, 0x08, 0x01, 0x00, 0x01, 0x00, 0x00,
0x00, 0xf0, 0x03, 0x80, 0x01, 0x80, 0x00,
0x00, 0x10, 0x20, 0x00, 0x00, 0x80, 0x00,
0x00, 0x10, 0x7f, 0x82, 0x00, 0x80, 0x00,
0x00, 0x09, 0x80, 0x7c, 0x00, 0xc0, 0x00,
0x00, 0x06, 0x00, 0x08, 0x10, 0x40, 0x00,
0x00, 0x00, 0x00, 0x08, 0x2f, 0xe0, 0x00,
0x00, 0x00, 0x00, 0x04, 0x40, 0x3e, 0x00,
0x00, 0x00, 0x00, 0x03, 0x80, 0x01, 0xc0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bongo_cat_both1_open = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 50,
.header.h = 26,
.data_size = 190,
.data = bongo_cat_both1_open_map,
};
#ifndef LV_ATTRIBUTE_IMG_BONGO_CAT_BOTH2
#define LV_ATTRIBUTE_IMG_BONGO_CAT_BOTH2
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BONGO_CAT_BOTH2 uint8_t bongo_cat_both2_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x18, 0x7c, 0x02, 0x00, 0x00,
0x00, 0x00, 0x20, 0x07, 0xc5, 0x00, 0x00,
0x00, 0x00, 0x40, 0x00, 0x79, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x11, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x01, 0x00, 0x00,
0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00, 0x01, 0x08, 0x00, 0x02, 0x00, 0x00,
0x00, 0x02, 0x14, 0x10, 0x02, 0x00, 0x00,
0xe0, 0x04, 0x00, 0x28, 0x02, 0x00, 0x00,
0x1f, 0x08, 0x01, 0x00, 0x01, 0x00, 0x00,
0x00, 0xf0, 0x03, 0x80, 0x01, 0x80, 0x00,
0x00, 0x10, 0x20, 0x00, 0x00, 0x80, 0x00,
0x00, 0x10, 0x7f, 0x82, 0x00, 0x80, 0x00,
0x00, 0x09, 0x80, 0x7c, 0x00, 0xc0, 0x00,
0x00, 0x66, 0x00, 0x08, 0x10, 0x40, 0x00,
0x00, 0x40, 0x80, 0x08, 0x2f, 0xe0, 0x00,
0x00, 0x04, 0x80, 0x04, 0x40, 0x3e, 0x00,
0x00, 0x0c, 0x00, 0x33, 0x80, 0x01, 0xc0,
0x00, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00,
0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bongo_cat_both2 = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 50,
.header.h = 26,
.data_size = 190,
.data = bongo_cat_both2_map,
};

View file

@ -0,0 +1,81 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <zephyr/kernel.h>
#include <zephyr/bluetooth/services/bas.h>
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
#include <zmk/display.h>
#include <zmk/event_manager.h>
#include <zmk/events/hid_indicators_changed.h>
#include "hid_indicators.h"
#define LED_NLCK 0x01
#define LED_CLCK 0x02
#define LED_SLCK 0x04
struct hid_indicators_state {
uint8_t hid_indicators;
};
static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets);
static void set_hid_indicators(lv_obj_t *label, struct hid_indicators_state state) {
char text[7] = {};
bool lock = false;
if (state.hid_indicators & LED_CLCK) {
strncat(text, "C", 1);
lock = true;
}
if (state.hid_indicators & LED_NLCK) {
strncat(text, "N", 1);
lock = true;
}
if (state.hid_indicators & LED_SLCK) {
strncat(text, "S", 1);
lock = true;
}
if (lock) {
strncat(text, "LCK", 3);
}
lv_label_set_text(label, text);
}
void hid_indicators_update_cb(struct hid_indicators_state state) {
struct zmk_widget_hid_indicators *widget;
SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_hid_indicators(widget->obj, state); }
}
static struct hid_indicators_state hid_indicators_get_state(const zmk_event_t *eh) {
struct zmk_hid_indicators_changed *ev = as_zmk_hid_indicators_changed(eh);
return (struct hid_indicators_state) {
.hid_indicators = ev->indicators,
};
}
ZMK_DISPLAY_WIDGET_LISTENER(widget_hid_indicators, struct hid_indicators_state,
hid_indicators_update_cb, hid_indicators_get_state)
ZMK_SUBSCRIPTION(widget_hid_indicators, zmk_hid_indicators_changed);
int zmk_widget_hid_indicators_init(struct zmk_widget_hid_indicators *widget, lv_obj_t *parent) {
widget->obj = lv_label_create(parent);
sys_slist_append(&widgets, &widget->node);
widget_hid_indicators_init();
return 0;
}
lv_obj_t *zmk_widget_hid_indicators_obj(struct zmk_widget_hid_indicators *widget) {
return widget->obj;
}

View file

@ -0,0 +1,18 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#pragma once
#include <lvgl.h>
#include <zephyr/kernel.h>
struct zmk_widget_hid_indicators {
sys_snode_t node;
lv_obj_t *obj;
};
int zmk_widget_hid_indicators_init(struct zmk_widget_hid_indicators *widget, lv_obj_t *parent);
lv_obj_t *zmk_widget_hid_indicators_obj(struct zmk_widget_hid_indicators *widget);

View file

@ -0,0 +1,70 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
#include <zmk/display.h>
#include <zmk/display/widgets/layer_status.h>
#include <zmk/events/layer_state_changed.h>
#include <zmk/event_manager.h>
#include <zmk/endpoints.h>
#include <zmk/keymap.h>
static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets);
struct layer_status_state {
uint8_t index;
const char *label;
};
static void set_layer_symbol(lv_obj_t *label, struct layer_status_state state) {
if (state.label == NULL) {
char text[7] = {};
sprintf(text, "%i", state.index);
lv_label_set_text(label, text);
} else {
char text[13] = {};
snprintf(text, sizeof(text), "%s", state.label);
lv_label_set_text(label, text);
}
}
static void layer_status_update_cb(struct layer_status_state state) {
struct zmk_widget_layer_status *widget;
SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_layer_symbol(widget->obj, state); }
}
static struct layer_status_state layer_status_get_state(const zmk_event_t *eh) {
uint8_t index = zmk_keymap_highest_layer_active();
return (struct layer_status_state) {
.index = index,
.label = zmk_keymap_layer_name(index)
};
}
ZMK_DISPLAY_WIDGET_LISTENER(widget_layer_status, struct layer_status_state, layer_status_update_cb,
layer_status_get_state)
ZMK_SUBSCRIPTION(widget_layer_status, zmk_layer_state_changed);
int zmk_widget_layer_status_init(struct zmk_widget_layer_status *widget, lv_obj_t *parent) {
widget->obj = lv_label_create(parent);
sys_slist_append(&widgets, &widget->node);
widget_layer_status_init();
return 0;
}
lv_obj_t *zmk_widget_layer_status_obj(struct zmk_widget_layer_status *widget) {
return widget->obj;
}

View file

@ -0,0 +1,18 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#pragma once
#include <lvgl.h>
#include <zephyr/kernel.h>
struct zmk_widget_layer_status {
sys_snode_t node;
lv_obj_t *obj;
};
int zmk_widget_layer_status_init(struct zmk_widget_layer_status *widget, lv_obj_t *parent);
lv_obj_t *zmk_widget_layer_status_obj(struct zmk_widget_layer_status *widget);

View file

@ -0,0 +1,159 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <zephyr/kernel.h>
#include <zephyr/bluetooth/services/bas.h>
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
#include <zmk/display.h>
#include <zmk/event_manager.h>
#include <zmk/events/keycode_state_changed.h>
#include <zmk/hid.h>
#include <dt-bindings/zmk/modifiers.h>
#include "modifiers.h"
struct modifiers_state {
uint8_t modifiers;
};
struct modifier_symbol {
uint8_t modifier;
const lv_img_dsc_t *symbol_dsc;
lv_obj_t *symbol;
lv_obj_t *selection_line;
bool is_active;
};
LV_IMG_DECLARE(control_icon);
struct modifier_symbol ms_control = {
.modifier = MOD_LCTL | MOD_RCTL,
.symbol_dsc = &control_icon,
};
LV_IMG_DECLARE(shift_icon);
struct modifier_symbol ms_shift = {
.modifier = MOD_LSFT | MOD_RSFT,
.symbol_dsc = &shift_icon,
};
LV_IMG_DECLARE(alt_icon);
struct modifier_symbol ms_alt = {
.modifier = MOD_LALT | MOD_RALT,
.symbol_dsc = &alt_icon,
};
LV_IMG_DECLARE(win_icon);
struct modifier_symbol ms_gui = {
.modifier = MOD_LGUI | MOD_RGUI,
.symbol_dsc = &win_icon,
};
LV_IMG_DECLARE(opt_icon);
struct modifier_symbol ms_opt = {
.modifier = MOD_LALT | MOD_RALT,
.symbol_dsc = &opt_icon,
};
LV_IMG_DECLARE(cmd_icon);
struct modifier_symbol ms_cmd = {
.modifier = MOD_LGUI | MOD_RGUI,
.symbol_dsc = &cmd_icon,
};
struct modifier_symbol *modifier_symbols[] = {
// this order determines the order of the symbols
&ms_cmd,
&ms_opt,
&ms_control,
&ms_shift
};
#define NUM_SYMBOLS (sizeof(modifier_symbols) / sizeof(struct modifier_symbol *))
static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets);
static void anim_y_cb(void *var, int32_t v) {
lv_obj_set_y(var, v);
}
static void move_object_y(void *obj, int32_t from, int32_t to) {
lv_anim_t a;
lv_anim_init(&a);
lv_anim_set_var(&a, obj);
lv_anim_set_time(&a, 200); // will be replaced with lv_anim_set_duration
lv_anim_set_exec_cb(&a, anim_y_cb);
lv_anim_set_path_cb(&a, lv_anim_path_overshoot);
lv_anim_set_values(&a, from, to);
lv_anim_start(&a);
}
static void set_modifiers(lv_obj_t *widget, struct modifiers_state state) {
for (int i = 0; i < NUM_SYMBOLS; i++) {
bool mod_is_active = (state.modifiers & modifier_symbols[i]->modifier) > 0;
if (mod_is_active && !modifier_symbols[i]->is_active) {
move_object_y(modifier_symbols[i]->symbol, 1, 0);
move_object_y(modifier_symbols[i]->selection_line, SIZE_SYMBOLS + 4, SIZE_SYMBOLS + 2);
modifier_symbols[i]->is_active = true;
} else if (!mod_is_active && modifier_symbols[i]->is_active) {
move_object_y(modifier_symbols[i]->symbol, 0, 1);
move_object_y(modifier_symbols[i]->selection_line, SIZE_SYMBOLS + 2, SIZE_SYMBOLS + 4);
modifier_symbols[i]->is_active = false;
}
}
}
void modifiers_update_cb(struct modifiers_state state) {
struct zmk_widget_modifiers *widget;
SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_modifiers(widget->obj, state); }
}
static struct modifiers_state modifiers_get_state(const zmk_event_t *eh) {
return (struct modifiers_state) {
.modifiers = zmk_hid_get_explicit_mods()
};
}
ZMK_DISPLAY_WIDGET_LISTENER(widget_modifiers, struct modifiers_state,
modifiers_update_cb, modifiers_get_state)
ZMK_SUBSCRIPTION(widget_modifiers, zmk_keycode_state_changed);
int zmk_widget_modifiers_init(struct zmk_widget_modifiers *widget, lv_obj_t *parent) {
widget->obj = lv_obj_create(parent);
lv_obj_set_size(widget->obj, NUM_SYMBOLS * (SIZE_SYMBOLS + 1) + 1, SIZE_SYMBOLS + 3);
static lv_style_t style_line;
lv_style_init(&style_line);
lv_style_set_line_width(&style_line, 2);
static const lv_point_t selection_line_points[] = { {0, 0}, {SIZE_SYMBOLS, 0} };
for (int i = 0; i < NUM_SYMBOLS; i++) {
modifier_symbols[i]->symbol = lv_img_create(widget->obj);
lv_obj_align(modifier_symbols[i]->symbol, LV_ALIGN_TOP_LEFT, 1 + (SIZE_SYMBOLS + 1) * i, 1);
lv_img_set_src(modifier_symbols[i]->symbol, modifier_symbols[i]->symbol_dsc);
modifier_symbols[i]->selection_line = lv_line_create(widget->obj);
lv_line_set_points(modifier_symbols[i]->selection_line, selection_line_points, 2);
lv_obj_add_style(modifier_symbols[i]->selection_line, &style_line, 0);
lv_obj_align_to(modifier_symbols[i]->selection_line, modifier_symbols[i]->symbol, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 3);
}
sys_slist_append(&widgets, &widget->node);
widget_modifiers_init();
return 0;
}
lv_obj_t *zmk_widget_modifiers_obj(struct zmk_widget_modifiers *widget) {
return widget->obj;
}

View file

@ -0,0 +1,21 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#pragma once
#include <lvgl.h>
#include <zephyr/kernel.h>
#include <dt-bindings/zmk/modifiers.h>
#define SIZE_SYMBOLS 14 // 14 x 14 pixel
struct zmk_widget_modifiers {
sys_snode_t node;
lv_obj_t *obj;
};
int zmk_widget_modifiers_init(struct zmk_widget_modifiers *widget, lv_obj_t *parent);
lv_obj_t *zmk_widget_modifiers_obj(struct zmk_widget_modifiers *widget);

View file

@ -0,0 +1,215 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_CONTROL
#define LV_ATTRIBUTE_IMG_CONTROL
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_CONTROL uint8_t control_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00,
0x00, 0x00,
0x03, 0x00,
0x07, 0x80,
0x0c, 0xc0,
0x18, 0x60,
0x30, 0x30,
0x20, 0x10,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
};
const lv_img_dsc_t control_icon = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 14,
.header.h = 14,
.data_size = 36,
.data = control_map,
};
#ifndef LV_ATTRIBUTE_IMG_SHIFT
#define LV_ATTRIBUTE_IMG_SHIFT
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SHIFT uint8_t shift_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00,
0x00, 0x00,
0x03, 0x00,
0x07, 0x80,
0x0c, 0xc0,
0x18, 0x60,
0x30, 0x30,
0x78, 0x78,
0x08, 0x40,
0x08, 0x40,
0x08, 0x40,
0x0f, 0xc0,
0x00, 0x00,
0x00, 0x00,
};
const lv_img_dsc_t shift_icon = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 14,
.header.h = 14,
.data_size = 36,
.data = shift_map,
};
#ifndef LV_ATTRIBUTE_IMG_ALT
#define LV_ATTRIBUTE_IMG_ALT
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_ALT uint8_t alt_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x32, 0xf8,
0x4a, 0x20,
0x4a, 0x20,
0x7a, 0x20,
0x4a, 0x20,
0x4b, 0xa0,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
};
const lv_img_dsc_t alt_icon = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 14,
.header.h = 14,
.data_size = 36,
.data = alt_map,
};
#ifndef LV_ATTRIBUTE_IMG_GUI
#define LV_ATTRIBUTE_IMG_GUI
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_GUI uint8_t win_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00,
0x00, 0x00,
0x00, 0xf0,
0x0b, 0xf0,
0x3b, 0xf0,
0x3b, 0xf0,
0x3b, 0xf0,
0x00, 0x00,
0x3b, 0xf0,
0x3b, 0xf0,
0x3b, 0xf0,
0x03, 0xf0,
0x00, 0x30,
0x00, 0x00,
};
const lv_img_dsc_t win_icon = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 14,
.header.h = 14,
.data_size = 36,
.data = win_map,
};
#ifndef LV_ATTRIBUTE_IMG_CMD
#define LV_ATTRIBUTE_IMG_CMD
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_CMD uint8_t cmd_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00,
0x00, 0x00,
0x18, 0x60,
0x24, 0x90,
0x24, 0x90,
0x1f, 0xe0,
0x04, 0x80,
0x04, 0x80,
0x1f, 0xe0,
0x24, 0x90,
0x24, 0x90,
0x18, 0x60,
0x00, 0x00,
0x00, 0x00,
};
const lv_img_dsc_t cmd_icon = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 14,
.header.h = 14,
.data_size = 36,
.data = cmd_map,
};
#ifndef LV_ATTRIBUTE_IMG_OPT
#define LV_ATTRIBUTE_IMG_OPT
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_OPT uint8_t opt_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00,
0x00, 0x00,
0x3c, 0xe0,
0x3c, 0xe0,
0x06, 0x00,
0x06, 0x00,
0x06, 0x00,
0x03, 0x00,
0x03, 0x00,
0x03, 0x00,
0x01, 0xe0,
0x01, 0xe0,
0x00, 0x00,
0x00, 0x00,
};
const lv_img_dsc_t opt_icon = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 14,
.header.h = 14,
.data_size = 36,
.data = opt_map,
};

View file

@ -0,0 +1,207 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
#include <zmk/display.h>
#include <zmk/event_manager.h>
#include <zmk/events/ble_active_profile_changed.h>
#include <zmk/events/endpoint_changed.h>
#include <zmk/events/usb_conn_state_changed.h>
#include <zmk/usb.h>
#include <zmk/ble.h>
#include <zmk/endpoints.h>
#include "output_status.h"
static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets);
LV_IMG_DECLARE(sym_usb);
LV_IMG_DECLARE(sym_bt);
LV_IMG_DECLARE(sym_ok);
LV_IMG_DECLARE(sym_nok);
LV_IMG_DECLARE(sym_open);
LV_IMG_DECLARE(sym_1);
LV_IMG_DECLARE(sym_2);
LV_IMG_DECLARE(sym_3);
LV_IMG_DECLARE(sym_4);
LV_IMG_DECLARE(sym_5);
const lv_img_dsc_t *sym_num[] = {
&sym_1,
&sym_2,
&sym_3,
&sym_4,
&sym_5,
};
enum output_symbol {
output_symbol_usb,
output_symbol_usb_hid_status,
output_symbol_bt,
output_symbol_bt_number,
output_symbol_bt_status,
output_symbol_selection_line
};
enum selection_line_state {
selection_line_state_usb,
selection_line_state_bt
} current_selection_line_state;
lv_point_t selection_line_points[] = { {-1, 0}, {12, 0} }; // will be replaced with lv_point_precise_t
struct output_status_state {
struct zmk_endpoint_instance selected_endpoint;
int active_profile_index;
bool active_profile_connected;
bool active_profile_bonded;
bool usb_is_hid_ready;
};
static struct output_status_state get_state(const zmk_event_t *_eh) {
return (struct output_status_state){
.selected_endpoint = zmk_endpoints_selected(),
.active_profile_index = zmk_ble_active_profile_index(),
.active_profile_connected = zmk_ble_active_profile_is_connected(),
.active_profile_bonded = !zmk_ble_active_profile_is_open(),
.usb_is_hid_ready = zmk_usb_is_hid_ready()
};
}
static void anim_x_cb(void * var, int32_t v) {
lv_obj_set_x(var, v);
}
static void anim_size_cb(void * var, int32_t v) {
selection_line_points[1].x = v;
}
static void move_object_x(void *obj, int32_t from, int32_t to) {
lv_anim_t a;
lv_anim_init(&a);
lv_anim_set_var(&a, obj);
lv_anim_set_time(&a, 200); // will be replaced with lv_anim_set_duration
lv_anim_set_exec_cb(&a, anim_x_cb);
lv_anim_set_path_cb(&a, lv_anim_path_overshoot);
lv_anim_set_values(&a, from, to);
lv_anim_start(&a);
}
static void change_size_object(void *obj, int32_t from, int32_t to) {
lv_anim_t a;
lv_anim_init(&a);
lv_anim_set_var(&a, obj);
lv_anim_set_time(&a, 200); // will be replaced with lv_anim_set_duration
lv_anim_set_exec_cb(&a, anim_size_cb);
lv_anim_set_path_cb(&a, lv_anim_path_ease_in_out);
lv_anim_set_values(&a, from, to);
lv_anim_start(&a);
}
static void set_status_symbol(lv_obj_t *widget, struct output_status_state state) {
lv_obj_t *usb = lv_obj_get_child(widget, output_symbol_usb);
lv_obj_t *usb_hid_status = lv_obj_get_child(widget, output_symbol_usb_hid_status);
lv_obj_t *bt = lv_obj_get_child(widget, output_symbol_bt);
lv_obj_t *bt_number = lv_obj_get_child(widget, output_symbol_bt_number);
lv_obj_t *bt_status = lv_obj_get_child(widget, output_symbol_bt_status);
lv_obj_t *selection_line = lv_obj_get_child(widget, output_symbol_selection_line);
switch (state.selected_endpoint.transport) {
case ZMK_TRANSPORT_USB:
if (current_selection_line_state != selection_line_state_usb) {
move_object_x(selection_line, lv_obj_get_x(bt) - 1, lv_obj_get_x(usb) - 1);
change_size_object(selection_line, 18, 11);
current_selection_line_state = selection_line_state_usb;
}
break;
case ZMK_TRANSPORT_BLE:
if (current_selection_line_state != selection_line_state_bt) {
move_object_x(selection_line, lv_obj_get_x(usb) - 1, lv_obj_get_x(bt) - 1);
change_size_object(selection_line, 11, 18);
current_selection_line_state = selection_line_state_bt;
}
break;
}
if (state.usb_is_hid_ready) {
lv_img_set_src(usb_hid_status, &sym_ok);
} else {
lv_img_set_src(usb_hid_status, &sym_nok);
}
if (state.active_profile_index < (sizeof(sym_num) / sizeof(lv_img_dsc_t *))) {
lv_img_set_src(bt_number, sym_num[state.active_profile_index]);
} else {
lv_img_set_src(bt_number, &sym_nok);
}
if (state.active_profile_bonded) {
if (state.active_profile_connected) {
lv_img_set_src(bt_status, &sym_ok);
} else {
lv_img_set_src(bt_status, &sym_nok);
}
} else {
lv_img_set_src(bt_status, &sym_open);
}
}
static void output_status_update_cb(struct output_status_state state) {
struct zmk_widget_output_status *widget;
SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_status_symbol(widget->obj, state); }
}
ZMK_DISPLAY_WIDGET_LISTENER(widget_output_status, struct output_status_state,
output_status_update_cb, get_state)
ZMK_SUBSCRIPTION(widget_output_status, zmk_endpoint_changed);
ZMK_SUBSCRIPTION(widget_output_status, zmk_ble_active_profile_changed);
ZMK_SUBSCRIPTION(widget_output_status, zmk_usb_conn_state_changed);
int zmk_widget_output_status_init(struct zmk_widget_output_status *widget, lv_obj_t *parent) {
widget->obj = lv_obj_create(parent);
lv_obj_set_size(widget->obj, LV_SIZE_CONTENT, LV_SIZE_CONTENT);
lv_obj_t *usb = lv_img_create(widget->obj);
lv_obj_align(usb, LV_ALIGN_TOP_LEFT, 1, 4);
lv_img_set_src(usb, &sym_usb);
lv_obj_t *usb_hid_status = lv_img_create(widget->obj);
lv_obj_align_to(usb_hid_status, usb, LV_ALIGN_BOTTOM_LEFT, 2, -7);
lv_obj_t *bt = lv_img_create(widget->obj);
lv_obj_align_to(bt, usb, LV_ALIGN_OUT_RIGHT_TOP, 6, 0);
lv_img_set_src(bt, &sym_bt);
lv_obj_t *bt_number = lv_img_create(widget->obj);
lv_obj_align_to(bt_number, bt, LV_ALIGN_OUT_RIGHT_TOP, 2, 7);
lv_obj_t *bt_status = lv_img_create(widget->obj);
lv_obj_align_to(bt_status, bt, LV_ALIGN_OUT_RIGHT_TOP, 2, 1);
static lv_style_t style_line;
lv_style_init(&style_line);
lv_style_set_line_width(&style_line, 2);
lv_obj_t *selection_line;
selection_line = lv_line_create(widget->obj);
lv_line_set_points(selection_line, selection_line_points, 2);
lv_obj_add_style(selection_line, &style_line, 0);
lv_obj_align_to(selection_line, usb, LV_ALIGN_OUT_TOP_LEFT, 3, -1);
sys_slist_append(&widgets, &widget->node);
widget_output_status_init();
return 0;
}
lv_obj_t *zmk_widget_output_status_obj(struct zmk_widget_output_status *widget) {
return widget->obj;
}

View file

@ -0,0 +1,18 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#pragma once
#include <lvgl.h>
#include <zephyr/kernel.h>
struct zmk_widget_output_status {
sys_snode_t node;
lv_obj_t *obj;
};
int zmk_widget_output_status_init(struct zmk_widget_output_status *widget, lv_obj_t *parent);
lv_obj_t *zmk_widget_output_status_obj(struct zmk_widget_output_status *widget);

View file

@ -0,0 +1,231 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_SYM_1
#define LV_ATTRIBUTE_IMG_SYM_1
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_1 uint8_t sym_1_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x30, 0x70, 0x70, 0x30, 0x30, 0x30,
};
const lv_img_dsc_t sym_1 = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 5,
.header.h = 6,
.data_size = 14,
.data = sym_1_map,
};
#ifndef LV_ATTRIBUTE_IMG_SYM_2
#define LV_ATTRIBUTE_IMG_SYM_2
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_2 uint8_t sym_2_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x70, 0xd8, 0x18, 0x30, 0x60, 0xf8,
};
const lv_img_dsc_t sym_2 = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 5,
.header.h = 6,
.data_size = 14,
.data = sym_2_map,
};
#ifndef LV_ATTRIBUTE_IMG_SYM_3
#define LV_ATTRIBUTE_IMG_SYM_3
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_3 uint8_t sym_3_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x70, 0x98, 0x30, 0x18, 0xd8, 0x70,
};
const lv_img_dsc_t sym_3 = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 5,
.header.h = 6,
.data_size = 14,
.data = sym_3_map,
};
#ifndef LV_ATTRIBUTE_IMG_SYM_4
#define LV_ATTRIBUTE_IMG_SYM_4
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_4 uint8_t sym_4_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x10, 0x30, 0x70, 0xd0, 0xf8, 0x10,
};
const lv_img_dsc_t sym_4 = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 5,
.header.h = 6,
.data_size = 14,
.data = sym_4_map,
};
#ifndef LV_ATTRIBUTE_IMG_SYM_5
#define LV_ATTRIBUTE_IMG_SYM_5
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_5 uint8_t sym_5_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x78, 0x40, 0x70, 0x18, 0xd8, 0x70,
};
const lv_img_dsc_t sym_5 = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 5,
.header.h = 6,
.data_size = 14,
.data = sym_5_map,
};
#ifndef LV_ATTRIBUTE_IMG_SYM_OK
#define LV_ATTRIBUTE_IMG_SYM_OK
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_OK uint8_t sym_ok_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x08, 0x18, 0xb0, 0xe0, 0x40,
};
const lv_img_dsc_t sym_ok = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 5,
.header.h = 5,
.data_size = 13,
.data = sym_ok_map,
};
#ifndef LV_ATTRIBUTE_IMG_SYM_NOK
#define LV_ATTRIBUTE_IMG_SYM_NOK
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_NOK uint8_t sym_nok_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x88, 0xd8, 0x70, 0xd8, 0x88,
};
const lv_img_dsc_t sym_nok = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 5,
.header.h = 5,
.data_size = 13,
.data = sym_nok_map,
};
#ifndef LV_ATTRIBUTE_IMG_SYM_OPEN
#define LV_ATTRIBUTE_IMG_SYM_OPEN
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_OPEN uint8_t sym_open_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x20, 0x70, 0xd8, 0x70, 0x20,
};
const lv_img_dsc_t sym_open = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 5,
.header.h = 5,
.data_size = 13,
.data = sym_open_map,
};
#ifndef LV_ATTRIBUTE_IMG_SYM_BT
#define LV_ATTRIBUTE_IMG_SYM_BT
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_BT uint8_t sym_bt_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x3e, 0x00, 0x67, 0x00, 0xe3, 0x80, 0xe9,
0x80, 0x8c, 0x80, 0xc9, 0x80, 0xe3, 0x80,
0xe3, 0x80, 0xc9, 0x80, 0x8c, 0x80, 0xe9,
0x80, 0xe3, 0x80, 0x67, 0x00, 0x3e, 0x00,
};
const lv_img_dsc_t sym_bt = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 9,
.header.h = 14,
.data_size = 36,
.data = sym_bt_map,
};
#ifndef LV_ATTRIBUTE_IMG_SYM_USB
#define LV_ATTRIBUTE_IMG_SYM_USB
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_USB uint8_t sym_usb_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x7f, 0x00, 0x41, 0x00, 0x55, 0x00, 0x41,
0x00, 0xff, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0xff, 0x80,
};
const lv_img_dsc_t sym_usb = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 9,
.header.h = 14,
.data_size = 36,
.data = sym_usb_map,
};

View file

@ -1,707 +0,0 @@
CONFIG_ADC=y
CONFIG_ADC_CONFIGURABLE_INPUTS=y
CONFIG_ADC_INIT_PRIORITY=50
CONFIG_ADC_NRFX_SAADC=y
CONFIG_APPLICATION_INIT_PRIORITY=90
CONFIG_APP_LINK_WITH_LVGL=y
CONFIG_ARCH="arm"
CONFIG_ARCH_HAS_CODE_DATA_RELOCATION=y
CONFIG_ARCH_HAS_CUSTOM_BUSY_WAIT=y
CONFIG_ARCH_HAS_CUSTOM_SWAP_TO_MAIN=y
CONFIG_ARCH_HAS_EXECUTABLE_PAGE_BIT=y
CONFIG_ARCH_HAS_EXTRA_EXCEPTION_INFO=y
CONFIG_ARCH_HAS_NESTED_EXCEPTION_DETECTION=y
CONFIG_ARCH_HAS_RAMFUNC_SUPPORT=y
CONFIG_ARCH_HAS_SINGLE_THREAD_SUPPORT=y
CONFIG_ARCH_HAS_STACK_PROTECTION=y
CONFIG_ARCH_HAS_SUSPEND_TO_RAM=y
CONFIG_ARCH_HAS_THREAD_ABORT=y
CONFIG_ARCH_HAS_THREAD_LOCAL_STORAGE=y
CONFIG_ARCH_HAS_TIMING_FUNCTIONS=y
CONFIG_ARCH_HAS_USERSPACE=y
CONFIG_ARCH_IRQ_VECTOR_TABLE_ALIGN=4
CONFIG_ARCH_IS_SET=y
CONFIG_ARCH_SUPPORTS_ARCH_HW_INIT=y
CONFIG_ARCH_SUPPORTS_COREDUMP=y
CONFIG_ARCH_SW_ISR_TABLE_ALIGN=4
CONFIG_ARM=y
CONFIG_ARMV7_M_ARMV8_M_FP=y
CONFIG_ARMV7_M_ARMV8_M_MAINLINE=y
CONFIG_ARM_MPU=y
CONFIG_ARM_MPU_REGION_MIN_ALIGN_AND_SIZE=32
CONFIG_ASSEMBLER_ISA_THUMB2=y
CONFIG_ASSERT_VERBOSE=y
CONFIG_ATOMIC_OPERATIONS_BUILTIN=y
CONFIG_BOARD="nice_nano"
CONFIG_BOARD_ENABLE_DCDC=y
CONFIG_BOARD_NICE_NANO_V2=y
CONFIG_BOARD_REVISION=""
CONFIG_BOOT_BANNER=y
CONFIG_BOOT_DELAY=0
CONFIG_BT=y
CONFIG_BT_ASSERT=y
CONFIG_BT_ASSERT_VERBOSE=y
CONFIG_BT_ATT_ENFORCE_FLOW=y
CONFIG_BT_ATT_PREPARE_COUNT=0
CONFIG_BT_ATT_RETRY_ON_SEC_ERR=y
CONFIG_BT_AUTO_DATA_LEN_UPDATE=y
CONFIG_BT_AUTO_PHY_UPDATE=y
CONFIG_BT_BACKGROUND_SCAN_INTERVAL=2048
CONFIG_BT_BACKGROUND_SCAN_WINDOW=18
CONFIG_BT_BAS=y
CONFIG_BT_BONDABLE=y
CONFIG_BT_BROADCASTER=y
CONFIG_BT_BUF_ACL_RX_COUNT=3
CONFIG_BT_BUF_ACL_RX_SIZE=69
CONFIG_BT_BUF_ACL_TX_COUNT=3
CONFIG_BT_BUF_ACL_TX_SIZE=27
CONFIG_BT_BUF_CMD_TX_COUNT=2
CONFIG_BT_BUF_CMD_TX_SIZE=65
CONFIG_BT_BUF_EVT_DISCARDABLE_COUNT=3
CONFIG_BT_BUF_EVT_DISCARDABLE_SIZE=43
CONFIG_BT_BUF_EVT_RX_COUNT=3
CONFIG_BT_BUF_EVT_RX_SIZE=68
CONFIG_BT_CENTRAL=y
CONFIG_BT_COMPANY_ID=0x05F1
CONFIG_BT_CONN=y
CONFIG_BT_CONN_PARAM_UPDATE_TIMEOUT=5000
CONFIG_BT_CONN_TX=y
CONFIG_BT_CONN_TX_MAX=3
CONFIG_BT_CREATE_CONN_TIMEOUT=3
CONFIG_BT_CTLR=y
CONFIG_BT_CTLR_ADV_DATA_BUF_MAX=1
CONFIG_BT_CTLR_ADV_EXT_SUPPORT=y
CONFIG_BT_CTLR_ADV_ISO_SUPPORT=y
CONFIG_BT_CTLR_ADV_PERIODIC_SUPPORT=y
CONFIG_BT_CTLR_AD_DATA_BACKUP=y
CONFIG_BT_CTLR_CHAN_SEL_2=y
CONFIG_BT_CTLR_CHAN_SEL_2_SUPPORT=y
CONFIG_BT_CTLR_CHECK_SAME_PEER_CONN=y
CONFIG_BT_CTLR_COMPANY_ID=0x05F1
CONFIG_BT_CTLR_CONN_PARAM_REQ=y
CONFIG_BT_CTLR_CONN_PARAM_REQ_SUPPORT=y
CONFIG_BT_CTLR_CONN_RANDOM_FORCE=y
CONFIG_BT_CTLR_CONN_RSSI_SUPPORT=y
CONFIG_BT_CTLR_CRYPTO=y
CONFIG_BT_CTLR_DATA_LENGTH=y
CONFIG_BT_CTLR_DATA_LENGTH_MAX=27
CONFIG_BT_CTLR_DATA_LEN_UPDATE_SUPPORT=y
CONFIG_BT_CTLR_DTM_HCI_SUPPORT=y
CONFIG_BT_CTLR_DUP_FILTER_LEN=16
CONFIG_BT_CTLR_EXT_REJ_IND=y
CONFIG_BT_CTLR_EXT_REJ_IND_SUPPORT=y
CONFIG_BT_CTLR_EXT_SCAN_FP=y
CONFIG_BT_CTLR_EXT_SCAN_FP_SUPPORT=y
CONFIG_BT_CTLR_FORCE_MD_COUNT=0
CONFIG_BT_CTLR_HCI_VS_BUILD_INFO=""
CONFIG_BT_CTLR_LE_ENC=y
CONFIG_BT_CTLR_LE_ENC_SUPPORT=y
CONFIG_BT_CTLR_LE_PING=y
CONFIG_BT_CTLR_LLCP_CONN=6
CONFIG_BT_CTLR_LLL_PRIO=0
CONFIG_BT_CTLR_MIN_USED_CHAN=y
CONFIG_BT_CTLR_MIN_USED_CHAN_SUPPORT=y
CONFIG_BT_CTLR_OPTIMIZE_FOR_SPEED=y
CONFIG_BT_CTLR_PER_INIT_FEAT_XCHG=y
CONFIG_BT_CTLR_PER_INIT_FEAT_XCHG_SUPPORT=y
CONFIG_BT_CTLR_PHY=y
CONFIG_BT_CTLR_PHY_2M=y
CONFIG_BT_CTLR_PHY_2M_SUPPORT=y
CONFIG_BT_CTLR_PHY_CODED_SUPPORT=y
CONFIG_BT_CTLR_PHY_UPDATE_SUPPORT=y
CONFIG_BT_CTLR_PRIVACY_SUPPORT=y
CONFIG_BT_CTLR_RADIO_ENABLE_FAST=y
CONFIG_BT_CTLR_RX_BUFFERS=1
CONFIG_BT_CTLR_RX_PRIO_STACK_SIZE=448
CONFIG_BT_CTLR_SCHED_ADVANCED=y
CONFIG_BT_CTLR_SCHED_ADVANCED_CENTRAL_CONN_SPACING=0
CONFIG_BT_CTLR_SCHED_ADVANCED_SUPPORT=y
CONFIG_BT_CTLR_SUBVERSION_NUMBER=0xFFFF
CONFIG_BT_CTLR_SYNC_ISO_SUPPORT=y
CONFIG_BT_CTLR_SYNC_PERIODIC_SUPPORT=y
CONFIG_BT_CTLR_TIFS_HW_SUPPORT=y
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_BT_CTLR_ULL_HIGH_PRIO=1
CONFIG_BT_CTLR_ULL_LLL_PRIO_SUPPORT=y
CONFIG_BT_CTLR_ULL_LOW_PRIO=1
CONFIG_BT_CTLR_XTAL_ADVANCED=y
CONFIG_BT_CTLR_XTAL_ADVANCED_SUPPORT=y
CONFIG_BT_CTLR_XTAL_THRESHOLD=1500
CONFIG_BT_DATA_LEN_UPDATE=y
CONFIG_BT_DEBUG_NONE=y
CONFIG_BT_DEVICE_APPEARANCE=961
CONFIG_BT_DEVICE_NAME="Korne"
CONFIG_BT_DIS=y
CONFIG_BT_DIS_MANUF="ZMK Project"
CONFIG_BT_DIS_MODEL="Korne"
CONFIG_BT_DIS_PNP=y
CONFIG_BT_DIS_PNP_PID=0x615E
CONFIG_BT_DIS_PNP_VER=1
CONFIG_BT_DIS_PNP_VID=0x1D50
CONFIG_BT_DIS_PNP_VID_SRC=1
CONFIG_BT_DRIVER_RX_HIGH_PRIO=6
CONFIG_BT_ECC=y
CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=y
CONFIG_BT_GAP_PERIPHERAL_PREF_PARAMS=y
CONFIG_BT_GATT_AUTO_DISCOVER_CCC=y
CONFIG_BT_GATT_CACHING=y
CONFIG_BT_GATT_CLIENT=y
CONFIG_BT_GATT_READ_MULTIPLE=y
CONFIG_BT_GATT_READ_MULT_VAR_LEN=y
CONFIG_BT_GATT_SERVICE_CHANGED=y
CONFIG_BT_HAS_HCI_VS=y
CONFIG_BT_HCI=y
CONFIG_BT_HCI_HOST=y
CONFIG_BT_HCI_RESERVE=0
CONFIG_BT_HCI_TX_PRIO=7
CONFIG_BT_HCI_TX_STACK_SIZE=1024
CONFIG_BT_HCI_VS=y
CONFIG_BT_HCI_VS_EXT=y
CONFIG_BT_ID_MAX=1
CONFIG_BT_L2CAP_TX_BUF_COUNT=3
CONFIG_BT_L2CAP_TX_FRAG_COUNT=2
CONFIG_BT_L2CAP_TX_MTU=65
CONFIG_BT_LIM_ADV_TIMEOUT=30
CONFIG_BT_LLL_VENDOR_NORDIC=y
CONFIG_BT_LL_SW_LLCP_LEGACY=y
CONFIG_BT_LL_SW_SPLIT=y
CONFIG_BT_LONG_WQ=y
CONFIG_BT_LONG_WQ_PRIO=10
CONFIG_BT_LONG_WQ_STACK_SIZE=1300
CONFIG_BT_MAX_CONN=6
CONFIG_BT_MAX_PAIRED=6
CONFIG_BT_MAYFLY_YIELD_AFTER_CALL=y
CONFIG_BT_OBSERVER=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_PERIPHERAL_PREF_LATENCY=30
CONFIG_BT_PERIPHERAL_PREF_MAX_INT=12
CONFIG_BT_PERIPHERAL_PREF_MIN_INT=6
CONFIG_BT_PERIPHERAL_PREF_TIMEOUT=400
CONFIG_BT_PHY_UPDATE=y
CONFIG_BT_RECV_BLOCKING=y
CONFIG_BT_RPA=y
CONFIG_BT_RX_PRIO=8
CONFIG_BT_RX_STACK_SIZE=2200
CONFIG_BT_SETTINGS=y
CONFIG_BT_SETTINGS_CCC_LAZY_LOADING=y
CONFIG_BT_SETTINGS_CCC_STORE_ON_WRITE=y
CONFIG_BT_SETTINGS_USE_PRINTK=y
CONFIG_BT_SMP=y
CONFIG_BT_SMP_APP_PAIRING_ACCEPT=y
CONFIG_BT_SMP_ENFORCE_MITM=y
CONFIG_BT_SMP_MIN_ENC_KEY_SIZE=7
CONFIG_BT_SMP_SC_PAIR_ONLY=y
CONFIG_BT_TICKER_EXT=y
CONFIG_BT_TINYCRYPT_ECC=y
CONFIG_BT_USER_PHY_UPDATE=y
CONFIG_BUILD_OUTPUT_BIN=y
CONFIG_BUILD_OUTPUT_HEX=y
CONFIG_BUILD_OUTPUT_UF2=y
CONFIG_BUILD_OUTPUT_UF2_FAMILY_ID="0xada52840"
CONFIG_CBPRINTF_FULL_INTEGRAL=y
CONFIG_CBPRINTF_LIBC_SUBSTS=y
CONFIG_CBPRINTF_NANO=y
CONFIG_CLOCK_CONTROL=y
CONFIG_CLOCK_CONTROL_INIT_PRIORITY=30
CONFIG_CLOCK_CONTROL_NRF=y
CONFIG_CLOCK_CONTROL_NRF_ACCURACY=50
CONFIG_CLOCK_CONTROL_NRF_K32SRC_50PPM=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
CONFIG_COMPAT_INCLUDES=y
CONFIG_COMPILER_COLOR_DIAGNOSTICS=y
CONFIG_COMPILER_ISA_THUMB2=y
CONFIG_COMPILER_OPT=""
CONFIG_COOP_ENABLED=y
CONFIG_CPU_CORTEX=y
CONFIG_CPU_CORTEX_M4=y
CONFIG_CPU_CORTEX_M=y
CONFIG_CPU_CORTEX_M_HAS_BASEPRI=y
CONFIG_CPU_CORTEX_M_HAS_DWT=y
CONFIG_CPU_CORTEX_M_HAS_PROGRAMMABLE_FAULT_PRIOS=y
CONFIG_CPU_CORTEX_M_HAS_SYSTICK=y
CONFIG_CPU_CORTEX_M_HAS_VTOR=y
CONFIG_CPU_HAS_ARM_MPU=y
CONFIG_CPU_HAS_FPU=y
CONFIG_CPU_HAS_MPU=y
CONFIG_CSPRING_ENABLED=y
CONFIG_CUSTOM_SECTION_MIN_ALIGN_SIZE=32
CONFIG_DCACHE_LINE_SIZE=32
CONFIG_DEPRECATED=y
CONFIG_DISPLAY=y
CONFIG_DISPLAY_INIT_PRIORITY=85
CONFIG_DT_HAS_ARM_ARMV7M_ITM_ENABLED=y
CONFIG_DT_HAS_ARM_CORTEX_M4F_ENABLED=y
CONFIG_DT_HAS_ARM_CRYPTOCELL_310_ENABLED=y
CONFIG_DT_HAS_ARM_V7M_NVIC_ENABLED=y
CONFIG_DT_HAS_FIXED_PARTITIONS_ENABLED=y
CONFIG_DT_HAS_GPIO_LEDS_ENABLED=y
CONFIG_DT_HAS_MMIO_SRAM_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF52_FLASH_CONTROLLER_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_ACL_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_CC310_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_CCM_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_CLOCK_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_ECB_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_EGU_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_FICR_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_GPIOTE_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_GPIO_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_MWU_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_PINCTRL_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_POWER_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_PPI_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_RADIO_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_RNG_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_RTC_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_SAADC_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_SPIM_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_SWI_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_TEMP_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_TIMER_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_TWI_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_UICR_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_USBD_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_WDT_ENABLED=y
CONFIG_DT_HAS_POWER_DOMAIN_ENABLED=y
CONFIG_DT_HAS_POWER_DOMAIN_GPIO_ENABLED=y
CONFIG_DT_HAS_SOC_NV_FLASH_ENABLED=y
CONFIG_DT_HAS_SOLOMON_SSD1306FB_ENABLED=y
CONFIG_DT_HAS_WORLDSEMI_WS2812_SPI_ENABLED=y
CONFIG_DT_HAS_ZEPHYR_BT_HCI_ENTROPY_ENABLED=y
CONFIG_DT_HAS_ZEPHYR_CDC_ACM_UART_ENABLED=y
CONFIG_DT_HAS_ZMK_BATTERY_NRF_VDDH_ENABLED=y
CONFIG_DT_HAS_ZMK_BEHAVIOR_BLUETOOTH_ENABLED=y
CONFIG_DT_HAS_ZMK_BEHAVIOR_EXT_POWER_ENABLED=y
CONFIG_DT_HAS_ZMK_BEHAVIOR_HOLD_TAP_ENABLED=y
CONFIG_DT_HAS_ZMK_BEHAVIOR_KEY_PRESS_ENABLED=y
CONFIG_DT_HAS_ZMK_BEHAVIOR_MACRO_ENABLED=y
CONFIG_DT_HAS_ZMK_BEHAVIOR_MOMENTARY_LAYER_ENABLED=y
CONFIG_DT_HAS_ZMK_BEHAVIOR_NONE_ENABLED=y
CONFIG_DT_HAS_ZMK_BEHAVIOR_RESET_ENABLED=y
CONFIG_DT_HAS_ZMK_BEHAVIOR_RGB_UNDERGLOW_ENABLED=y
CONFIG_DT_HAS_ZMK_BEHAVIOR_TOGGLE_LAYER_ENABLED=y
CONFIG_DT_HAS_ZMK_BEHAVIOR_TRANSPARENT_ENABLED=y
CONFIG_DT_HAS_ZMK_COMBOS_ENABLED=y
CONFIG_DT_HAS_ZMK_CONDITIONAL_LAYERS_ENABLED=y
CONFIG_DT_HAS_ZMK_KEYMAP_ENABLED=y
CONFIG_DT_HAS_ZMK_KSCAN_GPIO_MATRIX_ENABLED=y
CONFIG_DT_HAS_ZMK_MACRO_CONTROL_MODE_PRESS_ENABLED=y
CONFIG_DT_HAS_ZMK_MACRO_CONTROL_MODE_RELEASE_ENABLED=y
CONFIG_DT_HAS_ZMK_MACRO_CONTROL_MODE_TAP_ENABLED=y
CONFIG_DT_HAS_ZMK_MACRO_CONTROL_TAP_TIME_ENABLED=y
CONFIG_DT_HAS_ZMK_MACRO_CONTROL_WAIT_TIME_ENABLED=y
CONFIG_DT_HAS_ZMK_MACRO_PAUSE_FOR_RELEASE_ENABLED=y
CONFIG_DT_HAS_ZMK_MATRIX_TRANSFORM_ENABLED=y
CONFIG_EARLY_CONSOLE=y
CONFIG_ENFORCE_ZEPHYR_STDINT=y
CONFIG_ENTROPY_BT_HCI=y
CONFIG_ENTROPY_GENERATOR=y
CONFIG_ENTROPY_HAS_DRIVER=y
CONFIG_ENTROPY_INIT_PRIORITY=50
CONFIG_ENTROPY_NRF5_BIAS_CORRECTION=y
CONFIG_ENTROPY_NRF5_ISR_POOL_SIZE=16
CONFIG_ENTROPY_NRF5_ISR_THRESHOLD=12
CONFIG_ENTROPY_NRF5_RNG=y
CONFIG_ENTROPY_NRF5_THR_POOL_SIZE=8
CONFIG_ENTROPY_NRF5_THR_THRESHOLD=4
CONFIG_ERRNO=y
CONFIG_ETH_INIT_PRIORITY=80
CONFIG_FAULT_DUMP=2
CONFIG_FLASH=y
CONFIG_FLASH_BASE_ADDRESS=0x0
CONFIG_FLASH_HAS_DRIVER_ENABLED=y
CONFIG_FLASH_HAS_PAGE_LAYOUT=y
CONFIG_FLASH_INIT_PRIORITY=50
CONFIG_FLASH_LOAD_OFFSET=0x26000
CONFIG_FLASH_LOAD_SIZE=0xc6000
CONFIG_FLASH_MAP=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_SIZE=1024
CONFIG_FP16=y
CONFIG_FP16_IEEE=y
CONFIG_GEN_IRQ_START_VECTOR=0
CONFIG_GEN_IRQ_VECTOR_TABLE=y
CONFIG_GEN_ISR_TABLES=y
CONFIG_GEN_PRIV_STACKS=y
CONFIG_GEN_SW_ISR_TABLE=y
CONFIG_GPIO=y
CONFIG_GPIO_AS_PINRESET=y
CONFIG_GPIO_INIT_PRIORITY=40
CONFIG_GPIO_NRFX=y
CONFIG_HARDWARE_DEVICE_CS_GENERATOR=y
CONFIG_HAS_CMSIS_CORE=y
CONFIG_HAS_CMSIS_CORE_M=y
CONFIG_HAS_DTS=y
CONFIG_HAS_DYNAMIC_DEVICE_HANDLES=y
CONFIG_HAS_FLASH_LOAD_OFFSET=y
CONFIG_HAS_HW_NRF_ACL=y
CONFIG_HAS_HW_NRF_CC310=y
CONFIG_HAS_HW_NRF_CCM=y
CONFIG_HAS_HW_NRF_CCM_LFLEN_8BIT=y
CONFIG_HAS_HW_NRF_CLOCK=y
CONFIG_HAS_HW_NRF_ECB=y
CONFIG_HAS_HW_NRF_EGU0=y
CONFIG_HAS_HW_NRF_EGU1=y
CONFIG_HAS_HW_NRF_EGU2=y
CONFIG_HAS_HW_NRF_EGU3=y
CONFIG_HAS_HW_NRF_EGU4=y
CONFIG_HAS_HW_NRF_EGU5=y
CONFIG_HAS_HW_NRF_GPIO0=y
CONFIG_HAS_HW_NRF_GPIO1=y
CONFIG_HAS_HW_NRF_GPIOTE=y
CONFIG_HAS_HW_NRF_MWU=y
CONFIG_HAS_HW_NRF_NVMC_PE=y
CONFIG_HAS_HW_NRF_POWER=y
CONFIG_HAS_HW_NRF_PPI=y
CONFIG_HAS_HW_NRF_RADIO_BLE_2M=y
CONFIG_HAS_HW_NRF_RADIO_BLE_CODED=y
CONFIG_HAS_HW_NRF_RADIO_IEEE802154=y
CONFIG_HAS_HW_NRF_RADIO_TX_PWR_HIGH=y
CONFIG_HAS_HW_NRF_RNG=y
CONFIG_HAS_HW_NRF_RTC0=y
CONFIG_HAS_HW_NRF_RTC1=y
CONFIG_HAS_HW_NRF_RTC2=y
CONFIG_HAS_HW_NRF_SAADC=y
CONFIG_HAS_HW_NRF_SPIM3=y
CONFIG_HAS_HW_NRF_SWI0=y
CONFIG_HAS_HW_NRF_SWI1=y
CONFIG_HAS_HW_NRF_SWI2=y
CONFIG_HAS_HW_NRF_SWI3=y
CONFIG_HAS_HW_NRF_SWI4=y
CONFIG_HAS_HW_NRF_SWI5=y
CONFIG_HAS_HW_NRF_TEMP=y
CONFIG_HAS_HW_NRF_TIMER0=y
CONFIG_HAS_HW_NRF_TIMER1=y
CONFIG_HAS_HW_NRF_TIMER2=y
CONFIG_HAS_HW_NRF_TIMER3=y
CONFIG_HAS_HW_NRF_TIMER4=y
CONFIG_HAS_HW_NRF_TWI0=y
CONFIG_HAS_HW_NRF_USBD=y
CONFIG_HAS_HW_NRF_WDT0=y
CONFIG_HAS_NEWLIB_LIBC_NANO=y
CONFIG_HAS_NORDIC_DRIVERS=y
CONFIG_HAS_NRFX=y
CONFIG_HAS_SEGGER_RTT=y
CONFIG_HAS_SWO=y
CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_HID_INTERRUPT_EP_MPS=16
CONFIG_HWINFO=y
CONFIG_HWINFO_NRF=y
CONFIG_I2C=y
CONFIG_I2C_0_NRF_TWI=y
CONFIG_I2C_INIT_PRIORITY=50
CONFIG_I2C_NRFX=y
CONFIG_ICACHE_LINE_SIZE=32
CONFIG_IDLE_STACK_SIZE=320
CONFIG_INTC_INIT_PRIORITY=40
CONFIG_IRQ_VECTOR_TABLE_JUMP_BY_ADDRESS=y
CONFIG_ISA_THUMB2=y
CONFIG_ISR_STACK_SIZE=2048
CONFIG_KERNEL_BIN_NAME="zmk"
CONFIG_KERNEL_ENTRY="__start"
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT=40
CONFIG_KERNEL_INIT_PRIORITY_DEVICE=50
CONFIG_KERNEL_INIT_PRIORITY_OBJECTS=30
CONFIG_KERNEL_MEM_POOL=y
CONFIG_KOBJECT_DATA_AREA_RESERVE_EXTRA_PERCENT=100
CONFIG_KOBJECT_RODATA_AREA_EXTRA_BYTES=16
CONFIG_KOBJECT_TEXT_AREA=256
CONFIG_LD_LINKER_SCRIPT_SUPPORTED=y
CONFIG_LD_LINKER_TEMPLATE=y
CONFIG_LINKER_GENERIC_SECTIONS_PRESENT_AT_BOOT=y
CONFIG_LINKER_ORPHAN_SECTION_WARN=y
CONFIG_LINKER_SORT_BY_ALIGNMENT=y
CONFIG_LVGL=y
CONFIG_LV_ASSERT_HANDLER_INCLUDE="assert.h"
CONFIG_LV_ATTRIBUTE_MEM_ALIGN_SIZE=1
CONFIG_LV_CIRCLE_CACHE_SIZE=4
CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00
CONFIG_LV_COLOR_DEPTH=1
CONFIG_LV_COLOR_DEPTH_1=y
CONFIG_LV_COLOR_MIX_ROUND_OFS=128
CONFIG_LV_CONF_MINIMAL=y
CONFIG_LV_DISP_DEF_REFR_PERIOD=30
CONFIG_LV_DISP_ROT_MAX_BUF=10240
CONFIG_LV_DPI_DEF=130
CONFIG_LV_DRAW_COMPLEX=y
CONFIG_LV_FONT_DEFAULT_MONTSERRAT_16=y
CONFIG_LV_FONT_MONTSERRAT_12=y
CONFIG_LV_FONT_MONTSERRAT_16=y
CONFIG_LV_FONT_UNSCII_8=y
CONFIG_LV_GRADIENT_MAX_STOPS=2
CONFIG_LV_GRAD_CACHE_DEF_SIZE=0
CONFIG_LV_IMG_CACHE_DEF_SIZE=0
CONFIG_LV_INDEV_DEF_READ_PERIOD=30
CONFIG_LV_LABEL_LONG_TXT_HINT=y
CONFIG_LV_LABEL_TEXT_SELECTION=y
CONFIG_LV_MEM_BUF_MAX_NUM=16
CONFIG_LV_MEM_CUSTOM=y
CONFIG_LV_MEM_CUSTOM_INCLUDE="stdlib.h"
CONFIG_LV_SHADOW_CACHE_SIZE=0
CONFIG_LV_TXT_BREAK_CHARS=" ,.;:-_"
CONFIG_LV_TXT_COLOR_CMD="#"
CONFIG_LV_TXT_ENC_UTF8=y
CONFIG_LV_TXT_LINE_BREAK_LONG_LEN=0
CONFIG_LV_USE_LABEL=y
CONFIG_LV_USE_USER_DATA=y
CONFIG_LV_Z_BITS_PER_PIXEL=1
CONFIG_LV_Z_BUFFER_ALLOC_STATIC=y
CONFIG_LV_Z_DPI=148
CONFIG_LV_Z_MEM_POOL_MAX_SIZE=8192
CONFIG_LV_Z_MEM_POOL_MIN_SIZE=32
CONFIG_LV_Z_MEM_POOL_NUMBER_BLOCKS=1
CONFIG_LV_Z_MEM_POOL_SYS_HEAP=y
CONFIG_LV_Z_POINTER_KSCAN_MSGQ_COUNT=10
CONFIG_LV_Z_VDB_SIZE=64
CONFIG_MAIN_STACK_SIZE=1024
CONFIG_MAIN_THREAD_PRIORITY=0
CONFIG_MAX_TIMER_COUNT=5
CONFIG_MINIMAL_LIBC=y
CONFIG_MINIMAL_LIBC_CALLOC=y
CONFIG_MINIMAL_LIBC_MALLOC=y
CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE=0
CONFIG_MINIMAL_LIBC_NON_REENTRANT_FUNCTIONS=y
CONFIG_MINIMAL_LIBC_OPTIMIZE_STRING_FOR_SIZE=y
CONFIG_MINIMAL_LIBC_REALLOCARRAY=y
CONFIG_MINIMAL_LIBC_TIME=y
CONFIG_MPU=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT=y
CONFIG_MP_NUM_CPUS=1
CONFIG_MULTITHREADING=y
CONFIG_NEED_LIBC_MEM_PARTITION=y
CONFIG_NET_BUF=y
CONFIG_NET_BUF_USER_DATA_SIZE=0
CONFIG_NRFX_CLOCK=y
CONFIG_NRFX_CLOCK_LFXO_TWO_STAGE_ENABLED=y
CONFIG_NRFX_GPIOTE=y
CONFIG_NRFX_GPIOTE_NUM_OF_EVT_HANDLERS=1
CONFIG_NRFX_NVMC=y
CONFIG_NRFX_POWER=y
CONFIG_NRFX_TWI0=y
CONFIG_NRFX_TWI=y
CONFIG_NRFX_USBD=y
CONFIG_NRF_802154_SOURCE_HAL_NORDIC=y
CONFIG_NRF_ACL_FLASH_REGION_SIZE=0
CONFIG_NRF_APPROTECT_USE_UICR=y
CONFIG_NRF_ENABLE_ICACHE=y
CONFIG_NRF_HW_RTC0_RESERVED=y
CONFIG_NRF_HW_RTC1_RESERVED=y
CONFIG_NRF_HW_TIMER0_RESERVED=y
CONFIG_NRF_RTC_TIMER=y
CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=0
CONFIG_NRF_SOC_SECURE_SUPPORTED=y
CONFIG_NULL_POINTER_EXCEPTION_DETECTION_NONE=y
CONFIG_NUM_COOP_PRIORITIES=16
CONFIG_NUM_IRQS=48
CONFIG_NUM_MBOX_ASYNC_MSGS=10
CONFIG_NUM_METAIRQ_PRIORITIES=0
CONFIG_NUM_PREEMPT_PRIORITIES=15
CONFIG_NVS=y
CONFIG_OUTPUT_DISASSEMBLY=y
CONFIG_OUTPUT_PRINT_MEMORY_USAGE=y
CONFIG_OUTPUT_STAT=y
CONFIG_PICOLIBC_SUPPORTED=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_NRF=y
CONFIG_PINCTRL_STORE_REG=y
CONFIG_PLATFORM_SPECIFIC_INIT=y
CONFIG_PM=y
CONFIG_PM_DEVICE=y
CONFIG_PM_DEVICE_POWER_DOMAIN=y
CONFIG_PM_DEVICE_POWER_DOMAIN_DYNAMIC=y
CONFIG_PM_DEVICE_POWER_DOMAIN_DYNAMIC_NUM=2
CONFIG_PM_DEVICE_RUNTIME=y
CONFIG_PM_DEVICE_RUNTIME_EXCLUSIVE=y
CONFIG_PM_POLICY_DEFAULT=y
CONFIG_POLL=y
CONFIG_POSIX_MAX_FDS=4
CONFIG_POWER_DOMAIN=y
CONFIG_POWER_DOMAIN_GPIO=y
CONFIG_PREEMPT_ENABLED=y
CONFIG_PRINTK=y
CONFIG_PRIORITY_CEILING=-127
CONFIG_PRIVILEGED_STACK_SIZE=1024
CONFIG_REBOOT=y
CONFIG_RISCV_MACHINE_TIMER_MIN_DELAY=100
CONFIG_RISCV_MACHINE_TIMER_SYSTEM_CLOCK_DIVIDER=0
CONFIG_ROM_START_OFFSET=0
CONFIG_RUNTIME_ERROR_CHECKS=y
CONFIG_SCHED_DUMB=y
CONFIG_SENSOR=y
CONFIG_SENSOR_INIT_PRIORITY=90
CONFIG_SETTINGS=y
CONFIG_SETTINGS_DYNAMIC_HANDLERS=y
CONFIG_SETTINGS_NVS=y
CONFIG_SETTINGS_NVS_SECTOR_COUNT=8
CONFIG_SETTINGS_NVS_SECTOR_SIZE_MULT=1
CONFIG_SHIELD_CORNE_LEFT=y
CONFIG_SIZE_OPTIMIZATIONS=y
CONFIG_SOC="nRF52840_QIAA"
CONFIG_SOC_COMPATIBLE_NRF52X=y
CONFIG_SOC_COMPATIBLE_NRF=y
CONFIG_SOC_DCDC_NRF52X=y
CONFIG_SOC_FAMILY="nordic_nrf"
CONFIG_SOC_FAMILY_NRF=y
CONFIG_SOC_FLASH_NRF=y
CONFIG_SOC_FLASH_NRF_RADIO_SYNC_TICKER=y
CONFIG_SOC_HAS_TIMING_FUNCTIONS=y
CONFIG_SOC_NRF52840=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_SOC_SERIES="nrf52"
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SRAM_BASE_ADDRESS=0x20000000
CONFIG_SRAM_OFFSET=0
CONFIG_SRAM_REGION_PERMISSIONS=y
CONFIG_SRAM_SIZE=256
CONFIG_SSD1306=y
CONFIG_SSD1306_DEFAULT=y
CONFIG_SSD1306_DEFAULT_CONTRAST=128
CONFIG_SSD1306_REVERSE_MODE=y
CONFIG_STACK_ALIGN_DOUBLE_WORD=y
CONFIG_STACK_POINTER_RANDOM=0
CONFIG_SUPPORT_MINIMAL_LIBC=y
CONFIG_SWAP_NONATOMIC=y
CONFIG_SYSTEM_CLOCK_INIT_PRIORITY=0
CONFIG_SYSTEM_CLOCK_WAIT_FOR_STABILITY=y
CONFIG_SYSTEM_WORKQUEUE_PRIORITY=-1
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_SYS_CLOCK_EXISTS=y
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=32768
CONFIG_SYS_CLOCK_MAX_TIMEOUT_DAYS=365
CONFIG_SYS_CLOCK_TICKS_PER_SEC=32768
CONFIG_SYS_HEAP_ALLOC_LOOPS=3
CONFIG_SYS_HEAP_SMALL_ONLY=y
CONFIG_TEMP_NRF5=y
CONFIG_THREAD_STACK_INFO=y
CONFIG_TICKLESS_CAPABLE=y
CONFIG_TICKLESS_KERNEL=y
CONFIG_TIMEOUT_64BIT=y
CONFIG_TIMESLICE_PRIORITY=0
CONFIG_TIMESLICE_SIZE=0
CONFIG_TIMESLICING=y
CONFIG_TINYCRYPT=y
CONFIG_TINYCRYPT_AES=y
CONFIG_TINYCRYPT_AES_CMAC=y
CONFIG_TINYCRYPT_ECC_DH=y
CONFIG_TMP112_FULL_SCALE_RUNTIME=y
CONFIG_TMP112_SAMPLING_FREQUENCY_RUNTIME=y
CONFIG_TOOLCHAIN_HAS_BUILTIN_FFS=y
CONFIG_TOOLCHAIN_SUPPORTS_THREAD_LOCAL_STORAGE=y
CONFIG_TOOLCHAIN_ZEPHYR_0_15=y
CONFIG_TOOLCHAIN_ZEPHYR_SUPPORTS_THREAD_LOCAL_STORAGE=y
CONFIG_USB_DEVICE_DRIVER=y
CONFIG_USB_DEVICE_HID=y
CONFIG_USB_DEVICE_MANUFACTURER="ZMK Project"
CONFIG_USB_DEVICE_PID=0x615E
CONFIG_USB_DEVICE_PRODUCT="Korne"
CONFIG_USB_DEVICE_REMOTE_WAKEUP=y
CONFIG_USB_DEVICE_SN="0123456789ABCDEF"
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_VID=0x1D50
CONFIG_USB_HID_DEVICE_COUNT=1
CONFIG_USB_HID_DEVICE_NAME="HID"
CONFIG_USB_HID_POLL_INTERVAL_MS=1
CONFIG_USB_HID_REPORTS=1
CONFIG_USB_MAX_ALT_SETTING=8
CONFIG_USB_MAX_NUM_TRANSFERS=4
CONFIG_USB_MAX_POWER=50
CONFIG_USB_NRFX=y
CONFIG_USB_NRFX_ATTACHED_EVENT_DELAY=0
CONFIG_USB_NRFX_EVT_QUEUE_SIZE=32
CONFIG_USB_NRFX_WORK_QUEUE_STACK_SIZE=1024
CONFIG_USB_NUMOF_EP_WRITE_RETRIES=10
CONFIG_USB_PID_BLE_HCI_H4_SAMPLE=0x000C
CONFIG_USB_PID_BLE_HCI_SAMPLE=0x000B
CONFIG_USB_PID_CDC_ACM_COMPOSITE_SAMPLE=0x0002
CONFIG_USB_PID_CDC_ACM_SAMPLE=0x0001
CONFIG_USB_PID_CONSOLE_SAMPLE=0x0004
CONFIG_USB_PID_DFU_SAMPLE=0x0005
CONFIG_USB_PID_HID_CDC_SAMPLE=0x0003
CONFIG_USB_PID_HID_MOUSE_SAMPLE=0x0007
CONFIG_USB_PID_HID_SAMPLE=0x0006
CONFIG_USB_PID_MASS_SAMPLE=0x0008
CONFIG_USB_PID_TESTUSB_SAMPLE=0x0009
CONFIG_USB_PID_WEBUSB_SAMPLE=0x000A
CONFIG_USB_PID_WPANUSB_SAMPLE=0x000D
CONFIG_USB_REQUEST_BUFFER_SIZE=128
CONFIG_USB_SELF_POWERED=y
CONFIG_USE_DT_CODE_PARTITION=y
CONFIG_WAITQ_DUMB=y
CONFIG_WARN_DEPRECATED=y
CONFIG_XIP=y
CONFIG_XOSHIRO_RANDOM_GENERATOR=y
CONFIG_ZEPHYR_CANOPENNODE_MODULE=y
CONFIG_ZEPHYR_CHRE_MODULE=y
CONFIG_ZEPHYR_DRIVERS_MODULE=y
CONFIG_ZEPHYR_HAL_ESPRESSIF_MODULE=y
CONFIG_ZEPHYR_HAL_GIGADEVICE_MODULE=y
CONFIG_ZEPHYR_HAL_NORDIC_MODULE=y
CONFIG_ZEPHYR_HAL_RPI_PICO_MODULE=y
CONFIG_ZEPHYR_HAL_TELINK_MODULE=y
CONFIG_ZEPHYR_LIBLC3_MODULE=y
CONFIG_ZEPHYR_LITTLEFS_MODULE=y
CONFIG_ZEPHYR_LVGL_MODULE=y
CONFIG_ZEPHYR_LZ4_MODULE=y
CONFIG_ZEPHYR_MBEDTLS_MODULE=y
CONFIG_ZEPHYR_NANOPB_MODULE=y
CONFIG_ZEPHYR_PICOLIBC_MODULE=y
CONFIG_ZEPHYR_TFLITE_MICRO_MODULE=y
CONFIG_ZEPHYR_TRACERECORDER_MODULE=y
CONFIG_ZEPHYR_TRUSTED_FIRMWARE_A_MODULE=y
CONFIG_ZEPHYR_UOSCORE_UEDHOC_MODULE=y
CONFIG_ZEPHYR_ZCBOR_MODULE=y
CONFIG_ZEPHYR_ZSCILIB_MODULE=y
CONFIG_ZMK_BATTERY=y
CONFIG_ZMK_BATTERY_NRF_VDDH=y
CONFIG_ZMK_BATTERY_REPORT_INTERVAL=60
CONFIG_ZMK_BEHAVIORS_QUEUE_SIZE=64
CONFIG_ZMK_BLE=y
CONFIG_ZMK_BLE_CONSUMER_REPORT_QUEUE_SIZE=5
CONFIG_ZMK_BLE_INIT_PRIORITY=50
CONFIG_ZMK_BLE_KEYBOARD_REPORT_QUEUE_SIZE=20
CONFIG_ZMK_BLE_SPLIT_CENTRAL_SPLIT_RUN_QUEUE_SIZE=5
CONFIG_ZMK_BLE_SPLIT_CENTRAL_SPLIT_RUN_STACK_SIZE=512
CONFIG_ZMK_BLE_THREAD_PRIORITY=5
CONFIG_ZMK_BLE_THREAD_STACK_SIZE=512
CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=5
CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO=4
CONFIG_ZMK_COMBO_MAX_PRESSED_COMBOS=4
CONFIG_ZMK_DISPLAY=y
CONFIG_ZMK_DISPLAY_BLANK_ON_IDLE=y
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_PRIORITY=5
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y
CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
CONFIG_ZMK_HID_CONSUMER_REPORT_SIZE=6
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_FULL=y
CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y
CONFIG_ZMK_IDLE_TIMEOUT=30000
CONFIG_ZMK_KEYBOARD_NAME="Korne"
CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=0
CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5
CONFIG_ZMK_KSCAN_EVENT_QUEUE_SIZE=4
CONFIG_ZMK_KSCAN_GPIO_DRIVER=y
CONFIG_ZMK_KSCAN_GPIO_MATRIX=y
CONFIG_ZMK_KSCAN_INIT_PRIORITY=40
CONFIG_ZMK_KSCAN_MATRIX_WAIT_BEFORE_INPUTS=0
CONFIG_ZMK_KSCAN_MATRIX_WAIT_BETWEEN_OUTPUTS=0
CONFIG_ZMK_LOG_LEVEL=4
CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_12=y
CONFIG_ZMK_MACRO_DEFAULT_TAP_MS=30
CONFIG_ZMK_MACRO_DEFAULT_WAIT_MS=15
CONFIG_ZMK_POWER_DOMAINS=y
CONFIG_ZMK_POWER_DOMAINS_DYNAMIC_DEFAULT=y
CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE=60000
CONFIG_ZMK_SPLIT=y
CONFIG_ZMK_SPLIT_BLE=y
CONFIG_ZMK_SPLIT_BLE_CENTRAL_POSITION_QUEUE_SIZE=5
CONFIG_ZMK_SPLIT_ROLE_CENTRAL=y
CONFIG_ZMK_USB=y
CONFIG_ZMK_USB_INIT_PRIORITY=50
CONFIG_ZMK_WIDGET_BATTERY_STATUS=y
CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y
CONFIG_ZMK_WIDGET_LAYER_STATUS=y
CONFIG_ZMK_WIDGET_OUTPUT_STATUS=y
CONFIG_ZMK_WIDGET_WPM_STATUS=y
CONFIG_ZMK_WPM=y

View file

@ -0,0 +1,360 @@
# configuration for https://github.com/caksoylar/keymap-drawer
draw_config:
footer_text: 'Keymap View: <a href="https://github.com/caksoylar/keymap-drawer">keymap-drawer</a>'
# dark_mode: auto
n_columns: 1
# draw_key_sides: true # draw a square in the middle of the keys
key_w: 60.0
key_h: 56.0
split_gap: 30.0
combo_w: 28.0
combo_h: 26.0
key_rx: 6.0
key_ry: 6.0
inner_pad_w: 2.0
inner_pad_h: 2.0
outer_pad_w: 40.0
outer_pad_h: 56.0
line_spacing: 1.2
arc_radius: 6.0
append_colon_to_layer_header: true
small_pad: 2.0
svg_extra_style: |
/* For default sytles, see https://github.com/caksoylar/keymap-drawer/blob/main/keymap_drawer/config.py#L85 */
svg.keymap {
font-family: Ubuntu Mono, Inconsolata, Consolas, Liberation Mono, Menlo, monospace;
font-size: 16px;
font-weight: bold;
text-rendering: optimizeLegibility;
}
/* Color accent for held keys
red = #f00
green = #0f0
blue = #00f
yellow = #ff0
cyan = #0ff
magenta = #f0f
white = #fff
black = #000
grey = #888
light grey = #ccc
#ffc
*/
rect.held, rect.combo.held {
fill: #f00;
}
/* Technique borrowed and extended from https://github.com/englmaxi/zmk-config/blob/master/keymap-drawer/config.yaml */
.sym_sub_text.tap {
translate: -5px 2px;
font-size: 20px;
}
.sym_sub_text.shifted {
translate: 10px 13px;
font-size: 10px;
opacity: 1.0;
}
.combo.sym_sub_text.tap {
translate: -1px 1px;
}
.combo.sym_sub_text.shifted {
translate: 7px 5px;
font-size: 10px;
opacity: 1.0;
}
/* Toggle */
.toggle.shifted {
translate: -10px 12px;
}
.toggle.hold {
translate: 13px -23px;
}
/* Variant for tap-dances */
.tap_dance.tap {
translate: -7px 0px;
font-size: 12px;
}
.tap_dance.shifted {
translate: 7px 17px;
font-size: 12px;
opacity: 1.0;
}
/* Variant for symbol next to symbol */
.sym_by_sym.tap {
translate: -6px 0px;
}
.sym_by_sym.shifted {
translate: 10px 12px;
opacity: 1.0;
}
.combo.sym_by_sym.tap {
translate: -35px 0px;
}
.combo.sym_by_sym.shifted {
translate: 35px 20px;
opacity: 1.0;
}
.combo.sym_by_sym.hold {
visibility: hidden;
}
/* hide hold box for combo sym_by_sym */
.combo.sym_by_sym.hold > path[stroke="none"][fill="none"] {
visibility: hidden;
}
shrink_wide_legends: 6
glyph_tap_size: 18
glyph_hold_size: 15
glyph_shifted_size: 15
glyphs: {}
glyph_urls:
tabler: https://unpkg.com/@tabler/icons/icons/outline/{}.svg
tablerf: https://unpkg.com/@tabler/icons/icons/filled/{}.svg
mdi: https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/master/svg/{}.svg
mdil: https://raw.githubusercontent.com/Pictogrammers/MaterialDesignLight/master/svg/{}.svg
material: https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/{}/default/48px.svg
use_local_cache: true
parse_config:
raw_binding_map:
'&sys_reset': Reset
'&bootloader': Boot
'&swapper': Win Next
'&caps_word': Caps Word
'&inv_qm': ¿
'&kp LC(LG(LEFT))': Desk Left
'&kp LC(LG(RIGHT))': Desk Right
'&kp LC(TAB)': Tab Right
'&kp LC(LS(TAB))': Tab Left
'&kp LA(F4)': Win Close
'&kp LC(F4)': Tab Close
'&kp LS(TAB)': Win Prev
'&kp LS(INS)': Paste
'&kp LG(L)': Lock
'&out OUT_USB': Out USB
'&out OUT_BLE': Out BLE
'&bt BT_SEL 0': BT 1
'&bt BT_SEL 1': BT 2
'&bt BT_SEL 2': BT 3
'&bt BT_SEL 3': BT 4
'&bt BT_SEL 4': BT 5
'&mmv MOVE_UP': Mouse ↑
'&mmv MOVE_DOWN': Mouse ↓
'&mmv MOVE_LEFT': Mouse ←
'&mmv MOVE_RIGHT': Mouse →
'&msc SCRL_UP': Scroll ↑
'&msc SCRL_DOWN': Scroll ↓
'&msc SCRL_LEFT': Scroll ←
'&msc SCRL_RIGHT': Scroll →
'&mkp MCLK': Middle Click
'&mkp MB4': Back Click
'&mkp MB5': Forward Click
qmk_keycode_map:
XXXXXXX: ''
'NO': ''
MINUS: '-'
MINS: '-'
EQUAL: '='
EQL: '='
LEFT_BRACKET: '['
LBRC: '['
RIGHT_BRACKET: ']'
RBRC: ']'
BACKSLASH: \
BSLS: \
NONUS_HASH: '#'
NUHS: '#'
SEMICOLON: ;
SCLN: ;
QUOTE: ''''
QUOT: ''''
GRAVE: '`'
GRV: '`'
COMMA: ','
COMM: ','
DOT: .
SLASH: /
SLSH: /
TILDE: '~'
TILD: '~'
EXCLAIM: '!'
EXLM: '!'
AT: '@'
HASH: '#'
DOLLAR: $
DLR: $
PERCENT: '%'
PERC: '%'
CIRCUMFLEX: ^
CIRC: ^
AMPERSAND: '&'
AMPR: '&'
ASTERISK: '*'
ASTR: '*'
LEFT_PAREN: (
LPRN: (
RIGHT_PAREN: )
RPRN: )
UNDERSCORE: _
UNDS: _
PLUS: +
LEFT_CURLY_BRACE: '{'
LCBR: '{'
RIGHT_CURLY_BRACE: '}'
RCBR: '}'
PIPE: '|'
COLON: ':'
COLN: ':'
DOUBLE_QUOTE: '"'
DQUO: '"'
DQT: '"'
LEFT_ANGLE_BRACKET: <
LABK: <
LT: <
RIGHT_ANGLE_BRACKET: '>'
RABK: '>'
GT: '>'
QUESTION: '?'
QUES: '?'
zmk_combos:
combo_tab: {align: top, o: 0.15}
combo_del: {align: top, o: 0.15}
combo_f12: {align: bottom}
combo_btclr: {align: bottom}
combo_play: {align: right}
combo_capswd: {draw_separate: true}
combo_semi: {draw_separate: true}
combo_grave: {draw_separate: true}
combo_lpar: {draw_separate: true}
combo_rpar: {draw_separate: true}
combo_lbkt: {draw_separate: true}
combo_rbkt: {draw_separate: true}
combo_tab: {draw_separate: true}
combo_del: {draw_separate: true}
combo_esc: {draw_separate: true}
combo_ret: {draw_separate: true}
combo_lock: {draw_separate: true}
combo_bslh: {draw_separate: true}
combo_slsh: {draw_separate: true}
zmk_keycode_map:
# custom mappings
C_VOL_UP: Vol Up
C_VOL_DN: Vol Down
C_AL_CALC: Calc
# C_PP: Play Pause
LCTRL: Ctrl
RCTRL: Ctrl
LALT: Alt
RALT: Alt
LGUI: Gui
RGUI: Gui
LSHFT: Shift
RSHFT: Shift
ESC: Esc
SPACE:
BSPC:
RET:
TAB:
DEL:
PG_UP: Page Up
PG_DN: Page Down
INS: Insert
HOME: Home
END: End
CAPS: Caps Lock
PSCRN: Print Scrn
PAUSE_BREAK: Pause Break
UP:
DOWN:
LEFT:
RIGHT:
C_PP:
C_NEXT: ⏭️
C_PREV: ⏮️
# defaults
# AMPERSAND: '&'
# AMPS: '&'
APOS: "'"
APOSTROPHE: "'"
ASTERISK: '*'
ASTRK: '*'
AT: '@'
AT_SIGN: '@'
BACKSLASH: \
BSLH: \
CARET: ^
COLON: ':'
COMMA: ','
DLLR: $
DOLLAR: $
DOT: .
DOUBLE_QUOTES: '"'
DQT: '"'
EQUAL: '='
EXCL: '!'
EXCLAMATION: '!'
FSLH: /
GRAVE: '`'
GREATER_THAN: '>'
GT: '>'
HASH: '#'
LBKT: '['
LBRC: '{'
LEFT_BRACE: '{'
LEFT_BRACKET: '['
LEFT_PARENTHESIS: (
LESS_THAN: <
LPAR: (
LT: <
MINUS: '-'
NON_US_BACKSLASH: \
NON_US_BSLH: '|'
NON_US_HASH: '#'
NUHS: '#'
PERCENT: '%'
PERIOD: .
PIPE: '|'
PIPE2: '|'
PLUS: +
POUND: '#'
PRCNT: '%'
QMARK: '?'
QUESTION: '?'
RBKT: ']'
RBRC: '}'
RIGHT_BRACE: '}'
RIGHT_BRACKET: ']'
RIGHT_PARENTHESIS: )
RPAR: )
SEMI: ;
SEMICOLON: ;
SINGLE_QUOTE: ''''
SLASH: /
SQT: ''''
STAR: '*'
TILDE: '~'
TILDE2: '~'
UNDER: _
UNDERSCORE: _

View file

@ -1,105 +0,0 @@
# ========================================
# FileName: corne.conf
# Date: 07.06.2023
# Author: Marcos Chow Castro
# Email: mctechnology170318@gmail.com
# GitHub: https://github.com/mctechnology17
# Brief: configuration file for ZMK firmware
# Board: nice_nano_v2 and puchi_ble_v1
# ╔═╦═╦═╗
# ╔════╗ ║║║║║╔╝
# ║╔╗╔╗║ ║║║║║╚╗
# ╚╝║║╚╝ ║╠═╩╩═╝
# ║╠═╦═╣╚╦═╦╦═╦╗╔═╦═╦╦╗
# ║║╩╣═╣║║║║║╬║╚╣╬║╬║║║
# ╚╩═╩═╩╩╩╩═╩═╩═╩═╬╗╠╗║
# ╚═╩═╝
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
# =========================================
# on config_zmk.h file enable/disable the following options, if you want to
# use CONFIG_ZMK_MOUSE=y, CONFIG_ZMK_RGB_UNDERGLOW=y, CONFIG_ZMK_RGB_UNDERGLOW=y
# mouse config, 1 = enable, 0 = disable, default = 1
# 2 = enable, but with rgb matrix
# #define MC_TECHNOLOGY_MOUSE_ENABLE 1
# rgb matrix config, 1 = enable, 0 = disable, default = 0
# #define MC_TECHNOLOGY_RGB_ENABLE 0
# define macros on for .dtsi file 1 = enable, 0 = disable default = 1
# #define MC_TECHNOLOGY_MACROS_ENABLE 1
### Keyboard name
# 1 nice
CONFIG_ZMK_KEYBOARD_NAME="Nice Corne"
# 1 puchi
# CONFIG_ZMK_KEYBOARD_NAME="Puchi Corne"
### Boost Bluetooth TX power, also make Bluetooth stronger
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
# Tune bluetooth profiles for quick select
# CONFIG_BT_MAX_CONN=3
### POWER OPTIONS
CONFIG_ZMK_EXT_POWER=y
CONFIG_ZMK_SLEEP=y
# 2 puchi 15 min (15*60*1000ms)
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000
# 2 nice 30 min (30*60*1000ms)
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000
# CONFIG_ZMK_IDLE_TIMEOUT=120000
# Disable external power when not connected to USB
# CONFIG_ZMK_EXT_POWER_USB_ONLY=y
### MOUSE
CONFIG_ZMK_MOUSE=y
### RGB UNDERGLOW
# uncomment to enable RGB Underglow or backlight
CONFIG_ZMK_RGB_UNDERGLOW=y
CONFIG_WS2812_STRIP=y
# apaga si no se usa el teclado
# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
# 0 Solid color 1 Breathe 2 Spectrum 3 Swirl
CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3
# nivel de brillo en porcentaje, el valor por defecto es 10 por ciento
CONFIG_ZMK_RGB_UNDERGLOW_BRT_STEP=1
# Turn off RGB underglow when keyboard goes into idle state
CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
# # Hue step in degrees (0-359) used by RGB actions default 10
# CONFIG_ZMK_RGB_UNDERGLOW_HUE_STEP=30
# # Brightness step in percent used by RGB actions default 10
# CONFIG_ZMK_RGB_UNDERGLOW_SAT_STEP=2
# CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=240
# CONFIG_ZMK_RGB_UNDERGLOW_SAT_START=10
# CONFIG_ZMK_RGB_UNDERGLOW_BRT_START=15
# Uncomment the line below to disable external power toggling by the underglow.
# By default toggling the underglow on and off also toggles external power
# on and off. This also causes the display to turn off.
CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=n
### OLED Display
CONFIG_ZMK_DISPLAY=y
# esto creo que ya no es necesario
# CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
# CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y
### WIDGET SETTINGS compatible SOLO con OLED
# No Widget configurations added since nice!view has its own custom widgets
# activar solo estos dos widgets
CONFIG_ZMK_WIDGET_WPM_STATUS=n
CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y
# CONFIG_ZMK_WIDGET_LAYER_STATUS=y
# CONFIG_ZMK_WIDGET_BATTERY_STATUS=y
# CONFIG_ZMK_WIDGET_OUTPUT_STATUS=y
### HID para nice!view ePaperDisplay
# Enable eager debouncing
# "Eager Debouncing"
# Trying to lower the input lag.
# CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1
# CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5
### Improves compatibility with iPad
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y

View file

@ -1,105 +0,0 @@
# ========================================
# FileName: corne.conf
# Date: 07.06.2023
# Author: Marcos Chow Castro
# Email: mctechnology170318@gmail.com
# GitHub: https://github.com/mctechnology17
# Brief: configuration file for ZMK firmware
# Board: nice_nano_v2 and puchi_ble_v1
# ╔═╦═╦═╗
# ╔════╗ ║║║║║╔╝
# ║╔╗╔╗║ ║║║║║╚╗
# ╚╝║║╚╝ ║╠═╩╩═╝
# ║╠═╦═╣╚╦═╦╦═╦╗╔═╦═╦╦╗
# ║║╩╣═╣║║║║║╬║╚╣╬║╬║║║
# ╚╩═╩═╩╩╩╩═╩═╩═╩═╬╗╠╗║
# ╚═╩═╝
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
# =========================================
# on config_zmk.h file enable/disable the following options, if you want to
# use CONFIG_ZMK_MOUSE=y, CONFIG_ZMK_RGB_UNDERGLOW=y, CONFIG_ZMK_RGB_UNDERGLOW=y
# mouse config, 1 = enable, 0 = disable, default = 1
# 2 = enable, but with rgb matrix
# #define MC_TECHNOLOGY_MOUSE_ENABLE 1
# rgb matrix config, 1 = enable, 0 = disable, default = 0
# #define MC_TECHNOLOGY_RGB_ENABLE 0
# define macros on for .dtsi file 1 = enable, 0 = disable default = 1
# #define MC_TECHNOLOGY_MACROS_ENABLE 1
### Keyboard name
# 1 nice
CONFIG_ZMK_KEYBOARD_NAME="Nice Corne"
# 1 puchi
# CONFIG_ZMK_KEYBOARD_NAME="Puchi Corne"
### Boost Bluetooth TX power, also make Bluetooth stronger
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
# Tune bluetooth profiles for quick select
# CONFIG_BT_MAX_CONN=3
### POWER OPTIONS
CONFIG_ZMK_EXT_POWER=y
CONFIG_ZMK_SLEEP=y
# 2 puchi 15 min (15*60*1000ms)
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000
# 2 nice 30 min (30*60*1000ms)
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000
# CONFIG_ZMK_IDLE_TIMEOUT=120000
# Disable external power when not connected to USB
# CONFIG_ZMK_EXT_POWER_USB_ONLY=y
### MOUSE
CONFIG_ZMK_MOUSE=y
### RGB UNDERGLOW
# uncomment to enable RGB Underglow or backlight
# CONFIG_ZMK_RGB_UNDERGLOW=y
# CONFIG_WS2812_STRIP=y
# apaga si no se usa el teclado
# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
# 0 Solid color 1 Breathe 2 Spectrum 3 Swirl
# CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3
# nivel de brillo en porcentaje, el valor por defecto es 10 por ciento
# CONFIG_ZMK_RGB_UNDERGLOW_BRT_STEP=1
# Turn off RGB underglow when keyboard goes into idle state
# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
# # Hue step in degrees (0-359) used by RGB actions default 10
# CONFIG_ZMK_RGB_UNDERGLOW_HUE_STEP=30
# # Brightness step in percent used by RGB actions default 10
# CONFIG_ZMK_RGB_UNDERGLOW_SAT_STEP=2
# CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=240
# CONFIG_ZMK_RGB_UNDERGLOW_SAT_START=10
# CONFIG_ZMK_RGB_UNDERGLOW_BRT_START=15
# Uncomment the line below to disable external power toggling by the underglow.
# By default toggling the underglow on and off also toggles external power
# on and off. This also causes the display to turn off.
# CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=n
### OLED Display
# CONFIG_ZMK_DISPLAY=y
# esto creo que ya no es necesario
# CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
# CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y
### WIDGET SETTINGS compatible SOLO con OLED
# No Widget configurations added since nice!view has its own custom widgets
# activar solo estos dos widgets
# CONFIG_ZMK_WIDGET_WPM_STATUS=n
# CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y
# CONFIG_ZMK_WIDGET_LAYER_STATUS=y
# CONFIG_ZMK_WIDGET_BATTERY_STATUS=y
# CONFIG_ZMK_WIDGET_OUTPUT_STATUS=y
### HID para nice!view ePaperDisplay
# Enable eager debouncing
# "Eager Debouncing"
# Trying to lower the input lag.
CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1
CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5
### Improves compatibility with iPad
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y

View file

@ -1,105 +0,0 @@
# ========================================
# FileName: corne.conf
# Date: 07.06.2023
# Author: Marcos Chow Castro
# Email: mctechnology170318@gmail.com
# GitHub: https://github.com/mctechnology17
# Brief: configuration file for ZMK firmware
# Board: nice_nano_v2 and puchi_ble_v1
# =========================================
# ╔═╦═╦═╗
# ╔════╗ ║║║║║╔╝
# ║╔╗╔╗║ ║║║║║╚╗
# ╚╝║║╚╝ ║╠═╩╩═╝
# ║╠═╦═╣╚╦═╦╦═╦╗╔═╦═╦╦╗
# ║║╩╣═╣║║║║║╬║╚╣╬║╬║║║
# ╚╩═╩═╩╩╩╩═╩═╩═╩═╬╗╠╗║
# ╚═╩═╝
# on config_zmk.h file enable/disable the following options, if you want to
# use CONFIG_ZMK_MOUSE=y, CONFIG_ZMK_RGB_UNDERGLOW=y, CONFIG_ZMK_RGB_UNDERGLOW=y
# mouse config, 1 = enable, 0 = disable, default = 1
# 2 = enable, but with rgb matrix
# #define MC_TECHNOLOGY_MOUSE_ENABLE 1
# rgb matrix config, 1 = enable, 0 = disable, default = 0
# #define MC_TECHNOLOGY_RGB_ENABLE 0
# define macros on for .dtsi file 1 = enable, 0 = disable default = 1
# #define MC_TECHNOLOGY_MACROS_ENABLE 1
### Keyboard name
# 1 nice
# CONFIG_ZMK_KEYBOARD_NAME="Nice Corne"
# 1 puchi
CONFIG_ZMK_KEYBOARD_NAME="Puchi Corne"
### Boost Bluetooth TX power, also make Bluetooth stronger
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
# Tune bluetooth profiles for quick select
# CONFIG_BT_MAX_CONN=3
### POWER OPTIONS
CONFIG_ZMK_EXT_POWER=y
CONFIG_ZMK_SLEEP=y
# 2 puchi 15 min (15*60*1000ms)
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000
# 2 nice 30 min (30*60*1000ms)
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000
# CONFIG_ZMK_IDLE_TIMEOUT=120000
# Disable external power when not connected to USB
# CONFIG_ZMK_EXT_POWER_USB_ONLY=y
### MOUSE
CONFIG_ZMK_MOUSE=y
### RGB UNDERGLOW
# uncomment to enable RGB Underglow or backlight
CONFIG_ZMK_RGB_UNDERGLOW=y
CONFIG_WS2812_STRIP=y
# apaga si no se usa el teclado
# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
# 0 Solid color 1 Breathe 2 Spectrum 3 Swirl
CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3
# nivel de brillo en porcentaje, el valor por defecto es 10 por ciento
CONFIG_ZMK_RGB_UNDERGLOW_BRT_STEP=1
# Turn off RGB underglow when keyboard goes into idle state
CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
# # Hue step in degrees (0-359) used by RGB actions default 10
# CONFIG_ZMK_RGB_UNDERGLOW_HUE_STEP=30
# # Brightness step in percent used by RGB actions default 10
# CONFIG_ZMK_RGB_UNDERGLOW_SAT_STEP=2
# CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=240
# CONFIG_ZMK_RGB_UNDERGLOW_SAT_START=10
# CONFIG_ZMK_RGB_UNDERGLOW_BRT_START=15
# Uncomment the line below to disable external power toggling by the underglow.
# By default toggling the underglow on and off also toggles external power
# on and off. This also causes the display to turn off.
CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=n
### OLED Display
CONFIG_ZMK_DISPLAY=y
# esto creo que ya no es necesario
# CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
# CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y
### WIDGET SETTINGS compatible SOLO con OLED
# No Widget configurations added since nice!view has its own custom widgets
# activar solo estos dos widgets
CONFIG_ZMK_WIDGET_WPM_STATUS=n
CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y
# me da error, probando a ver si se quita el error
# CONFIG_ZMK_WIDGET_LAYER_STATUS=y
# CONFIG_ZMK_WIDGET_BATTERY_STATUS=y
# CONFIG_ZMK_WIDGET_OUTPUT_STATUS=y
### HID para nice!view ePaperDisplay
# Enable eager debouncing
# "Eager Debouncing"
# Trying to lower the input lag.
# CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1
# CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5
### Improves compatibility with iPad
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y

View file

@ -1,105 +0,0 @@
# ========================================
# FileName: corne.conf
# Date: 07.06.2023
# Author: Marcos Chow Castro
# Email: mctechnology170318@gmail.com
# GitHub: https://github.com/mctechnology17
# Brief: configuration file for ZMK firmware
# Board: nice_nano_v2 and puchi_ble_v1
# ╔═╦═╦═╗
# ╔════╗ ║║║║║╔╝
# ║╔╗╔╗║ ║║║║║╚╗
# ╚╝║║╚╝ ║╠═╩╩═╝
# ║╠═╦═╣╚╦═╦╦═╦╗╔═╦═╦╦╗
# ║║╩╣═╣║║║║║╬║╚╣╬║╬║║║
# ╚╩═╩═╩╩╩╩═╩═╩═╩═╬╗╠╗║
# ╚═╩═╝
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
# =========================================
# on config_zmk.h file enable/disable the following options, if you want to
# use CONFIG_ZMK_MOUSE=y, CONFIG_ZMK_RGB_UNDERGLOW=y, CONFIG_ZMK_RGB_UNDERGLOW=y
# mouse config, 1 = enable, 0 = disable, default = 1
# 2 = enable, but with rgb matrix
# #define MC_TECHNOLOGY_MOUSE_ENABLE 1
# rgb matrix config, 1 = enable, 0 = disable, default = 0
# #define MC_TECHNOLOGY_RGB_ENABLE 0
# define macros on for .dtsi file 1 = enable, 0 = disable default = 1
# #define MC_TECHNOLOGY_MACROS_ENABLE 1
### Keyboard name
# 1 nice
# CONFIG_ZMK_KEYBOARD_NAME="Nice Corne"
# 1 puchi
CONFIG_ZMK_KEYBOARD_NAME="Puchi Corne"
### Boost Bluetooth TX power, also make Bluetooth stronger
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
# Tune bluetooth profiles for quick select
# CONFIG_BT_MAX_CONN=3
### POWER OPTIONS
CONFIG_ZMK_EXT_POWER=y
CONFIG_ZMK_SLEEP=y
# 2 puchi 15 min (15*60*1000ms)
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000
# 2 nice 30 min (30*60*1000ms)
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000
# CONFIG_ZMK_IDLE_TIMEOUT=120000
# Disable external power when not connected to USB
# CONFIG_ZMK_EXT_POWER_USB_ONLY=y
### MOUSE
CONFIG_ZMK_MOUSE=y
### RGB UNDERGLOW
# uncomment to enable RGB Underglow or backlight
# CONFIG_ZMK_RGB_UNDERGLOW=y
# CONFIG_WS2812_STRIP=y
# apaga si no se usa el teclado
# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
# 0 Solid color 1 Breathe 2 Spectrum 3 Swirl
# CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3
# nivel de brillo en porcentaje, el valor por defecto es 10 por ciento
# CONFIG_ZMK_RGB_UNDERGLOW_BRT_STEP=1
# Turn off RGB underglow when keyboard goes into idle state
# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
# # Hue step in degrees (0-359) used by RGB actions default 10
# CONFIG_ZMK_RGB_UNDERGLOW_HUE_STEP=30
# # Brightness step in percent used by RGB actions default 10
# CONFIG_ZMK_RGB_UNDERGLOW_SAT_STEP=2
# CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=240
# CONFIG_ZMK_RGB_UNDERGLOW_SAT_START=10
# CONFIG_ZMK_RGB_UNDERGLOW_BRT_START=15
# Uncomment the line below to disable external power toggling by the underglow.
# By default toggling the underglow on and off also toggles external power
# on and off. This also causes the display to turn off.
# CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=n
### OLED Display
# CONFIG_ZMK_DISPLAY=y
# esto creo que ya no es necesario
# CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
# CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y
### WIDGET SETTINGS compatible SOLO con OLED
# No Widget configurations added since nice!view has its own custom widgets
# activar solo estos dos widgets
# CONFIG_ZMK_WIDGET_WPM_STATUS=n
# CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y
# CONFIG_ZMK_WIDGET_LAYER_STATUS=y
# CONFIG_ZMK_WIDGET_BATTERY_STATUS=y
# CONFIG_ZMK_WIDGET_OUTPUT_STATUS=y
### HID para nice!view ePaperDisplay
# Enable eager debouncing
# "Eager Debouncing"
# Trying to lower the input lag.
CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1
CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5
### Improves compatibility with iPad
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y

View file

@ -1,105 +0,0 @@
/* ========================================
FileName: config_zmk.h
Date: 15:17 23.September.2022
Author: Marcos Chow Castro
Email: mctechnology170318@gmail.com
GitHub: https://github.com/mctechnology17
Brief: define config for the wireless corne keyboard
Use: in your keymap file, include this file
#include "config_zmk.h"
===========================================
Copyright 2023 Marcos Ivan Chow Castro
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// mouse config, 1 = enable, 0 = disable, default = 1
#define MC_TECHNOLOGY_MOUSE_ENABLE 1
// layers
#define DEFAULT 0
#define NUMBER 1
#define SYMBOL 2
#define FUNCTION 3
#define MEDIA 4
#define MOUSE 5
// esta capa la uso por la compatibilidad entre mac, windows y linux
// a veces los caracteres no son los mismos
#define LX_ 6
#define LOCK 7
#define NAV_LEFT &mt HOME LEFT // tap: left | long-tap: beginning of line
#define NAV_RIGHT &mt END RIGHT // tap: right | long-tap: end of line
#define NAV_UP &mt LC(HOME) UP // tap: up | long-tap: beginning of document
#define NAV_DOWN \
&mt LC(END) DOWN // tap: down | long-tap: end of document
#define NAV_BSPC \
&mt LC(BSPC) BSPC // tap: bspc | long-tap: delete word backward
#define NAV_DEL &mt LC(DEL) DEL // tap: del | long-tap: delete word forward
// combinadas para optimizar espacio
#define MEDIA_ESC &lt MEDIA ESC
#define MOUSE_TAB &lt MOUSE TAB
#define NUMBER_SPACE &lt NUMBER SPACE
#define SYMBOL_RGUI &mo SYMBOL // &lt SYMBOL RGUI
#define FUNCTION_RALT &mo FUNCTION // &lt FUNCTION RALT
// default_layer
#define LSHFT_COMMA &mt LSHFT COMMA
// function_layer
#define SPELL &kp LC(LG(D))
#define TRADUCT &kp LS(LA(T))
#define SNIPPET &kp LA(LG(G))
#define CLIPBRD &kp LA(LG(V))
#define EMOJI &kp LC(LG(SPACE))
#define TASKM &kp LC(LA(DEL)) // C-A-DEL
// media_layer
#define SC_FLOW &kp LS(LG(NUMBER_1)) // <S-D-1> ScrenFlow app for MacOS
#define TXTSNIP &kp LS(LG(NUMBER_2)) // <S-D-2> TextSniper app for MacOS
#define SC_SHOT \
&kp LS(LG(NUMBER_3)) // <S-D-3> ScrenShot for all system see &kp PRINTSCREEN
// for MacOS
#define SC_SPSF \
&kp LS(LG(NUMBER_4)) // <S-D-4> Save picture of screen as a file for MacOS
#define SC_RE \
&kp LS(LG(NUMBER_5)) // <S-D-5> Screenshot and recording options for MacOS
#define OP_TERM \
&kp LC(LG(LA(SLASH))) // open terminal iTerm2 in current directory for MacOS
#define POS1 \
&kp LA(LG(NUMBER_1)) // positions of current app with cmacro2iner integration
// for MacOS
#define POS2 \
&kp LA(LG(NUMBER_2)) // positions of current app with cmacro2iner integration
// for MacOS
#define POS3 \
&kp LA(LG(NUMBER_3)) // positions of current app with cmacro2iner integration
// for MacOS
#define POS4 \
&kp LA(LG(NUMBER_4)) // positions of current app with cmacro2iner integration
// for MacOS
// define blueth
#define BT(n) BT_SEL n
// vim: set ft=c fdm=marker:

View file

@ -28,29 +28,31 @@
# #define MC_TECHNOLOGY_MACROS_ENABLE 1
### Keyboard name
# 1 nice
CONFIG_ZMK_KEYBOARD_NAME="Nice Corne"
# 1 puchi
# CONFIG_ZMK_KEYBOARD_NAME="Puchi Corne"
# CONFIG_ZMK_KEYBOARD_NAME="Nice Corne View"
# CONFIG_ZMK_KEYBOARD_NAME="Puchi Corne View"
# CONFIG_ZMK_KEYBOARD_NAME="Nice Corne Oled"
# CONFIG_ZMK_KEYBOARD_NAME="Puchi Corne Oled"
### Boost Bluetooth TX power, also make Bluetooth stronger
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
# CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
# Tune bluetooth profiles for quick select
# CONFIG_BT_MAX_CONN=3
### POWER OPTIONS
CONFIG_ZMK_EXT_POWER=y
CONFIG_ZMK_SLEEP=y
# 2 puchi 15 min (15*60*1000ms)
# CONFIG_ZMK_EXT_POWER=y
# CONFIG_ZMK_SLEEP=y
# 15 min (15*60*1000ms)
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000
# 2 nice 30 min (30*60*1000ms)
# 1 min Número de milisegundos de inactividad antes de entrar en estado inactivo
# CONFIG_ZMK_IDLE_TIMEOUT=60000
# 30 min (30*60*1000ms)
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000
# CONFIG_ZMK_IDLE_TIMEOUT=120000
# Disable external power when not connected to USB
# CONFIG_ZMK_EXT_POWER_USB_ONLY=y
### MOUSE
CONFIG_ZMK_MOUSE=y
# CONFIG_ZMK_MOUSE=y
### RGB UNDERGLOW
# uncomment to enable RGB Underglow or backlight
@ -98,8 +100,8 @@ CONFIG_ZMK_MOUSE=y
# Enable eager debouncing
# "Eager Debouncing"
# Trying to lower the input lag.
CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1
CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5
# CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1
# CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5
### Improves compatibility with iPad
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y
# CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y

View file

@ -1,228 +1,61 @@
/* ========================================
FileName: corne.keymap
Date: 15:17 23.September.2022
Author: Marcos Chow Castro
Email: mctechnology170318@gmail.com
GitHub: https://github.com/mctechnology17
Brief: keymap for the wireless corne keyboard
Copyright (c) 2020 The ZMK Contributors
SPDX-License-Identifier: MIT
========================================= */
// ### include {{{
/*
* 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/outputs.h>
#include <dt-bindings/zmk/ext_power.h>
#include <dt-bindings/led/led.h>
#include <dt-bindings/zmk/backlight.h>
#include <dt-bindings/zmk/rgb.h>
#include <dt-bindings/zmk/reset.h>
#include "keymap_german_mac_iso_zmk.h"
#include "keypos_42keys.h"
#include "config_zmk.h"
#include "mouse.dtsi"
&led_strip {
chain-length = <27>;
};
// }}}
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/mouse.h>
/ {
// ### macros {{{
macros {
#include "macros.dtsi"
};
// }}}
// ### combos {{{
combos {
compatible = "zmk,combos";
keymap {
compatible = "zmk,keymap";
unlock {
bindings = <&to DEFAULT>;
key-positions = <LT5 LH0 RH0 RT5>;
layers = <LOCK>;
};
default_layer {
// -----------------------------------------------------------------------------------------
// | TAB | Q | W | E | R | T | | Y | U | I | O | P | BKSP |
// | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' |
// | SHFT | Z | X | C | V | B | | N | M | , | . | / | ESC |
// | GUI | LWR | SPC | | ENT | RSE | ALT |
lock {
bindings = <&to LOCK>;
key-positions = <LT5 RH0>;
layers = <LX_>;
};
};
// }}}
// ### conditional_layers {{{
conditional_layers {
compatible = "zmk,conditional-layers";
bindings = <
&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 N &kp M &kp COMMA &kp DOT &kp FSLH &kp ESC
&kp LGUI &mo 1 &kp SPACE &kp RET &mo 2 &kp RALT
>;
};
tri_layer {
if-layers = <SYMBOL FUNCTION>;
then-layer = <LX_>;
lower_layer {
// -----------------------------------------------------------------------------------------
// | TAB | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BKSP |
// | BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 | | LFT | DWN | UP | RGT | | |
// | SHFT | | | | | | | | | | | | |
// | GUI | | SPC | | ENT | | ALT |
bindings = <
&kp TAB &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &trans
&kp LSHFT &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT
>;
};
raise_layer {
// -----------------------------------------------------------------------------------------
// | TAB | ! | @ | # | $ | % | | ^ | & | * | ( | ) | BKSP |
// | CTRL | | | | | | | - | = | [ | ] | \ | ` |
// | SHFT | | | | | | | _ | + | { | } | "|" | ~ |
// | GUI | | SPC | | ENT | | ALT |
bindings = <
&kp TAB &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp BSPC
&kp LCTRL &trans &trans &mkp LCLK &trans &mkp RCLK &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE
&kp LSHFT &trans &trans &trans &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE
&kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT
>;
};
};
//}}}
keymap {
compatible = "zmk,keymap";
// ### default_layer {{{
default_layer {
/*.------------------------------------------------. .-------------------------------------------------.
|LT4 ESC | Q | W | E | R | T | | Z | U | I | O | P | BACKSPC |
|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
|LT5 TAB | A | S | D | F | G | | H | J | K | L | UP | ENTER |
|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
|SHIFT | Y | X | C | V | B | | N | M |LSFT , | LEFT | DOWN | RIGHT |
'---------------------------------------------------------| |----------------------------------------------------------'
| CTRL | CMD | ALT | | LT1 SPACE | LT2 CMD | LT3 RALT |
'--------------------------------' '----------------------------------'*/
label = "Marcos";
bindings = <
MEDIA_ESC DE_Q DE_W DE_E DE_R DE_T DE_Z DE_U DE_I DE_O DE_P DE_BSPC
MOUSE_TAB DE_A DE_S DE_D DE_F DE_G DE_H DE_J DE_K DE_L DE_UP DE_RET
DE_LSHFT DE_Y DE_X DE_C DE_V DE_B DE_N DE_M LSHFT_COMMA DE_LEFT DE_DOWN DE_RIGHT
DE_LCTRL DE_LGUI DE_RALT NUMBER_SPACE SYMBOL_RGUI FUNCTION_RALT
>;
};
// }}}
// ### number_layer {{{
number_layer {
/*.-------------------------------------------------. .-------------------------------------------------.
| 0 | 1 | 2 | 3 | - | + | | ß | Ü | Ä | Ö | Ñ |BACKSPC |
|---------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
|CAPS_LOCK| 4 | 5 | 6 | / | * | | # | ~ | ? | @ | UP | ENTER |
|---------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
| SHIFT | 7 | 8 | 9 | % | = | | . | ´ | ` | LEFT | DOWN | RIGHT |
'----------------------------------------------------------| |----------------------------------------------------------'
| CTRL | CMD | SPACE | | | LSFT | ALTGR |
'--------------------------------' '--------------------------------'*/
label = "NUMBER";
bindings = <
DE_0 DE_1 DE_2 DE_3 DE_MINS DE_PLUS DE_SS DE_UDIA DE_ADIA DE_ODIA &ene_small DE_BSPC
DE_CAPS DE_4 DE_5 DE_6 DE_SLSH DE_ASTR DE_HASH DE_TILD DE_QUES DE_AT DE_UP DE_RET
DE_LSHFT DE_7 DE_8 DE_9 DE_PERC DE_EQL DE_DOT DE_ACUT DE_GRV DE_LEFT DE_DOWN DE_RIGHT
DE_LCTRL DE_LGUI DE_SPACE XXX DE_LSHFT DE_RALT
>;
};
// }}}
// ### symbol_layer {{{
symbol_layer {
/*.------------------------------------------------. TODO: .-------------------------------------------------.
| $ | ( | ) | [ | ] | & | | ` | ' | ´ | " | |BACKSPC |
|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
| % | { | } | ^ |PAGE_UP| # | | \ | | | / | & | UP | ENTER |
|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
|SHIFT | < | > | HOME |PAGE_DO| END | | ~ | ' | | LEFT | DOWN | RIGHT |
'---------------------------------------------------------| |----------------------------------------------------------'
| CTRL | CMD | SPACE | | ENTER | ALTGR | CTRL |
'--------------------------------' '--------------------------------'*/
label = "SYMBOL";
bindings = <
DE_DLR DE_LPRN DE_RPRN DE_LBRC DE_RBRC DE_AMPR DE_GRV DE_QUOT DE_ACUT DE_LN_DQUO XXX DE_BSPC
DE_PERC DE_LCBR DE_RCBR DE_CARET DE_PG_UP DE_HASH DE_BSLS DE_PIPE DE_SLSH DE_AMPR DE_UP DE_RET
DE_LSHFT DE_LABK DE_RABK DE_HOME DE_PG_DN DE_END DE_TILD DE_QUOT XXX DE_LEFT DE_DOWN DE_RIGHT
DE_LCTRL DE_LGUI DE_SPACE DE_RET SYMBOL_RGUI FUNCTION_RALT
>;
};
// }}}
// ### function_layer {{{
function_layer {
/*.------------------------------------------------. .-------------------------------------------------.
| F1 | F2 | F3 | F4 | SPELL |TRADUCT| |DE_F13 | DE_F14|DE_F15 | DE_F16| BRI_DN| BRI_UP |
|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
| F5 | F6 | F7 | F8 | \ |ALFRED | |C-A-DEL|DE_F19 |DE_F20 |CLR_LIN|PAGE_UP| |
|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
| F9 | F10 | F11 | F12 |ALFRED |EMOJI | |L_SHIFT|L_SHIFT|R_SHIFT| HOME |PAGE_DO| END |
'----------------------------------------------------------| |----------------------------------------------------------'
| CTRL | CMD | ALT | | TAB | ´ | CTRL |
'--------------------------------' '--------------------------------'
LCTL(LGUI(KC_D)), LCTL(LGUI(KC_SPC))*/
label = "FUNCTION";
bindings = <
DE_F1 DE_F2 DE_F3 DE_F4 SPELL TRADUCT &macro6 &macro5 &macro8 &macro2 DE_BRI_DN DE_BRI_UP
DE_F5 DE_F6 DE_F7 DE_F8 DE_BSLS SNIPPET TASKM &macro1 &macro3 &macro4 DE_PG_UP &macro9
DE_F9 DE_F10 DE_F11 DE_F12 CLIPBRD EMOJI DE_LSHFT DE_LSHFT DE_RSHFT DE_HOME DE_PG_DN DE_END
DE_LCTRL DE_LGUI DE_LALT DE_TAB DE_ACUT DE_LCTRL
>;
};
// }}}
// ### media_layer {{{
media_layer {
/*.------------------------------------------------. .-------------------------------------------------.
| |SC_FLOW|TXTSNIP|SC_SHOT|OP_TERM| | |POS1 |POS2 |LANG_1 |LANG_2 | STOP | DELETE |
|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
|bootlder|SC_SPSF|SC_RE | | | | |POS3 |POS4 |LANG_3 |SHUFFLE|VOL_UP |PLAY/PAUS|
|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
|reset | | | | | | | | | MUTE | PREV |VOL_DOW| NEXT |
'---------------------------------------------------------| |----------------------------------------------------------'
| CTRL | CMD | ALT | | SPACE | ALTGR | CTRL |
'--------------------------------' '--------------------------------'*/
label = "MEDIA";
bindings = <
XXX SC_FLOW TXTSNIP SC_SHOT OP_TERM XXX POS1 POS2 DE_LANG1 DE_LANG2 DE_STOP DE_DEL
&bootloader SC_SPSF SC_RE XXX XXX XXX POS3 POS4 DE_LANG3 DE_SHUFFLE DE_VOL_UP DE_PLAY
&sys_reset XXX XXX XXX XXX XXX &ene_small &ene_big DE_MUTE DE_PREV DE_VOL_DN DE_NEXT
DE_LCTRL DE_LGUI DE_LALT DE_SPACE DE_RALT DE_LCTRL
>;
};
// }}}
// ### mouse_layer: mouse {{{
mouse_layer {
/*.------------------------------------------------. .-------------------------------------------------.
|WH_LEFT |WH_RIGH| |OUT_USB|OUT_BLE|OUT_TOG| | BRD- | BRI+ | SPD- | SPI+ |WH_DOWN| WH_UP |
|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
| |CLICK_1|CLICK_2|CLICK_3|BT_PRV | BT_NXT| | HUD- | HUI+ | |CLICK_1| UP |CLICK_2 |
|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
|BT_CLR |BT_0 |BT_1 |BT_2 |BT_3 |BT_4 | | SAD- | SAI+ | RESET | LEFT | DOWN | RIGHT |
'---------------------------------------------------------| |----------------------------------------------------------'
|EP_OFF | EP_ON| EP_TOG | | EFF- | EFR+ | RGB_TOG |
'--------------------------------' '--------------------------------'*/
label = "MOUSE";
bindings = <
SCROLL_LEFT SCROLL_RIGHT XXX &out OUT_USB &out OUT_BLE &out OUT_TOG &rgb_ug RGB_BRD &rgb_ug RGB_BRI &rgb_ug RGB_SPD &rgb_ug RGB_SPI SCROLL_DOWN SCROLL_UP
XXX CLICK_LEFT CLICK_RIGHT CLICK_MIDDLE &bt BT_PRV &bt BT_NXT &rgb_ug RGB_HUD &rgb_ug RGB_HUI &rgb_ug RGB_COLOR_HSB(0,0,100) CLICK_LEFT MOVE_UP CLICK_RIGHT
&bt BT_CLR &bt BT(0) &bt BT(1) &bt BT(2) &bt BT(3) &bt BT(4) &rgb_ug RGB_SAD &rgb_ug RGB_SAI &rgb_ug RGB_COLOR_HSB(224,100,100) MOVE_LEFT MOVE_DOWN MOVE_RIGHT
&ext_power EP_OFF &ext_power EP_ON &ext_power EP_TOG &rgb_ug RGB_EFF &rgb_ug RGB_EFR &rgb_ug RGB_TOG
>;
};
// }}}
// ### linux_symbol {{{
linux_symbol {
/*.------------------------------------------------. TODO: .-------------------------------------------------.
| $ | ( | ) | [ | ] | & | | ` | ' | ´ |bootldr| reset |BACKSPC |
|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
| % | { | } | ^ |PAGE_UP| # | | \ | | | / | & | UP | ENTER |
|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
|SHIFT | < | > | HOME |PAGE_DO| END | | ~ | ' | @ | LEFT | DOWN | RIGHT |
'---------------------------------------------------------| |----------------------------------------------------------'
DE_LN_DQUO |DE_F13 | DE_F14 | DE_F15 | | SPACE | ALTGR | CTRL |
'--------------------------------' '--------------------------------'*/
label = "LX_";
bindings = <
DE_DLR DE_LN_LPRN DE_LN_RPRN DE_LN_LBRC DE_LN_RBRC DE_LN_AMPS DE_GRV DE_QUOT DE_ACUT &bootloader &sys_reset DE_BSPC
DE_PERC DE_LN_LCBR DE_LN_RCBR DE_LN_CARET DE_PG_UP DE_HASH DE_LN_BSLH DE_LN_PIPE DE_LN_FSLH DE_LN_AMPS DE_UP DE_RET
DE_LSHFT DE_LN_LABK DE_LN_RABK DE_HOME DE_PG_DN DE_END DE_LN_TILDE DE_QUOT DE_LN_AT NAV_LEFT DE_DOWN NAV_RIGHT
&macro7 &macro5 &macro8 DE_SPACE DE_RALT DE_LCTRL
>;
};
// }}}
// ### lock {{{
lock {
label = "Lock";
bindings = <
&none &none &none &none &none &none &none &none &none &none &none &none
&none &none &none &none &none &none &none &none &none &none &none &none
&none &none &none &none &none &none &none &none &none &none &none &none
&none &none &none &none &none &none
>;
};
//}}}
};
};
// vim: filetype=dts fdm=marker:

View file

@ -1,62 +0,0 @@
/* 42 KEY MATRIX / LAYOUT MAPPING
0 1 2 3 4 5 6 7 8 9 10 11 LT5 LT4 LT3 LT2 LT1 LT0 RT0 RT1 RT2 RT3 RT4 RT5
12 13 14 15 16 17 18 19 20 21 22 23 LM5 LM4 LM3 LM2 LM1 LM0 RM0 RM1 RM2 RM3 RM4 RM5
24 25 26 27 28 29 30 31 32 33 34 35 LB5 LB4 LB3 LB2 LB1 LB0 RB0 RB1 RB2 RB3 RB4 RB5
36 37 38 39 40 41 LH2 LH1 LH0 RH0 RH1 RH2
*/
#pragma once
#define LT0 5 // left-top row
#define LT1 4
#define LT2 3
#define LT3 2
#define LT4 1
#define LT5 0
#define RT0 6 // right-top row
#define RT1 7
#define RT2 8
#define RT3 9
#define RT4 10
#define RT5 11
#define LM0 17 // left-middle row
#define LM1 16
#define LM2 15
#define LM3 14
#define LM4 13
#define LM5 12
#define RM0 18 // right-middle row
#define RM1 19
#define RM2 20
#define RM3 21
#define RM4 22
#define RM5 23
#define LB0 29 // left-bottom row
#define LB1 28
#define LB2 27
#define LB3 26
#define LB4 25
#define LB5 24
#define RB0 30 // right-bottom row
#define RB1 31
#define RB2 32
#define RB3 33
#define RB4 34
#define RB5 35
#define LH0 38 // left thumb keys
#define LH1 37
#define LH2 36
#define RH0 39 // right thumb keys
#define RH1 40
#define RH2 41
// vim: filetype=dts fdm=marker:

View file

@ -1,71 +0,0 @@
/* ======================================== {{{
FileName: macros.dtsi
Date: Sun 10/11/2020 9:00:00.00
Author: Marcos Chow Castro
Email: mctechnology170318@gmail.com
GitHub: https://github.com/mctechnology17
Brief: define macros for the wireless corne keyboard
Use: in your keymap file, include this file
/ {
macros {
#include "macros.dtsi"
};
keymap {
compatible = "zmk,keymap";
default_layer {
bindings = <
...
>;
};
};
};
===========================================
Copyright 2023 Marcos Ivan Chow Castro
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
}}}*/
// ### macros {{{
#define MACRO(name, keys) \
name: name##_macro { \
label = #name; \
compatible = "zmk,behavior-macro";\
#binding-cells = <0>; \
tap-ms = <1>; \
wait-ms = <1>; \
bindings = <keys>; \
};
MACRO(macro1, &kp M &kp A &kp C &kp R &kp O &kp N1)
MACRO(macro2, &kp M &kp A &kp C &kp R &kp O &kp N2)
MACRO(macro3, &kp M &kp A &kp C &kp R &kp O &kp N3)
MACRO(macro4, &kp M &kp A &kp C &kp R &kp O &kp N4)
MACRO(macro5, &kp M &kp A &kp C &kp R &kp O &kp N5)
MACRO(macro6, &kp M &kp A &kp C &kp R &kp O &kp N6)
MACRO(macro7, &kp M &kp A &kp C &kp R &kp O &kp N7)
MACRO(macro8, &kp M &kp A &kp C &kp R &kp O &kp N8)
MACRO(macro9, &kp M &kp A &kp C &kp R &kp O &kp N9)
MACRO(ene_small, DE_TILD DE_N)
MACRO(ene_big, DE_TILD &kp LS(N))
// }}}
// vim: filetype=dts fdm=marker:

View file

@ -1,68 +0,0 @@
#if MC_TECHNOLOGY_MOUSE_ENABLE == 1
# include <dt-bindings/zmk/mouse.h>
&mmv {
time-to-max-speed-ms = <1500>; // 500
acceleration-exponent=<1>;
delay-ms = <0>; // 10
};
&mwh {
time-to-max-speed-ms = <5000>; // 2000
acceleration-exponent=<1>; // 0
delay-ms = <0>; // 10
};
#undef CLICK_LEFT
#undef CLICK_RIGHT
#undef CLICK_MIDDLE
#define CLICK_LEFT &mkp LCLK
#define CLICK_RIGHT &mkp RCLK
#define CLICK_MIDDLE &mkp MCLK
#undef MOVE_UP
#undef MOVE_DOWN
#undef MOVE_LEFT
#undef MOVE_RIGHT
#define MOVE_UP &mmv MOVE_VERT(-2500)
#define MOVE_DOWN &mmv MOVE_VERT(2500)
#define MOVE_LEFT &mmv MOVE_HOR(-2500)
#define MOVE_RIGHT &mmv MOVE_HOR(2500)
#undef SCROLL_UP
#undef SCROLL_DOWN
#undef SCROLL_LEFT
#undef SCROLL_RIGHT
#define SCROLL_UP &mwh SCROLL_VERT(15)
#define SCROLL_DOWN &mwh SCROLL_VERT(-15)
#define SCROLL_LEFT &mwh SCROLL_HOR(-15)
#define SCROLL_RIGHT &mwh SCROLL_HOR(15)
#else
#undef CLICK_LEFT
#undef CLICK_RIGHT
#undef CLICK_MIDDLE
#define CLICK_LEFT &none
#define CLICK_RIGHT &none
#define CLICK_MIDDLE &none
#undef MOVE_UP
#undef MOVE_DOWN
#undef MOVE_LEFT
#undef MOVE_RIGHT
#define MOVE_UP &none
#define MOVE_DOWN &none
#define MOVE_LEFT &none
#define MOVE_RIGHT &none
#undef SCROLL_UP
#undef SCROLL_DOWN
#undef SCROLL_LEFT
#undef SCROLL_RIGHT
#define SCROLL_UP &none
#define SCROLL_DOWN &none
#define SCROLL_LEFT &none
#define SCROLL_RIGHT &none
#endif
// vim: filetype=dts fdm=marker:

View file

@ -1,14 +1,10 @@
manifest:
remotes:
- name: zmkfirmware
url-base: https://github.com/zmkfirmware
- name: urob
url-base: https://github.com/urob
- name: mctechnology17
url-base: https://github.com/mctechnology17
projects:
- name: zmk
remote: mctechnology17
remote: urob
revision: main
import: app/west.yml
self: