diff --git a/.gitignore b/.gitignore index 08841f11..9d7aba06 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,6 @@ zmk/ # Ignore keymap-drawer output for now draw/skeletyl.svg draw/skeletyl.yaml +.DS_Store +draw/base.svg +draw/base.yaml diff --git a/.justfile b/.justfile index e640f168..b73d782a 100644 --- a/.justfile +++ b/.justfile @@ -57,8 +57,8 @@ clean-nix: draw: #!/usr/bin/env bash set -euo pipefail - keymap -c "{{ draw }}/config.yaml" parse -z "{{ config }}/skeletyl.keymap" >"{{ draw }}/skeletyl.yaml" - keymap -c "{{ draw }}/config.yaml" draw "{{ draw }}/skeletyl.yaml" -k "bastardkb/skeletyl" >"{{ draw }}/skeletyl.svg" + keymap -c "{{ draw }}/config.yaml" parse -z "{{ config }}/base.keymap" >"{{ draw }}/base.yaml" + keymap -c "{{ draw }}/config.yaml" draw "{{ draw }}/base.yaml" -k "ferris/sweep" >"{{ draw }}/base.svg" # initialize west init: diff --git a/build.yaml b/build.yaml index 9ecfd9df..3aa80048 100644 --- a/build.yaml +++ b/build.yaml @@ -13,13 +13,25 @@ # --- include: + # - board: rp2040_ce + # shield: skeletyl_wired_left + # - board: rp2040_ce + # shield: skeletyl_wired_right + + - board: nice_nano_v2 + shield: skeletyl_34_left + - board: nice_nano_v2 + shield: skeletyl_34_right + - board: nice_nano_v2 shield: skeletyl_left - board: nice_nano_v2 shield: skeletyl_right + - board: nice_nano_v2 shield: dilemma_left - board: nice_nano_v2 shield: dilemma_right + - board: nice_nano_v2 shield: settings_reset diff --git a/config/base.keymap b/config/base.keymap new file mode 100644 index 00000000..bcc56127 --- /dev/null +++ b/config/base.keymap @@ -0,0 +1,401 @@ +/* + * Copyright (c) 2024 Charly Delay <0xcharly> + * + * SPDX-License-Identifier: MIT + */ + +#include +#include // requires auto-layer module +#include +#include +#include +#include + +#ifdef CONFIG_WIRELESS + #include + #define _BT_SEL_KEYS_ &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_CLR +#else + #define _BT_SEL_KEYS_ &trans &trans &trans &trans &trans +#endif + +#include "zmk-helpers/helper.h" +#include "zmk-helpers/unicode-chars/greek.dtsi" +#include "zmk-helpers/unicode-chars/german.dtsi" + +// Layers. +#define DVORAK 0 +#define LOWER 1 +#define UPPER 2 +#define EXTEND 3 +#define SYSTEM 4 +#define MOUSE 5 + +// Custom keycodes. +#define CANCEL &kp K_CANCEL // cancel caps-word, num-word and smart-mouse +#define LAUNCHER (LG(SPACE)) +#define CTL_TAB (LC(TAB)) +#define RCS_TAB (LC(LS(TAB))) + +#define EXTPOW_TOG &ext_power EXT_POWER_TOGGLE_CMD +#define RGB_UG_TOG &rgb_ug RGB_TOG + +#define XXX &none +#define ___ &trans + +/* Global settings */ + +#define QUICK_TAP_MS 175 + +// Adjust sticky-keys configuration. +&sk { + release-after-ms = <900>; // release after 0.9s + quick-release; // no double capitalization when rolling keys +}; + +&sl { // sticky-layer config + ignore-modifiers; // allow chording sticky mods & layers +}; + +< { // layer-tap config + flavor = "balanced"; + tapping-term-ms = <200>; + quick-tap-ms = ; +}; + +/* Caps-word, num-word and smart-mouse */ + +// tap: sticky-shift | shift + tap/ double-tap: caps-word | hold: shift +ZMK_MOD_MORPH(smart_shft, + bindings = <&sk LSHFT>, <&caps_word>; + mods = <(MOD_LSFT)>; +) + +// Adjust Caps Word configuration. +&caps_word { + continue-list = ; +}; + +/* Homerow mods */ + +#define KEYS_L LT0 LT1 LT2 LT3 LT4 LM0 LM1 LM2 LM3 LM4 LB0 LB1 LB2 LB3 LB4 // left hand +#define KEYS_R RT0 RT1 RT2 RT3 RT4 RM0 RM1 RM2 RM3 RM4 RB0 RB1 RB2 RB3 RB4 // right hand +#ifndef LH2 + #define THUMBS LH1 LH0 RH0 RH1 // thumbs on 34 keys +#else + #define THUMBS LH2 LH1 LH0 RH0 RH1 RH2 // thumbs on 36+ keys +#endif + +#define MAKE_HRM(NAME, HOLD, TAP, TRIGGER_POS) \ + ZMK_HOLD_TAP(NAME, \ + flavor = "balanced"; \ + tapping-term-ms = <280>; \ + quick-tap-ms = ; \ + require-prior-idle-ms = <150>; \ + bindings = , ; \ + hold-trigger-key-positions = ; \ + hold-trigger-on-release; \ + ) +MAKE_HRM(hml, &kp, &kp, KEYS_R THUMBS) // left-hand HRMs +MAKE_HRM(hmr, &kp, &kp, KEYS_L THUMBS) // right-hand HRMs + +// HRM combo hack - workaround for lack of tap-only combos (ZMK issue #544) +#define ZMK_COMBO_8(NAME, TAP, KEYPOS, LAYERS, COMBO_TERM, COMBO_IDLE, HOLD, SIDE) \ + MAKE_HRM(hm_combo_ ## NAME, &kp, TAP, SIDE THUMBS) \ + ZMK_COMBO_6(NAME, &hm_combo_ ## NAME HOLD 0, KEYPOS, LAYERS, COMBO_TERM, COMBO_IDLE) + +/* Combos, leader key sequences, mouse emulation */ + +#include "combos.dtsi" // must be sourced after HRM-combo hack + +// reuse basic mod-morph scheme +#define SIMPLE_MORPH(NAME, MOD, BINDING1, BINDING2) \ + ZMK_MOD_MORPH(NAME, \ + mods = <(MOD_L ## MOD|MOD_R ## MOD)>; \ + bindings = , ; \ + ) + +/* Custom behaviors */ + +// tap: comma | shift + tap: semicolon | ctrl + shift + tap: < +SIMPLE_MORPH(comma_morph, SFT, &kp COMMA, &comma_inner_morph) +SIMPLE_MORPH(comma_inner_morph, CTL, &kp SEMICOLON, &kp LESS_THAN) + +// tap: dot | shift + tap: colon | ctrl + shift + tap: > +SIMPLE_MORPH(dot_morph, SFT, &kp DOT, &dot_inner_morph) +SIMPLE_MORPH(dot_inner_morph, CTL, &kp COLON, &kp GREATER_THAN) + +// tap: qmark | shift + tap: excl +SIMPLE_MORPH(qexcl, SFT, &kp QMARK, &kp EXCL) + +// tap: space | shift + tap: dot -> space -> sticky shift | hold: activate layer +ZMK_HOLD_TAP(lt_spc, + flavor = "balanced"; + tapping-term-ms = <200>; + quick-tap-ms = ; + bindings = <&mo>, <&spc_morph>; +) +SIMPLE_MORPH(spc_morph, SFT, &kp SPACE, &dot_spc) +ZMK_MACRO(dot_spc, + wait-ms = <0>; + tap-ms = <5>; + bindings = <&kp DOT &kp SPACE &sk LSHFT>; +) + +// tap: backspace | lshft + tap: delete | rshft + tap: shift-delete +ZMK_MOD_MORPH(bs_del, + bindings = <&kp BSPC>, <&kp DEL>; + mods = <(MOD_LSFT|MOD_RSFT)>; + keep-mods = ; +) + +// tap: copy | double-tap: cut +ZMK_TAP_DANCE(copy_cut, + tapping-term-ms = <200>; + bindings = <&kp LC(INS)>, <&kp LC(X)>; +) + +ZMK_CONDITIONAL_LAYER(sys, LOWER UPPER, EXTEND) // LOWER + UPPER -> EXTEND + +/ { + // Macros configuration, specifically character sequences. + macros { + // Right arrow macro: -> + rarrow: right_arrow { + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings = <¯o_tap &kp MINUS &kp GT>; + }; + + // Fat right arrow macro: => + frarrow: fat_right_arrow { + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings = <¯o_tap &kp EQUAL &kp GT>; + }; + + // Dead key acute. + dk_acute: dead_key_ecute { + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <¯o_press &kp LALT> + , <¯o_tap &kp E> + , <¯o_release &kp LALT> + ; + }; + + // Dead key grave. + dk_grave: dead_key_grave { + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <¯o_press &kp LALT> + , <¯o_tap &kp GRAVE> + , <¯o_release &kp LALT> + ; + }; + + // Dead key circumflex. + dk_circ: dead_key_circumflex { + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <¯o_press &kp LALT> + , <¯o_tap &kp I> + , <¯o_release &kp LALT> + ; + }; + + // Dead key acute. + dk_trema: dead_key_trema { + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <¯o_press &kp LALT> + , <¯o_tap &kp U> + , <¯o_release &kp LALT> + ; + }; + + // Double shift. + sshift: double_shift { + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <¯o_press &kp LSHFT> + , <¯o_release &kp LSHFT> + , <¯o_press &kp LSHFT> + , <¯o_release &kp LSHFT> + ; + }; + + // ^bh: TMUX Space 0. + tmux_0: tmux_space_0 { + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <¯o_press &kp LCTRL> + , <¯o_tap &kp B> + , <¯o_release &kp LCTRL> + , <¯o_pause_for_release> + , <¯o_tap &kp H> + ; + }; + + // ^bj: TMUX Space 1. + tmux_1: tmux_space_1 { + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <¯o_press &kp LCTRL> + , <¯o_tap &kp B> + , <¯o_release &kp LCTRL> + , <¯o_pause_for_release> + , <¯o_tap &kp J> + ; + }; + + // ^bk: TMUX Space 2. + tmux_2: tmux_space_2 { + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <¯o_press &kp LCTRL> + , <¯o_tap &kp B> + , <¯o_release &kp LCTRL> + , <¯o_pause_for_release> + , <¯o_tap &kp K> + ; + }; + + // ^bl: TMUX Space 3. + tmux_3: tmux_space_3 { + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings + = <¯o_press &kp LCTRL> + , <¯o_tap &kp B> + , <¯o_release &kp LCTRL> + , <¯o_pause_for_release> + , <¯o_tap &kp L> + ; + }; + }; +}; + +/ { + /** + * 34-key keymap, using a Dvorak base layer. + */ + keymap { + compatible = "zmk,keymap"; + + /** Traditional Dvorak layout. */ + dvorak { + bindings = < + /* ╭──────────────────────────────────────────────────────────────────╮ ╭──────────────────────────────────────────────────────────────────╮ */ + &kp APOS &kp COMMA &kp DOT &kp P &kp Y &kp F &kp G &kp C &kp R &kp L + &hml LALT A &hml LGUI O &hml LCTRL E &hml LSHFT U &kp I &kp D &kp H &hmr LCTRL T &hmr LGUI N &hmr LALT S + &none &kp Q &kp J &kp K &kp X &kp B &kp M &kp W &kp V &kp Z + /* ╰──────────────────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────────────────╯ */ + &mo LOWER &kp SPACE &smart_shft &mo UPPER + /* ╰────────────────────────────────────────╯ ╰────────────────────────────────────────╯ */ + >; + }; + + /** + * Lower layer. Left thumb down. + * + * Navigation and symbols. + * + * - Primary hand (left): + * - Home-row sticky mods. + * - Direct access to desktop shortcuts. + * - Secondary hand (right): + * - Inverted T arrow cluster. + * - Parenthesis brackets. + * - Semi-colon for synergy with parenthesis and alt mod. + */ + lower { + bindings = < + /* ╭──────────────────────────────────────────────────────────────────╮ ╭──────────────────────────────────────────────────────────────────╮ */ + &kp LA(N1) &kp LA(N2) &kp LA(N3) &kp LA(N4) &kp LA(N5) &kp DEL &kp LS(TAB) &kp UP &kp BSPC &kp TAB + &sk LALT &sk LGUI &sk LCTRL &sk LSHIFT &kp LAUNCHER &none &kp LEFT &kp DOWN &kp RIGHT &kp ENTER + &kp LG(X) &kp RCS_TAB &kp LG(C) &kp CTL_TAB &kp LG(V) &none &kp LPAR &kp SEMI &kp RPAR &none + /* ╰──────────────────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────────────────╯ */ + &trans /*↓*/ &none &trans &trans + /* ╰────────────────────────────────────────╯ ╰────────────────────────────────────────╯ */ + >; + }; + + /** + * Upper layer. Right thumb down. + * + * Symbols. + * + * - Primary hand (right): + * - Underscore for symmetry with dash on other half. + * - Caret and dollar for Vi-motions. + * - Square and curly brackets. + * - Double quotes for modal editors registry. + * - Secondary hand (left): + * - Most common operators. + * - Hash and exclamation mark for Gmail shortcuts, and with synergy with right-side brackets. + * - Modal editors escape+colon roll for command mode. + */ + upper { + bindings = < + /* ╭──────────────────────────────────────────────────────────────────╮ ╭──────────────────────────────────────────────────────────────────╮ */ + &kp PERCENT &kp HASH &kp EXCL &kp EQUAL &none &none &kp CARET &kp QMARK &kp DOLLAR &kp BSLH + &kp GRAVE &kp ESCAPE &kp MINUS &kp COLON &sshift &none &kp LBRC &kp UNDER &kp RBRC &kp AT + &kp TILDE &kp PLUS &kp ASTERISK &kp SLASH &none &none &kp LBKT &kp DQT &kp RBKT &none + /* ╰──────────────────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────────────────╯ */ + &trans &trans &none &trans /*↓*/ + /* ╰────────────────────────────────────────╯ ╰────────────────────────────────────────╯ */ + >; + }; + + /** + * Extend layer. Classic tri-layer activated from both lower and upper layers. + * + * Numbers and symbols. + * + * - Optimized numrow, and balanced operators. + * - Tilde and forward-slash synergy for paths. + * - Direct access to extended desktop shortcuts. + */ + extend { + bindings = < + /* ╭──────────────────────────────────────────────────────────────────╮ ╭──────────────────────────────────────────────────────────────────╮ */ + &kp LA(N6) &kp LA(N7) &kp LA(N8) &kp LA(N9) &kp LA(N0) &none &tmux_0 &tmux_1 &tmux_2 &tmux_3 + &kp N7 &kp N5 &kp N1 &kp N3 &none &none &kp N2 &kp N0 &kp N4 &kp N6 + &rarrow &kp LT &kp AMPS &kp N9 &none &none &kp N8 &kp PIPE &kp GT &frarrow + /* ╰──────────────────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────────────────╯ */ + &trans /*↓*/ &none &none &trans /*↓*/ + /* ╰────────────────────────────────────────╯ ╰────────────────────────────────────────╯ */ + >; + }; + + /** + * System layer for hardware controls. + * + * Available as a sticky-layer with a hard-to-mistap thumb cluster tap dance. + * + * - Bluetooth channels. + * - Reset/bootloader. + * - Base layers. + * - Ext power/RGB. + */ + system { + bindings = < + /* ╭──────────────────────────────────────────────────────────────────╮ ╭──────────────────────────────────────────────────────────────────╮ */ + EXTPOW_TOG &bt BT_SEL 3 &bt BT_SEL 2 &bt BT_SEL 1 &bt BT_SEL 0 &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 EXTPOW_TOG + RGB_UG_TOG &none &none &none &bt BT_CLR &bt BT_CLR &none &none &none RGB_UG_TOG + &none &sys_reset &bt BT_PRV &bt BT_NXT &bootloader &bootloader &bt BT_NXT &bt BT_PRV &sys_reset &none + /* ╰──────────────────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────────────────╯ */ + &none &none &none &none + /* ╰────────────────────────────────────────╯ ╰────────────────────────────────────────╯ */ + >; + }; + }; +}; diff --git a/config/boards/arm/rp2040_ce/Kconfig.board b/config/boards/arm/rp2040_ce/Kconfig.board new file mode 100644 index 00000000..86533dde --- /dev/null +++ b/config/boards/arm/rp2040_ce/Kconfig.board @@ -0,0 +1,8 @@ +# Copyright (c) 2022 Pete Johanson +# Copyright (c) 2024, Nicolas Munnich +# Copyright (c) 2024, Charly Delay +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_RP2040_CE + bool "RP2040 Community Edition" + depends on SOC_RP2040 diff --git a/config/boards/arm/rp2040_ce/Kconfig.defconfig b/config/boards/arm/rp2040_ce/Kconfig.defconfig new file mode 100644 index 00000000..48dcbed0 --- /dev/null +++ b/config/boards/arm/rp2040_ce/Kconfig.defconfig @@ -0,0 +1,24 @@ +# Copyright (c) 2022 Peter Johanson +# Copyright (c) 2024, Nicolas Munnich +# Copyright (c) 2024, Charly Delay +# SPDX-License-Identifier: Apache-2.0 + +if BOARD_RP2040_CE + +config BOARD + default "rp2040_ce" + +config RP2_FLASH_W25Q080 + default y + +if I2C_DW + +config I2C_DW_CLOCK_SPEED + default 125 + +endif #I2C_DW + +config USB_SELF_POWERED + default n + +endif # BOARD_RP2040_CE diff --git a/config/boards/arm/rp2040_ce/board.cmake b/config/boards/arm/rp2040_ce/board.cmake new file mode 100644 index 00000000..e7bbbfd3 --- /dev/null +++ b/config/boards/arm/rp2040_ce/board.cmake @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2023 TOKITA Hiroshi +# Copyright (c) 2023 Charly Delay + +board_runner_args(uf2 "--board-id=RPI-RP2") + +include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake) diff --git a/config/boards/arm/rp2040_ce/elite_c_connector.dtsi b/config/boards/arm/rp2040_ce/elite_c_connector.dtsi new file mode 100644 index 00000000..7af2eddc --- /dev/null +++ b/config/boards/arm/rp2040_ce/elite_c_connector.dtsi @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2020 Pete Johanson + * Copyright (c) 2024 burkfers + * Copyright (c) 2024 Charly Delay + * + * SPDX-License-Identifier: MIT + */ + +/ { + elite_c: connector2 { + compatible = "keebio,elite-c"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <0 0 &gpio0 12 0> /* D12 */ + , <1 0 &gpio0 13 0> /* D13 */ + , <2 0 &gpio0 14 0> /* D14 */ + , <3 0 &gpio0 15 0> /* D15 */ + , <4 0 &gpio0 16 0> /* D16 */ + ; + }; + +}; + +elite_c_i2c: &i2c1 {}; +elite_c_spi: &spi0 {}; +elite_c_serial: &uart0 {}; diff --git a/config/boards/arm/rp2040_ce/rp2040_ce-pinctrl.dtsi b/config/boards/arm/rp2040_ce/rp2040_ce-pinctrl.dtsi new file mode 100644 index 00000000..38216188 --- /dev/null +++ b/config/boards/arm/rp2040_ce/rp2040_ce-pinctrl.dtsi @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2021, Yonatan Schachter + * Copyright (c) 2022, Peter Johanson + * Copyright (c) 2022, Charly Delay + * SPDX-License-Identifier: Apache-2.0 + */ + +#include + +&pinctrl { + uart0_default: uart0_default { + group1 { + pinmux = ; + }; + group2 { + pinmux = ; + input-enable; + }; + }; + + i2c1_default: i2c1_default { + group1 { + pinmux = ; + input-enable; + }; + group2 { + pinmux = ; + input-enable; + }; + }; + + spi0_default: spi0_default { + group1 { + pinmux = ; + }; + group2 { + pinmux = ; + input-enable; + }; + group3 { + pinmux = ; + }; + }; + + adc_default: adc_default { + group1 { + pinmux = , , , ; + input-enable; + }; + }; +}; diff --git a/config/boards/arm/rp2040_ce/rp2040_ce.dts b/config/boards/arm/rp2040_ce/rp2040_ce.dts new file mode 100644 index 00000000..724437f8 --- /dev/null +++ b/config/boards/arm/rp2040_ce/rp2040_ce.dts @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2021 Yonatan Schachter + * Copyright (c) 2022 Peter Johanson + * Copyright (c) 2024 Nicolas Munnich + * Copyright (c) 2024 Charly Delay + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/dts-v1/; + +#include +#include "rp2040_ce-pinctrl.dtsi" +#include "elite_c_connector.dtsi" +#include "sparkfun_pro_micro_connector.dtsi" +#include + +/ { + chosen { + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,flash-controller = &ssi; + zephyr,console = &uart0; + zephyr,shell-uart = &uart0; + zephyr,code-partition = &code_partition; + }; + + aliases { + watchdog0 = &wdt0; + }; + + xtal_clk: xtal-clk { + compatible = "fixed-clock"; + clock-frequency = <12000000>; + #clock-cells = <0>; + }; +}; + +&flash0 { + reg = <0x10000000 DT_SIZE_M(8)>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + /* Reserved memory for the second stage bootloader */ + second_stage_bootloader: partition@0 { + label = "second_stage_bootloader"; + reg = <0x00000000 0x100>; + read-only; + }; + + /* + * Usable flash. Starts at 0x100, after the bootloader. The partition + * size is 8MB minus the 0x100 bytes taken by the bootloader. + */ + code_partition: partition@100 { + label = "code"; + reg = <0x100 (DT_SIZE_M(8) - 0x100)>; + read-only; + }; + }; +}; + +&uart0 { + current-speed = <115200>; + status = "disabled"; + pinctrl-0 = <&uart0_default>; + pinctrl-names = "default"; +}; + +&spi0 { + status = "okay"; + pinctrl-0 = <&spi0_default>; + pinctrl-names = "default"; + clock-frequency = ; +}; + +&i2c1 { + status = "okay"; + pinctrl-0 = <&i2c1_default>; + pinctrl-names = "default"; + clock-frequency = ; +}; + +&gpio0 { + status = "okay"; +}; + +&wdt0 { + status = "okay"; +}; + +&adc { + status = "okay"; + pinctrl-0 = <&adc_default>; + pinctrl-names = "default"; +}; + +zephyr_udc0: &usbd { + status = "okay"; +}; + +&vreg { + regulator-always-on; + regulator-allowed-modes = ; +}; diff --git a/config/boards/arm/rp2040_ce/rp2040_ce.yaml b/config/boards/arm/rp2040_ce/rp2040_ce.yaml new file mode 100644 index 00000000..99cc3967 --- /dev/null +++ b/config/boards/arm/rp2040_ce/rp2040_ce.yaml @@ -0,0 +1,21 @@ +identifier: rp2040_ce +name: RP2040 Community Edition +type: mcu +arch: arm +flash: 8192 +ram: 264 +toolchain: + - zephyr + - gnuarmemb + - xtools +supported: + - uart + - gpio + - adc + - i2c + - spi + - hwinfo + - watchdog + - pwm + - flash + - dma diff --git a/config/boards/arm/rp2040_ce/rp2040_ce.zmk.yaml b/config/boards/arm/rp2040_ce/rp2040_ce.zmk.yaml new file mode 100644 index 00000000..f8bbda37 --- /dev/null +++ b/config/boards/arm/rp2040_ce/rp2040_ce.zmk.yaml @@ -0,0 +1,9 @@ +file_format: "1" +id: rp2040_ce +name: RP2040 Community Edition +type: board +arch: arm +outputs: + - usb +url: https://docs.bastardkb.com/hw/rp2040-community.html +exposes: [pro_micro] diff --git a/config/boards/arm/rp2040_ce/rp2040_ce_defconfig b/config/boards/arm/rp2040_ce/rp2040_ce_defconfig new file mode 100644 index 00000000..2b84065c --- /dev/null +++ b/config/boards/arm/rp2040_ce/rp2040_ce_defconfig @@ -0,0 +1,26 @@ +# SPDX-License-Identifier: Apache-2.0 + +CONFIG_SOC_SERIES_RP2XXX=y +CONFIG_SOC_RP2040=y +CONFIG_BOARD_RP2040_CE=y + +CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=125000000 + +# enable uart driver +CONFIG_SERIAL=n + +# enable console +CONFIG_CONSOLE=n +CONFIG_UART_CONSOLE=n +CONFIG_UART_INTERRUPT_DRIVEN=y + +# Enable reset by default +CONFIG_RESET=y + +# Code partition needed to target the correct flash range +CONFIG_USE_DT_CODE_PARTITION=y + +# Output UF2 by default, native bootloader supports it. +CONFIG_BUILD_OUTPUT_UF2=y + +CONFIG_ZMK_USB=y diff --git a/config/boards/arm/rp2040_ce/sparkfun_pro_micro_connector.dtsi b/config/boards/arm/rp2040_ce/sparkfun_pro_micro_connector.dtsi new file mode 100644 index 00000000..708ad618 --- /dev/null +++ b/config/boards/arm/rp2040_ce/sparkfun_pro_micro_connector.dtsi @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2020 Pete Johanson + * Copyright (c) 2024 Charly Delay + * + * SPDX-License-Identifier: MIT + */ + +/ { + pro_micro: connector { + compatible = "sparkfun,pro-micro"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map + = <1 0 &gpio0 0 0> /* D1 */ + , <0 0 &gpio0 1 0> /* D0 */ + , <2 0 &gpio0 2 0> /* D2 */ + , <3 0 &gpio0 3 0> /* D3 */ + , <4 0 &gpio0 4 0> /* D4/A6 */ + , <5 0 &gpio0 5 0> /* D5 */ + , <6 0 &gpio0 6 0> /* D6/A7 */ + , <7 0 &gpio0 7 0> /* D7 */ + , <8 0 &gpio0 8 0> /* D8/A8 */ + , <9 0 &gpio0 9 0> /* D9/A9 */ + , <10 0 &gpio0 21 0> /* D10/A10 */ + , <16 0 &gpio0 23 0> /* D16 */ + , <14 0 &gpio0 20 0> /* D14 */ + , <15 0 &gpio0 22 0> /* D15 */ + , <18 0 &gpio0 26 0> /* D18/A0 */ + , <19 0 &gpio0 27 0> /* D19/A1 */ + , <20 0 &gpio0 28 0> /* D20/A2 */ + , <21 0 &gpio0 29 0> /* D21/A3 */ + ; + }; + +}; + +pro_micro_i2c: &i2c1 {}; +pro_micro_spi: &spi0 {}; +pro_micro_serial: &uart0 {}; diff --git a/config/boards/shields/skeletyl_34/Kconfig.defconfig b/config/boards/shields/skeletyl_34/Kconfig.defconfig new file mode 100644 index 00000000..51a6d368 --- /dev/null +++ b/config/boards/shields/skeletyl_34/Kconfig.defconfig @@ -0,0 +1,27 @@ +# Copyright (c) 2022 ZMK Contributors +# SPDX-License-Identifier: MIT + + +if SHIELD_SKELETYL_34_LEFT + +config ZMK_KEYBOARD_NAME + default "Skeletyl" + +config ZMK_SPLIT_BLE_ROLE_CENTRAL + default y + +endif + +if SHIELD_SKELETYL_34_RIGHT + +config ZMK_KEYBOARD_NAME + default "Skeletyl Right" + +endif + +if SHIELD_SKELETYL_34_LEFT || SHIELD_SKELETYL_34_RIGHT + +config ZMK_SPLIT + default y + +endif diff --git a/config/boards/shields/skeletyl_34/Kconfig.shield b/config/boards/shields/skeletyl_34/Kconfig.shield new file mode 100644 index 00000000..00c0f72e --- /dev/null +++ b/config/boards/shields/skeletyl_34/Kconfig.shield @@ -0,0 +1,8 @@ +# Copyright (c) 2020 ZMK Contributors +# SPDX-License-Identifier: MIT + +config SHIELD_SKELETYL_34_LEFT + def_bool $(shields_list_contains,skeletyl_34_left) + +config SHIELD_SKELETYL_34_RIGHT + def_bool $(shields_list_contains,skeletyl_34_right) diff --git a/config/boards/shields/skeletyl_34/skeletyl_34.conf b/config/boards/shields/skeletyl_34/skeletyl_34.conf new file mode 100644 index 00000000..e69de29b diff --git a/config/boards/shields/skeletyl_34/skeletyl_34.dtsi b/config/boards/shields/skeletyl_34/skeletyl_34.dtsi new file mode 100644 index 00000000..7da2d48e --- /dev/null +++ b/config/boards/shields/skeletyl_34/skeletyl_34.dtsi @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2020 ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include + +&pinctrl { + spi3_default: spi3_default { + group1 { + psels = ; + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + 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 = <18>; /* number of LEDs */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + color-mapping = ; + }; +}; + +/ { + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + zmk,battery = &vbatt; + zmk,underglow = &led_strip; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <10>; + rows = <4>; + + 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(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(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(3,2) RC(3,3) RC(3,6) RC(3,7) + >; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + + diode-direction = "row2col"; + row-gpios + = <&pro_micro 18 GPIO_ACTIVE_HIGH> + , <&pro_micro 5 GPIO_ACTIVE_HIGH> + , <&pro_micro 4 GPIO_ACTIVE_HIGH> + , <&pro_micro 9 GPIO_ACTIVE_HIGH> + ; + + }; + + vbatt: vbatt { + compatible = "zmk,battery-nrf-vddh"; + }; +}; diff --git a/config/boards/shields/skeletyl_34/skeletyl_34.keymap b/config/boards/shields/skeletyl_34/skeletyl_34.keymap new file mode 100644 index 00000000..ad2d5e6f --- /dev/null +++ b/config/boards/shields/skeletyl_34/skeletyl_34.keymap @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2020 ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + + +#include +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { +// ------------------------------------------------------------------------------------------------------------ +// | Q | W | E | R | T | | Y | U | I | O | P | +// | A | S | D | F | G | | H | J | K | L | ; | +// | Z | X | C | V | B | | N | M | , | . | / | +// | ESC | SPCE | | BKSP | ENTER | + bindings = < +&kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P +&kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI +&kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &bt BT_CLR &bt BT_SEL 0 + &kp ESC &kp SPACE &kp BKSP &kp ENTER + >; + }; + }; +}; diff --git a/config/boards/shields/skeletyl_34/skeletyl_34_left.conf b/config/boards/shields/skeletyl_34/skeletyl_34_left.conf new file mode 100644 index 00000000..e69de29b diff --git a/config/boards/shields/skeletyl_34/skeletyl_34_left.overlay b/config/boards/shields/skeletyl_34/skeletyl_34_left.overlay new file mode 100644 index 00000000..5d9e03a0 --- /dev/null +++ b/config/boards/shields/skeletyl_34/skeletyl_34_left.overlay @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2020 ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "skeletyl_34.dtsi" + +&kscan0 { + col-gpios + = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; +}; diff --git a/config/boards/shields/skeletyl_34/skeletyl_34_right.conf b/config/boards/shields/skeletyl_34/skeletyl_34_right.conf new file mode 100644 index 00000000..e69de29b diff --git a/config/boards/shields/skeletyl_34/skeletyl_34_right.overlay b/config/boards/shields/skeletyl_34/skeletyl_34_right.overlay new file mode 100644 index 00000000..6a4f42ba --- /dev/null +++ b/config/boards/shields/skeletyl_34/skeletyl_34_right.overlay @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2020 ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "skeletyl_34.dtsi" + +&default_transform { + col-offset = <5>; +}; + +&kscan0 { + col-gpios + = <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; +}; diff --git a/config/combos.dtsi b/config/combos.dtsi new file mode 100644 index 00000000..b2448c84 --- /dev/null +++ b/config/combos.dtsi @@ -0,0 +1,68 @@ +/* KEY POSITIONS + + ╭─────────────────────╮ ╭─────────────────────╮ + │ LT4 LT3 LT2 LT1 LT0 │ │ RT0 RT1 RT2 RT3 RT4 │ + │ LM4 LM3 LM2 LM1 LM0 │ │ RM0 RM1 RM2 RM3 RM4 │ + │ LB4 LB3 LB2 LB1 LB0 │ │ RB0 RB1 RB2 RB3 RB4 │ + ╰───────╮ LH2 LH1 LH0 │ │ RH0 RH1 RH2 ╭───────╯ + ╰─────────────╯ ╰─────────────╯ */ + +#define COMBO_TERM_FAST 18 +#define COMBO_TERM_SLOW 30 + +#define COMBO_IDLE_FAST 150 +#define COMBO_IDLE_SLOW 50 + +/* Horizontal combos - left hand */ +ZMK_COMBO(lsys, &sl SYSTEM, LH1 LH0, DVORAK LOWER UPPER, COMBO_TERM_SLOW, COMBO_IDLE_FAST) +ZMK_COMBO(esc, &kp ESC, LT3 LT2, DVORAK LOWER UPPER, COMBO_TERM_FAST, COMBO_IDLE_FAST) +ZMK_COMBO(ret, &kp RETURN, LT2 LT1, DVORAK LOWER UPPER, COMBO_TERM_FAST, COMBO_IDLE_FAST) +// ZMK_COMBO(mouse, &smart_mouse, LT3 LT1, DVORAK LOWER UPPER, COMBO_TERM_FAST, COMBO_IDLE_FAST) + +// Combos overlapping HRMs are set up as hold-taps themselves to allow for instantaneous +// chording of mods. Custom hold-tap instances can be bootstrapped on the go using the +// 8-argument version of ZMK_COMBO defined in base.keymap. +ZMK_COMBO(tab, &hml LS(LALT)TAB, LM3 LM2, DVORAK LOWER UPPER, COMBO_TERM_FAST, COMBO_IDLE_FAST) +// ZMK_COMBO(ldr, &leader, LM2 LM1, DVORAK LOWER UPPER, COMBO_TERM_FAST, COMBO_IDLE_FAST, LS(LCTRL), KEYS_R) +// ZMK_COMBO(ldrsh, &leader_sft, LM3 LM2 LM1, DVORAK LOWER UPPER, COMBO_TERM_FAST, COMBO_IDLE_FAST, LS(LC(LALT)), KEYS_R) + +ZMK_COMBO(cut, &kp LC(X), LB3 LB1, DVORAK LOWER UPPER, COMBO_TERM_FAST, COMBO_IDLE_FAST) +ZMK_COMBO(copy, &kp LC(INS), LB3 LB2, DVORAK LOWER UPPER, COMBO_TERM_FAST, COMBO_IDLE_FAST) +ZMK_COMBO(paste, &kp LS(INS), LB2 LB1, DVORAK LOWER UPPER, COMBO_TERM_FAST, COMBO_IDLE_FAST) + +/* Horizontal combos - right hand */ +ZMK_COMBO(rsys, &sl SYSTEM, RH0 RH1, DVORAK LOWER UPPER, COMBO_TERM_SLOW, COMBO_IDLE_FAST) +ZMK_COMBO(bspc, &kp BSPC, RT1 RT2, DVORAK LOWER UPPER, COMBO_TERM_FAST, COMBO_IDLE_FAST) +ZMK_COMBO(del, &kp DEL, RT2 RT3, DVORAK LOWER UPPER, COMBO_TERM_FAST, COMBO_IDLE_FAST) + +// ZMK_COMBO(lpar, &lpar_lt, RM1 RM2, DVORAK UPPER, COMBO_TERM_FAST, COMBO_IDLE_FAST, RS(LCTRL), KEYS_L) +// ZMK_COMBO(rpar, &rpar_gt, RM2 RM3, DVORAK UPPER, COMBO_TERM_FAST, COMBO_IDLE_FAST, RS(LALT), KEYS_L) +ZMK_COMBO(lt, &kp LT, RM1 RM2, LOWER , COMBO_TERM_FAST, COMBO_IDLE_FAST) +ZMK_COMBO(gt, &kp GT, RM2 RM3, LOWER , COMBO_TERM_FAST, COMBO_IDLE_FAST) + +ZMK_COMBO(lbkt, &kp LBKT, RB1 RB2, DVORAK UPPER, COMBO_TERM_FAST, COMBO_IDLE_FAST) +ZMK_COMBO(rbkt, &kp RBKT, RB2 RB3, DVORAK UPPER, COMBO_TERM_FAST, COMBO_IDLE_FAST) +ZMK_COMBO(lbrc, &kp LBRC, RB1 RB2, LOWER , COMBO_TERM_FAST, COMBO_IDLE_FAST) +ZMK_COMBO(rbrc, &kp RBRC, RB2 RB3, LOWER , COMBO_TERM_FAST, COMBO_IDLE_FAST) + +/* Vertical combos - left hand */ +ZMK_COMBO(at, &kp AT, LT3 LM3, DVORAK LOWER UPPER, COMBO_TERM_SLOW, COMBO_IDLE_SLOW) +ZMK_COMBO(hash, &kp HASH, LT2 LM2, DVORAK LOWER UPPER, COMBO_TERM_SLOW, COMBO_IDLE_SLOW) +ZMK_COMBO(dllr, &kp DLLR, LT1 LM1, DVORAK LOWER UPPER, COMBO_TERM_SLOW, COMBO_IDLE_SLOW) +ZMK_COMBO(prcnt, &kp PRCNT, LT0 LM0, DVORAK LOWER UPPER, COMBO_TERM_SLOW, COMBO_IDLE_SLOW) + +ZMK_COMBO(grave, &kp GRAVE, LM3 LB3, DVORAK LOWER UPPER, COMBO_TERM_SLOW, COMBO_IDLE_SLOW) +ZMK_COMBO(bslh, &kp BSLH, LM2 LB2, DVORAK LOWER UPPER, COMBO_TERM_SLOW, COMBO_IDLE_SLOW) +ZMK_COMBO(equal, &kp EQUAL, LM1 LB1, DVORAK LOWER UPPER, COMBO_TERM_SLOW, COMBO_IDLE_SLOW) +ZMK_COMBO(tilde, &kp TILDE, LM0 LB0, DVORAK LOWER UPPER, COMBO_TERM_SLOW, COMBO_IDLE_SLOW) + +/* Vertical combos - right hand */ +ZMK_COMBO(caret, &kp CARET, RT0 RM0, DVORAK LOWER UPPER, COMBO_TERM_SLOW, COMBO_IDLE_SLOW) +ZMK_COMBO(plus, &kp PLUS, RT1 RM1, DVORAK LOWER UPPER, COMBO_TERM_SLOW, COMBO_IDLE_SLOW) +ZMK_COMBO(star, &kp STAR, RT2 RM2, DVORAK LOWER UPPER, COMBO_TERM_SLOW, COMBO_IDLE_SLOW) +ZMK_COMBO(amps, &kp AMPS, RT3 RM3, DVORAK LOWER UPPER, COMBO_TERM_SLOW, COMBO_IDLE_SLOW) + +ZMK_COMBO(under, &kp UNDER, RM0 RB0, DVORAK LOWER UPPER, COMBO_TERM_SLOW, COMBO_IDLE_SLOW) +ZMK_COMBO(minus, &kp MINUS, RM1 RB1, DVORAK LOWER UPPER, COMBO_TERM_SLOW, COMBO_IDLE_SLOW) +ZMK_COMBO(fslh, &kp FSLH, RM2 RB2, DVORAK LOWER UPPER, COMBO_TERM_SLOW, COMBO_IDLE_SLOW) +ZMK_COMBO(pipe, &kp PIPE, RM3 RB3, DVORAK LOWER UPPER, COMBO_TERM_SLOW, COMBO_IDLE_SLOW) diff --git a/config/skeletyl.conf b/config/skeletyl.conf index 78a4c6e6..5350f3cd 100644 --- a/config/skeletyl.conf +++ b/config/skeletyl.conf @@ -1,3 +1,12 @@ +# Set sleep timeout to 30min (30*60*1000ms). +CONFIG_ZMK_SLEEP=y +CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000 + +# Bluetooth tweaks. +CONFIG_ZMK_BLE_EXPERIMENTAL_CONN=y +CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION=n +CONFIG_BT_CTLR_TX_PWR_PLUS_8=y + # "Equivalent" of asym_eager debounce. CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1 CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5 diff --git a/config/skeletyl.keymap b/config/skeletyl.keymap index 468618a7..192f0be2 100644 --- a/config/skeletyl.keymap +++ b/config/skeletyl.keymap @@ -142,8 +142,8 @@ bindings = <¯o_press &kp LCTRL> , <¯o_tap &kp B> - , <¯o_tap &kp H> , <¯o_release &kp LCTRL> + , <¯o_tap &kp H> ; }; @@ -155,8 +155,8 @@ bindings = <¯o_press &kp LCTRL> , <¯o_tap &kp B> - , <¯o_tap &kp J> , <¯o_release &kp LCTRL> + , <¯o_tap &kp J> ; }; @@ -168,8 +168,8 @@ bindings = <¯o_press &kp LCTRL> , <¯o_tap &kp B> - , <¯o_tap &kp K> , <¯o_release &kp LCTRL> + , <¯o_tap &kp K> ; }; @@ -181,8 +181,8 @@ bindings = <¯o_press &kp LCTRL> , <¯o_tap &kp B> - , <¯o_tap &kp L> , <¯o_release &kp LCTRL> + , <¯o_tap &kp L> ; }; }; @@ -243,7 +243,7 @@ bindings = <&kp COMMA>, <&kp ESCAPE>; mods = <(MOD_LSFT|MOD_RSFT)>; }; - + // Period -> colon. dot_colon: period_colon { compatible = "zmk,behavior-mod-morph"; @@ -361,7 +361,7 @@ * Numbers and symbols. * * - Optimized numrow, and balanced operators. - * - Tilde and forward-slash synergy for paths. + * - Tilde and forward-slash synergy for paths. * - Direct access to extended desktop shortcuts. */ extend { @@ -378,7 +378,7 @@ /** * System layer for hardware controls. - * + * * Available as a sticky-layer with a hard-to-mistap thumb cluster tap dance. * * - Bluetooth channels. diff --git a/config/skeletyl_34.conf b/config/skeletyl_34.conf new file mode 100644 index 00000000..5350f3cd --- /dev/null +++ b/config/skeletyl_34.conf @@ -0,0 +1,23 @@ +# Set sleep timeout to 30min (30*60*1000ms). +CONFIG_ZMK_SLEEP=y +CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000 + +# Bluetooth tweaks. +CONFIG_ZMK_BLE_EXPERIMENTAL_CONN=y +CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION=n +CONFIG_BT_CTLR_TX_PWR_PLUS_8=y + +# "Equivalent" of asym_eager debounce. +CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1 +CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5 + +# External power: allow *control* to disable VCC. +CONFIG_ZMK_EXT_POWER=y + +# Sleep: disable idle. +#CONFIG_ZMK_SLEEP=n + +# Underglow. +CONFIG_ZMK_RGB_UNDERGLOW=y +CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3 +CONFIG_WS2812_STRIP=y diff --git a/config/skeletyl_34.keymap b/config/skeletyl_34.keymap new file mode 100644 index 00000000..b37c4b97 --- /dev/null +++ b/config/skeletyl_34.keymap @@ -0,0 +1,8 @@ +/* source key position labels */ +#include "zmk-helpers/key-labels/34.h" + +/* activate bluetooth */ +#define CONFIG_WIRELESS + +/* source the main keymap */ +#include "base.keymap" diff --git a/config/skeletyl_wired.conf b/config/skeletyl_wired.conf new file mode 100644 index 00000000..09d2f62d --- /dev/null +++ b/config/skeletyl_wired.conf @@ -0,0 +1,23 @@ +# Sleep: disable idle. +CONFIG_ZMK_SLEEP=n + +# External power: allow *control* to disable VCC. +CONFIG_ZMK_EXT_POWER=y + +# Combo config, automated by build script +CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=6 +CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO=3 + +# Leader config, automated by build script +CONFIG_ZMK_LEADER_MAX_SEQUENCES_PER_KEY=27 +CONFIG_ZMK_LEADER_MAX_KEYS_PER_SEQUENCE=2 + +# Bluetooth tweaks +CONFIG_ZMK_BLE_EXPERIMENTAL_CONN=y +CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION=n +CONFIG_BT_CTLR_TX_PWR_PLUS_8=y + +# Underglow. +CONFIG_ZMK_RGB_UNDERGLOW=y +CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3 +CONFIG_WS2812_STRIP=y diff --git a/config/skeletyl_wired.keymap b/config/skeletyl_wired.keymap new file mode 100644 index 00000000..95e79ae4 --- /dev/null +++ b/config/skeletyl_wired.keymap @@ -0,0 +1,15 @@ +/* source key position labels */ +#include "zmk-helpers/key-labels/36.h" + +/* map Zen's extra keys */ +#define X_LH &kp LGUI // thumb row, left +#define X_RH &smart_mouse // thumb row, right + +/* activate bluetooth */ +#define CONFIG_WIRELESS + +/* source the main keymap */ +#include "base.keymap" + +/* use 5-column layout for Zen */ +ZMK_APPLY_MATRIX_TRANSFORM(five_column_transform) diff --git a/config/west.yml b/config/west.yml index 379d2919..1ca45bae 100644 --- a/config/west.yml +++ b/config/west.yml @@ -1,11 +1,34 @@ manifest: + defaults: + remote: urob + remotes: - - name: zmkfirmware + - name: upstream url-base: https://github.com/zmkfirmware + - name: urob + url-base: https://github.com/urob + projects: + - name: zmk-helpers + revision: main + path: modules/helpers + - name: zmk-auto-layer + revision: main + path: modules/auto-layer + - name: zmk-tri-state + revision: main + path: modules/tri-state + + # ZMK with Zephyr namespaced under /zmk. This requires that ZMK imports + # Zephyr with a path other than `zephyr` (as in `going-modular`). - name: zmk - remote: zmkfirmware + remote: upstream revision: main import: app/west.yml + # path: . + # import: + # file: app/west.yml + # path-prefix: zmk + self: path: config