diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d74fb89..8735e7b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,4 +2,4 @@ on: [push, pull_request, workflow_dispatch] jobs: build: - uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@main + uses: petejohanson/zmk/.github/workflows/build-user-config.yml@core/zephyr-3.5-update diff --git a/README.md b/README.md deleted file mode 100644 index 4db1c03..0000000 --- a/README.md +++ /dev/null @@ -1 +0,0 @@ -[This guy](https://nickcoutsos.github.io/keymap-editor/) has a pretty decent GUI editor on the web that integrates with your Git repository. diff --git a/boards/shields/.gitkeep b/boards/shields/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/build.yaml b/build.yaml index 799613a..7e48b3d 100644 --- a/build.yaml +++ b/build.yaml @@ -1,9 +1,8 @@ -# This file generates the GitHub Actions matrix. -# For simple board + shield combinations, add them to the top level board and -# shield arrays, for more control, add individual board + shield combinations -# to the `include` property. You can also use the `cmake-args` property to -# pass flags to the build command and `artifact-name` to assign a name to -# distinguish build outputs from each other: +# This file generates the GitHub Actions matrix +# For simple board + shield combinations, add them +# to the top level board and shield arrays, for more +# control, add individual board + shield combinations to +# the `include` property, e.g: # # board: [ "nice_nano_v2" ] # shield: [ "corne_left", "corne_right" ] @@ -11,14 +10,12 @@ # - board: bdn9_rev2 # - board: nice_nano_v2 # shield: reviung41 -# - board: nice_nano_v2 -# shield: corne_left -# cmake-args: -DCONFIG_ZMK_USB_LOGGING=y -# artifact-name: corne_left_with_logging # --- include: - board: nice_nano_v2 - shield: lily58_left + shield: wyld_dm_right nice_view - board: nice_nano_v2 - shield: lily58_right + shield: wyld_dm_left + - board: nice_nano_v2 + shield: settings_reset diff --git a/config/boards/nice_nano_v2.overlay b/config/boards/nice_nano_v2.overlay new file mode 100644 index 0000000..5ef7374 --- /dev/null +++ b/config/boards/nice_nano_v2.overlay @@ -0,0 +1,58 @@ +#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 = <62>; /* number of LEDs */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + color-mapping = ; + }; +}; + + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; + +&pro_micro_i2c { + status = "disabled"; +}; + +&pro_micro_serial { + status = "disabled"; +}; \ No newline at end of file diff --git a/config/boards/pillbug.overlay b/config/boards/pillbug.overlay new file mode 100644 index 0000000..e30c73a --- /dev/null +++ b/config/boards/pillbug.overlay @@ -0,0 +1,45 @@ +#include + + +&spi0 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi0_default>; + pinctrl-1 = <&spi0_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 = <40>; /* number of LEDs */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + color-mapping = ; + }; +}; + + + +&blackpill_i2c { + status = "disabled"; +}; + +&blackpill_serial { + status = "disabled"; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; + + diff --git a/config/boards/shields/wyld_dm/Kconfig.defconfig b/config/boards/shields/wyld_dm/Kconfig.defconfig new file mode 100644 index 0000000..2e0569d --- /dev/null +++ b/config/boards/shields/wyld_dm/Kconfig.defconfig @@ -0,0 +1,16 @@ +if SHIELD_WYLD_DM_RIGHT + +config ZMK_KEYBOARD_NAME + default "Wyld DM" + +config ZMK_SPLIT_ROLE_CENTRAL + default y + +endif + +if SHIELD_WYLD_DM_LEFT || SHIELD_WYLD_DM_RIGHT + +config ZMK_SPLIT + default y + +endif diff --git a/config/boards/shields/wyld_dm/Kconfig.shield b/config/boards/shields/wyld_dm/Kconfig.shield new file mode 100644 index 0000000..14c5534 --- /dev/null +++ b/config/boards/shields/wyld_dm/Kconfig.shield @@ -0,0 +1,10 @@ +# config SHIELD_WYLD_DM +# bool + +config SHIELD_WYLD_DM_LEFT + def_bool $(shields_list_contains,wyld_dm_left) +# select SHIELD_WYLD_DM + +config SHIELD_WYLD_DM_RIGHT + def_bool $(shields_list_contains,wyld_dm_right) +# select SHIELD_WYLD_DM diff --git a/config/boards/shields/wyld_dm/wyld_dm.dtsi b/config/boards/shields/wyld_dm/wyld_dm.dtsi new file mode 100644 index 0000000..dd083ea --- /dev/null +++ b/config/boards/shields/wyld_dm/wyld_dm.dtsi @@ -0,0 +1,137 @@ +#include +#include + + +//wyld_dm_6x6 = < +// 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(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(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) +// RC(5,2) RC(5,3) RC(5,4) RC(5,5) RC(5,6) RC(5,7) RC(5,8) RC(5,9) +// RC(6,2) RC(6,3) RC(6,4) RC(6,5) RC(6,6) RC(6,7) RC(6,8) RC(6,9) +// >; +// +//wyld_dm_5x7 = < +// 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(0,12) RC(0,13) +// 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(0,12) RC(0,13) +// RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(5,1) RC(5, 10) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) +// RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) +// RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,13) +// RC(5,2) RC(5,3) RC(5,4) RC(5,7) RC(5,8) RC(5,9) +// RC(5,5) RC(5,6) +// >; + +/ { + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; +// zephyr,display = &oled; + zmk,underglow = &led_strip; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <12>; + rows = <5>; +// | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | +// | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | +// | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | +// | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 | +// | SW30 | SW29 | SW28 | SW27 | SW26 | SW25 | | SW25 | SW26 | SW27 | SW28 | SW29 | SW30 | + + //# 5x7 with encoders +// 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(0,12) RC(0,13) +// 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(0,12) RC(0,13) +// RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(5,1) RC(5, 10) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) +// RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) +// RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,13) +// RC(5,2) RC(5,3) RC(5,4) RC(5,7) RC(5,8) RC(5,9) +// RC(5,5) RC(5,6) +// >; + +// map = < +// +// RC(1,5) RC(1,4) RC(1,3) RC(1,2) RC(1,1) RC(1,0) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) +// RC(2,5) RC(2,4) RC(2,3) RC(2,2) RC(2,1) RC(2,0) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) +// RC(3,5) RC(3,4) RC(3,3) RC(3,2) RC(3,1) RC(3,0) RC(0,6) RC(0,13) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) +// RC(4,5) RC(4,4) RC(4,3) RC(4,2) RC(4,1) RC(4,0) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) +// RC(0,0) RC(0,1) RC(0,7) +// RC(0,5) RC(0,2) RC(0,8) +// RC(0,4) RC(0,3) RC(0,10) RC(0,9) +// >; + + + // RC(4,5) IS THE ENCODER! + 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,2) RC(3,3) RC(3,4) RC(3,5) RC(3,8) RC(3,9) + RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) + + >; + }; + + + kscan0: kscan_0 { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + diode-direction = "col2row"; + + // PILLBUG PINS +// row-gpios +// = <&gpio1 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // PB1 / 1.11 +// , <&gpio0 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // PB0 / 1.09 +// , <&gpio1 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // PA4 / 1.11 +// , <&gpio0 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // PA3 / 0.31 +// , <&gpio0 31 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // PA2 / 1.15 +// , <&gpio0 29 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // PA1 / 0.29 +// ; + + // NANO V2 PINS + row-gpios + = <&gpio0 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // 0.9 + , <&gpio0 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // 0.9 + , <&gpio1 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // 1.07 + , <&gpio1 02 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // 1.02 + , <&gpio1 01 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // 1.01 + ; + +// // NANO V2 PINS +// row-gpios +// = <&gpio1 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // 1.13 +// , <&gpio1 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // 1.11 +// , <&gpio0 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // 0.10 +// , <&gpio0 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // 0.9 +//// , <&gpio0 31 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // PA2 / 1.15 +//// , <&gpio0 29 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // PA1 / 0.29 +// ; + + }; + + left_encoder: encoder_left { + compatible = "alps,ec11"; + label = "LEFT_ENCODER"; + a-gpios = <&gpio1 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&gpio1 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + steps = <60>; + status = "disabled"; + }; + +// right_encoder: encoder_right { +// compatible = "alps,ec11"; +// label = "RIGHT_ENCODER"; +// a-gpios = <&gpio0 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; +// b-gpios = <&gpio1 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; +// steps = <60>; +// status = "disabled"; +// }; + + sensors: sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder>; + triggers-per-rotation = <15>; + }; +}; \ No newline at end of file diff --git a/config/boards/shields/wyld_dm/wyld_dm.keymap b/config/boards/shields/wyld_dm/wyld_dm.keymap new file mode 100644 index 0000000..59d2be6 --- /dev/null +++ b/config/boards/shields/wyld_dm/wyld_dm.keymap @@ -0,0 +1,6 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ +#include "../../../wyld_dm.keymap" diff --git a/config/boards/shields/wyld_dm/wyld_dm.zmk.yml b/config/boards/shields/wyld_dm/wyld_dm.zmk.yml new file mode 100644 index 0000000..82d67ca --- /dev/null +++ b/config/boards/shields/wyld_dm/wyld_dm.zmk.yml @@ -0,0 +1,17 @@ +file_format: "1" +id: wyld_dm +Name: wyld_dm +type: shield +url: https://github.com/bullwinkle3000/zmk-config-xiao/ +requires: + - nice_nano_v2 +exposes: + - i2c_oled +features: + - keys + - display + - encoders + - pointer +siblings: + - wyld_dm_left + - wyld_dm_right diff --git a/config/boards/shields/wyld_dm/wyld_dm_left.conf b/config/boards/shields/wyld_dm/wyld_dm_left.conf new file mode 100644 index 0000000..8d44533 --- /dev/null +++ b/config/boards/shields/wyld_dm/wyld_dm_left.conf @@ -0,0 +1,19 @@ +# CONFIG_SPI=y +# # CONFIG_INPUT=y +# CONFIG_ZMK_RGB_UNDERGLOW=y +# CONFIG_WS2812_STRIP=y +# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y +# CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=n +# +# CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y +# CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=2 + +# CONFIG_ZMK_USB_LOGGING=y +# +# CONFIG_ZMK_RGB_UNDERGLOW=y +# CONFIG_WS2812_STRIP=y +# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y +# CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=n +# +# CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y +# CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=0 \ No newline at end of file diff --git a/config/boards/shields/wyld_dm/wyld_dm_left.overlay b/config/boards/shields/wyld_dm/wyld_dm_left.overlay new file mode 100644 index 0000000..54d80e5 --- /dev/null +++ b/config/boards/shields/wyld_dm/wyld_dm_left.overlay @@ -0,0 +1,37 @@ +// wyld_dm_left.overlay + +#include "wyld_dm.dtsi" +#include + +/// PILLBUG PINS + +//&kscan0 { +// col-gpios +// = <&gpio0 22 GPIO_ACTIVE_HIGH> // 0.22 +// , <&gpio0 24 GPIO_ACTIVE_HIGH> // 0.24 +// , <&gpio1 0 GPIO_ACTIVE_HIGH> // 1.00 +// , <&gpio0 11 GPIO_ACTIVE_HIGH> // 0.11 +// , <&gpio1 4 GPIO_ACTIVE_HIGH> // 1.04 +//// , <&gpio1 6 GPIO_ACTIVE_HIGH> // 1.06 +//// , <&gpio1 04 GPIO_ACTIVE_HIGH> // PB13 / 1.04 +// ; +//}; + +&left_encoder { + status = "okay"; +}; + +&kscan0 { + col-gpios + = <&gpio0 31 GPIO_ACTIVE_HIGH> // 0.31 + , <&gpio0 29 GPIO_ACTIVE_HIGH> // 0.29 + , <&gpio0 2 GPIO_ACTIVE_HIGH> // 0.02 + , <&gpio1 15 GPIO_ACTIVE_HIGH> // 1.15 + , <&gpio1 13 GPIO_ACTIVE_HIGH> // 1.13 + , <&gpio1 11 (GPIO_ACTIVE_HIGH )> // 1.11 + ; +}; + + + + diff --git a/config/boards/shields/wyld_dm/wyld_dm_right.conf b/config/boards/shields/wyld_dm/wyld_dm_right.conf new file mode 100644 index 0000000..940d82b --- /dev/null +++ b/config/boards/shields/wyld_dm/wyld_dm_right.conf @@ -0,0 +1,21 @@ +# #enable mouse emulation +CONFIG_ZMK_MOUSE=y +CONFIG_SPI=y +CONFIG_INPUT=y + +CONFIG_PMW3610=y +CONFIG_PMW3610_CPI=2400 +CONFIG_PMW3610_CPI_DIVIDOR=4 +CONFIG_PMW3610_ORIENTATION_90=y +CONFIG_PMW3610_SNIPE_CPI=800 +CONFIG_PMW3610_SNIPE_CPI_DIVIDOR=4 +CONFIG_PMW3610_SCROLL_TICK=32 +CONFIG_PMW3610_INVERT_X=y +CONFIG_PMW3610_AUTOMOUSE_TIMEOUT_MS=750 + +CONFIG_PMW3610_POLLING_RATE_125_SW=y + +CONFIG_PMW3610_SMART_ALGORITHM=y + + + diff --git a/config/boards/shields/wyld_dm/wyld_dm_right.overlay b/config/boards/shields/wyld_dm/wyld_dm_right.overlay new file mode 100644 index 0000000..87fbdd5 --- /dev/null +++ b/config/boards/shields/wyld_dm/wyld_dm_right.overlay @@ -0,0 +1,95 @@ +// wyld_dm_right.overlay + +#include "wyld_dm.dtsi" +#include + +&default_transform { + col-offset = <6>; +}; + +&kscan0 { + col-gpios + = <&gpio0 31 GPIO_ACTIVE_HIGH> // 0.31 + , <&gpio0 29 GPIO_ACTIVE_HIGH> // 0.29 + , <&gpio0 2 GPIO_ACTIVE_HIGH> // 0.02 + , <&gpio1 15 GPIO_ACTIVE_HIGH> // 1.15 + , <&gpio1 13 GPIO_ACTIVE_HIGH> // 1.13 + , <&gpio1 11 (GPIO_ACTIVE_HIGH )> // 1.11 + ; +}; + +//&right_encoder { +// status = "okay"; +//}; + +&pinctrl { + spi0_default: spi0_default { + group1 { + psels = , + ; + }; + }; + spi0_sleep: spi0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; + spi1_default: spi1_default { + group1 { + psels = , + , + ; + }; + }; + spi1_sleep: sp10_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; +}; + +&spi1 { + compatible = "nordic,nrf-spim"; + status = "okay"; + + pinctrl-0 = <&spi1_default>; + pinctrl-1 = <&spi1_sleep>; + pinctrl-names = "default", "sleep"; + cs-gpios = <&gpio0 22 GPIO_ACTIVE_LOW>; + trackball: trackball@0 { + status = "okay"; + compatible = "pixart,pmw3610"; + reg = <0>; + spi-max-frequency = <2000000>; + irq-gpios = <&gpio0 24 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + snipe-layers = <1>; + scroll-layers = <2>; + automouse-layer = <3>; + }; +}; + +nice_view_spi: &spi0 { + compatible = "nordic,nrf-spim"; + pinctrl-0 = <&spi0_default>; + pinctrl-1 = <&spi0_sleep>; + pinctrl-names = "default", "sleep"; + cs-gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>; +}; + +/ { + pmw3610_listener { + compatible = "zmk,input-listener"; + device = <&trackball>; + }; +}; + +/ { + chosen { + zephyr,display = &nice_view; + }; +}; \ No newline at end of file diff --git a/config/info.json b/config/info.json new file mode 100644 index 0000000..2c55781 --- /dev/null +++ b/config/info.json @@ -0,0 +1,77 @@ +{ + "id": "wyld_dm_4x6", + "name": "wyld_dm_4x6", + "layouts": { + "LAYOUT": { + "autoGenerated": "true", + "description": "This layout was automatically generated by the Keymap Editor. It may require manual changes to display properly.", + "layout": [ + + { "row": 0, "col": 0, "x": 0, "y": 0.5, "label": "0,0" }, + { "row": 0, "col": 1, "x": 1, "y": 0.5, "label": "0,1" }, + { "row": 0, "col": 2, "x": 2, "y": 0, "label": "0,2" }, + { "row": 0, "col": 3, "x": 3, "y": 0, "label": "0,3" }, + { "row": 0, "col": 4, "x": 4, "y": 0, "label": "0,4" }, + { "row": 0, "col": 5, "x": 5, "y": 0, "label": "0,5" }, + { "row": 0, "col": 7, "x": 13, "y": 0, "label": "5,0" }, + { "row": 0, "col": 8, "x": 14, "y": 0, "label": "5,1" }, + { "row": 0, "col": 9, "x": 15, "y": 0, "label": "5,2" }, + { "row": 0, "col": 10, "x": 16, "y": 0, "label": "5,3" }, + { "row": 0, "col": 11, "x": 17, "y": 0.5, "label": "5,4" }, + { "row": 0, "col": 12, "x": 18, "y": 0.5, "label": "5,5" }, + + { "row": 1, "col": 0, "x": 0, "y": 1.5, "label": "1,0" }, + { "row": 1, "col": 1, "x": 1, "y": 1.5, "label": "1,1" }, + { "row": 1, "col": 2, "x": 2, "y": 1, "label": "1,2" }, + { "row": 1, "col": 3, "x": 3, "y": 1, "label": "1,3" }, + { "row": 1, "col": 4, "x": 4, "y": 1, "label": "1,4" }, + { "row": 1, "col": 5, "x": 5, "y": 1, "label": "1,5" }, + { "row": 1, "col": 7, "x": 13, "y": 1, "label": "6,0" }, + { "row": 1, "col": 8, "x": 14, "y": 1, "label": "6,1" }, + { "row": 1, "col": 9, "x": 15, "y": 1, "label": "6,2" }, + { "row": 1, "col": 10, "x": 16, "y": 1, "label": "6,3" }, + { "row": 1, "col": 11, "x": 17, "y": 1.5, "label": "6,4" }, + { "row": 1, "col": 12, "x": 18, "y": 1.5, "label": "6,5" }, + + { "row": 2, "col": 0, "x": 0, "y": 2.5, "label": "2,0" }, + { "row": 2, "col": 1, "x": 1, "y": 2.5, "label": "2,1" }, + { "row": 2, "col": 2, "x": 2, "y": 2, "label": "2,2" }, + { "row": 2, "col": 3, "x": 3, "y": 2, "label": "2,3" }, + { "row": 2, "col": 4, "x": 4, "y": 2, "label": "2,4" }, + { "row": 2, "col": 5, "x": 5, "y": 2, "label": "2,5" }, + { "row": 2, "col": 7, "x": 13, "y": 2, "label": "7,0" }, + { "row": 2, "col": 8, "x": 14, "y": 2, "label": "7,1" }, + { "row": 2, "col": 9, "x": 15, "y": 2, "label": "7,2" }, + { "row": 2, "col": 10, "x": 16, "y": 2, "label": "7,3" }, + { "row": 2, "col": 11, "x": 17, "y": 2.5, "label": "7,4" }, + { "row": 2, "col": 12, "x": 18, "y": 2.5, "label": "7,5" }, + + { "row": 3, "col": 2, "x": 2, "y": 3, "label": "3,2" }, + { "row": 3, "col": 3, "x": 3, "y": 3, "label": "3,3" }, + { "row": 3, "col": 4, "x": 4.25, "y": 3.5, "label": "3,4" }, + { "row": 3, "col": 5, "x": 5.25, "y": 3.5, "label": "3,5" }, + { "row": 3, "col": 10, "x": 15, "y": 3, "label": "8,2" }, + { "row": 3, "col": 11, "x": 16, "y": 3, "label": "8,3" }, + + { "row": 4, "col": 0, "x": 4.75, "y": 4.5, "label": "4,0" }, + { "row": 4, "col": 1, "x": 5.25, "y": 5.5, "label": "4,1" }, + { "row": 4, "col": 2, "x": 6.25, "y": 5.5, "label": "4,2" }, + { "row": 4, "col": 3, "x": 5.75, "y": 4.5, "label": "4,3" }, + { "row": 4, "col": 5, "x": 6.75 , "y": 2, "label": "4,5" }, + { "row": 4, "col": 6, "x": 11.5, "y": 3.5, "label": "9,0" }, + { "row": 4, "col": 7, "x": 11.5, "y": 4.5, "label": "9,1" }, + { "row": 4, "col": 8, "x": 10.5, "y": 5.5, "label": "9,2" }, + { "row": 4, "col": 9, "x": 11.5, "y": 5.5, "label": "9,3" } + ] + } + }, + "sensors": [ + { + "ref": "left_encoder", + "name": "encoder_left", + "identifier": "encoder_left", + "compatible": "alps,ec11", + "label": "LEFT_ENCODER" + } + ] +} diff --git a/config/lily58.conf b/config/lily58.conf deleted file mode 100644 index 31eb7c6..0000000 --- a/config/lily58.conf +++ /dev/null @@ -1,6 +0,0 @@ -# Uncomment to enable encoder -# CONFIG_EC11=y -# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y - -# Uncomment the following line to enable the Lily58 OLED Display -# CONFIG_ZMK_DISPLAY=y diff --git a/config/lily58.keymap b/config/lily58.keymap deleted file mode 100644 index e5e7ed4..0000000 --- a/config/lily58.keymap +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (c) 2020 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - -#include -#include -#include - -&mt { - flavor = "tap-preferred"; - tapping-term-ms = <150>; - quick-tap-ms = <0>; -}; - -/ { - behaviors { - tap_layer_2: tap_layer_2 { - compatible = "zmk,behavior-tap-dance"; - label = "TAP_LAYER_2"; - #binding-cells = <0>; - bindings = <&sl 2>, <&tog 2>; - }; - - tap_layer_1: tap_layer_1 { - compatible = "zmk,behavior-tap-dance"; - label = "TAP_LAYER_1"; - #binding-cells = <0>; - bindings = <&sl 1>, <&tog 1>; - }; - - tap_dance_tab: tap_dance_tab { - compatible = "zmk,behavior-tap-dance"; - label = "TAP_DANCE_TAB"; - #binding-cells = <0>; - bindings = <&kp TAB>, <&kp RA(TAB)>; - }; - - td_escape: td_escape { - compatible = "zmk,behavior-tap-dance"; - label = "TD_ESCAPE"; - #binding-cells = <0>; - bindings = <&kp GRAVE>, <&kp ESCAPE>; - }; - - td_z: td_z { - compatible = "zmk,behavior-tap-dance"; - label = "TD_Z"; - #binding-cells = <0>; - bindings = <&kp X>, <&kp Z>; - }; - - hm: hm { - compatible = "zmk,behavior-hold-tap"; - label = "HM"; - bindings = <&kp>, <&kp>; - - #binding-cells = <2>; - tapping-term-ms = <200>; - flavor = "balanced"; - quick-tap-ms = <0>; - }; - }; - - keymap { - compatible = "zmk,keymap"; - - default_layer { - // ------------------------------------------------------------------------------------------------------------ - // | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | - // | TAB | Q | W | E | R | T | | Y | U | I | O | P | - | - // | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' | - // | SHIFT | Z | X | C | V | B | "[" | | "]" | N | M | , | . | / | SHIFT | - // | ALT | GUI | LOWER| SPACE | | ENTER | RAISE| BSPC | GUI | - - bindings = < -&td_escape &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp DELETE -&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BACKSLASH -&kp CAPSLOCK &hm LCTRL A &hm LEFT_GUI S &hm LEFT_ALT D &hm LEFT_SHIFT F &kp G &kp H &hm RIGHT_SHIFT J &hm RIGHT_ALT K &hm RIGHT_GUI L &hm RIGHT_CONTROL SEMICOLON &kp SQT -&mo 3 &kp Z &td_z &kp C &kp V &kp B &kp LBKT &kp RBKT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp EQUAL - &trans &trans &tap_layer_1 &kp ENTER &kp SPACE &kp BACKSPACE &tap_layer_2 &tog 0 - >; - - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; - }; - - numbers { - // ------------------------------------------------------------------------------------------------------------ - // | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | | - // | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | - // | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | ~ | - // | | | | | | | | | | | _ | + | { | } | "|" | - // | | | | | | | | | | - - bindings = < -&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 -&trans &trans &trans &trans &trans &trans &kp STAR &kp N7 &kp N8 &kp N9 &kp MINUS &trans -&trans &trans &trans &trans &trans &trans &kp KP_DIVIDE &kp NUMBER_4 &kp N5 &kp N6 &kp PLUS &trans -&trans &trans &trans &trans &trans &trans &kp LEFT_PARENTHESIS &kp RIGHT_PARENTHESIS &kp CARET &kp NUMBER_1 &kp NUMBER_2 &kp NUMBER_3 &kp ENTER &trans - &trans &trans &tap_layer_1 &trans &kp N0 &kp PERIOD &trans &tog 0 - >; - - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; - }; - - nav_symbols { - // ------------------------------------------------------------------------------------------------------------ - // | | | | | | | | | | | | | | - // | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | - // | F1 | F2 | F3 | F4 | F5 | F6 | | | <- | v | ^ | -> | | - // | F7 | F8 | F9 | F10 | F11 | F12 | | | | + | - | = | [ | ] | \ | - // | | | | | | | | | | - - bindings = < -&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans -&trans &trans &trans &trans &trans &trans &trans &kp HOME &kp PAGE_UP &trans &trans &trans -&trans &trans &trans &trans &trans &trans &kp LEFT &kp DOWN &kp UP_ARROW &kp RIGHT &trans &trans -&trans &trans &trans &trans &trans &trans &trans &trans &trans &kp END &kp PAGE_DOWN &trans &trans &trans - &trans &trans &trans &trans &trans &trans &trans &tog 0 - >; - - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; - }; - - bt_layer { - bindings = < -&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR -&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans -&trans &trans &trans &trans &trans &trans &trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 -&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans - &trans &trans &trans &trans &trans &trans &trans &tog 0 - >; - }; - }; -}; diff --git a/config/west.yml b/config/west.yml index b886cbe..4ba395b 100644 --- a/config/west.yml +++ b/config/west.yml @@ -1,13 +1,28 @@ +#manifest: +# remotes: +# - name: zmkfirmware +# url-base: https://github.com/zmkfirmware +# projects: +# - name: zmk +# remote: zmkfirmware +# revision: main +# import: app/west.yml +# self: +# path: config + manifest: remotes: - name: zmkfirmware - url-base: https://github.com/zmkfirmware - # Additional modules containing boards/shields/custom code can be listed here as well - # See https://docs.zephyrproject.org/3.2.0/develop/west/manifest.html#projects + url-base: https://github.com/petejohanson + - name: inorichi + url-base: https://github.com/inorichi projects: - name: zmk remote: zmkfirmware - revision: main + revision: feat/pointers-move-scroll import: app/west.yml + - name: zmk-pmw3610-driver + remote: inorichi + revision: main self: - path: config + path: config \ No newline at end of file diff --git a/config/wyld_dm.conf b/config/wyld_dm.conf new file mode 100644 index 0000000..be293fb --- /dev/null +++ b/config/wyld_dm.conf @@ -0,0 +1,62 @@ +CONFIG_ZMK_KEYBOARD_NAME="wyld_4x6" +CONFIG_BT_CTLR_TX_PWR_PLUS_8=y +CONFIG_ZMK_EXT_POWER=y +# CONFIG_BT_LL_SW_LLCP_LEGACY=y + +CONFIG_BT_PERIPHERAL_PREF_MAX_INT=9 +CONFIG_BT_PERIPHERAL_PREF_LATENCY=16 +CONFIG_BT_BUF_ACL_TX_COUNT=32 +CONFIG_BT_L2CAP_TX_BUF_COUNT=32 + +CONFIG_ZMK_BLE=y +CONFIG_ZMK_USB=y + +CONFIG_ZMK_MOUSE=y +CONFIG_SPI=y +CONFIG_INPUT=y + +#enable deep sleep +CONFIG_ZMK_SLEEP=y +CONFIG_ZMK_IDLE_TIMEOUT=20000 +CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=180000 + +#wait time in macros +# CONFIG_ZMK_MACRO_DEFAULT_WAIT_MS=0 +# +# CONFIG_BT_PERIPHERAL_PREF_MAX_INT=9 +# CONFIG_BT_PERIPHERAL_PREF_LATENCY=16 +# CONFIG_BT_BUF_ACL_TX_COUNT=32 +# CONFIG_BT_L2CAP_TX_BUF_COUNT=32 + +# CONFIG_ZMK_USB_LOGGING=y +# +# CONFIG_ZMK_RGB_UNDERGLOW=y +# CONFIG_WS2812_STRIP=y +# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y +# CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=n +# +# CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y +# CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=0 + +# CONFIG_SSD1306_REVERSE_MODE=y + +CONFIG_ZMK_RGB_UNDERGLOW=y +CONFIG_WS2812_STRIP=y +CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y +CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=n + +CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y +CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=2 +# # +CONFIG_EC11=y +CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y + +#enable displays +# CONFIG_ZMK_DISPLAY=y +# CONFIG_I2C=y +# CONFIG_SSD1306=y +# CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y +# CONFIG_ZMK_WIDGET_LAYER_STATUS=y +# CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y +# CONFIG_ZMK_DISPLAY_WORK_QUEUE_SYSTEM=y +# CONFIG_ZMK_DISPLAY_INVERT=y \ No newline at end of file diff --git a/config/wyld_dm.keymap b/config/wyld_dm.keymap new file mode 100644 index 0000000..4c8631b --- /dev/null +++ b/config/wyld_dm.keymap @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// triggering build + +#define QWERTY 0 +#define LOWER 1 +#define RAISE 2 + +//# 4x6 with encoders +/ { + behaviors { + rgb_encoder_bright: rgb_encoder_bright { + compatible = "zmk,behavior-sensor-rotate"; + #sensor-binding-cells = <0>; + bindings = <&rgb_ug RGB_BRI>, <&rgb_ug RGB_BRD>; + }; + +// rgb_encoder_hue: rgb_encoder_hue { +// compatible = "zmk,behavior-sensor-rotate"; +// #sensor-binding-cells = <0>; +// bindings = <&rgb_ug RGB_HUI>, <&rgb_ug RGB_HUD>; +// }; + }; + + keymap { + compatible = "zmk,keymap"; + + default_layer { + display-name = "QWERTY"; + + bindings = < + &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT + &kp CAPS &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 RSHFT + &kp LBRC &kp RBRC &mo RAISE &kp SPACE &kp KP_PLUS &kp KP_MINUS + &kp DEL &mkp LCLK &mkp RCLK &kp TAB &kp K_MUTE &mo LOWER &kp ENTER &kp BSPC &kp RCTL + >; + + sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP>; + }; + + lower_layer { + display-name = "LOWER"; + + bindings = < + &trans &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp F11 + &kp GRAVE &kp EXCL &kp AT &kp HASH &kp DOLLAR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp F12 + &bootloader &ext_power EP_ON &ext_power EP_OFF &rgb_ug RGB_ON &rgb_ug RGB_OFF &trans &trans &kp MINUS &kp KP_PLUS &kp LBRC &kp RBRC &bootloader + &rgb_ug RGB_EFF &rgb_ug RGB_EFR &trans &trans &trans &trans + &trans &trans &trans &trans &rgb_ug RGB_TOG &trans &trans &trans &trans + >; + + sensor-bindings = <&rgb_encoder_bright>; + + }; + + raise_layer { + display-name = "RAISE"; + + bindings = < + &trans &trans &trans &trans &trans &kp LBKT &kp RBKT &trans &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_DIVIDE + &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp PGUP &kp LPAR &kp RPAR &trans &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_MULTIPLY + &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_MINUS + &kp PG_UP &kp PG_DN &trans &trans &kp KP_PLUS &kp KP_MINUS + &trans &trans &trans &trans &kp HOME &trans &trans &trans &trans + >; + + sensor-bindings = <&inc_dec_kp PG_UP PG_DN>; + }; + + mouse_layer { + display-name = "MOUSE"; + + bindings = < + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &mkp LCLK &mkp RCLK &trans &trans &mkp LCLK &mkp RCLK &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans + &trans &mkp LCLK &mkp RCLK &trans &trans &trans &trans &trans &trans + >; + + sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP>; + }; + }; +}; + +&led_strip { + chain-length = <62>; +}; + + diff --git a/layouts_json/wylderbuilds-4x6-standard-default-wyld-track-encoder.json b/layouts_json/wylderbuilds-4x6-standard-default-wyld-track-encoder.json new file mode 100644 index 0000000..4237d66 --- /dev/null +++ b/layouts_json/wylderbuilds-4x6-standard-default-wyld-track-encoder.json @@ -0,0 +1,166 @@ +[ + { + "name": "Wylderbuilds 4x6 Standard Default Wyld Track Encoder" + }, + [ + { + "x": 3 + }, + "0,2", + "0,3", + "0,4", + "0,5", + { + "x": 5.75 + }, + "5,0", + "5,1", + "5,2", + "5,3" + ], + [ + { + "y": -0.5, + "x": 1 + }, + "0,0", + "0,1", + { + "x": 13.75 + }, + "5,4", + "5,5" + ], + [ + { + "y": -0.5, + "x": 3 + }, + "1,2", + "1,3", + "1,4", + "1,5", + { + "x": 0.25 + }, + "0,0\n\n\n\n\n\n\n\n\ne", + "0,1\n\n\n\n\n\n\n\n\ne", + { + "x": 3.5 + }, + "6,0", + "6,1", + "6,2", + "6,3" + ], + [ + { + "y": -0.5, + "x": 1 + }, + "1,0", + "1,1", + { + "x": 13.75 + }, + "6,4", + "6,5" + ], + [ + { + "y": -0.5, + "x": 3 + }, + "2,2", + "2,3", + { + "n": true + }, + "2,4", + "2,5", + { + "x": 0.75 + }, + "4,5", + { + "x": 4 + }, + "7,0", + { + "n": true + }, + "7,1", + "7,2", + "7,3" + ], + [ + { + "y": -0.5, + "x": 1 + }, + "2,0", + "2,1", + { + "x": 13.75 + }, + "7,4", + "7,5" + ], + [ + { + "y": -0.5, + "x": 3 + }, + "3,2", + "3,3", + { + "x": 9.75 + }, + "8,2", + "8,3" + ], + [ + { + "y": -0.75, + "x": 13 + }, + "9,2" + ], + [ + { + "y": -0.75, + "x": 5.25 + }, + "3,4", + "3,5" + ], + [ + { + "y": -0.75, + "x": 12 + }, + "9,1" + ], + [ + { + "y": -0.5, + "x": 11 + }, + "9,0" + ], + [ + { + "y": -0.75, + "x": 5.5 + }, + "4,2", + "4,3" + ], + [ + { + "x": 6 + }, + "4,0", + "4,1" + ] +] \ No newline at end of file diff --git a/zephyr/module.yml b/zephyr/module.yml deleted file mode 100644 index 1cc2b35..0000000 --- a/zephyr/module.yml +++ /dev/null @@ -1,3 +0,0 @@ -build: - settings: - board_root: .