diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..9f152040 Binary files /dev/null and b/.DS_Store differ diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml deleted file mode 100644 index 437b79df..00000000 --- a/.github/workflows/doc.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: draw keymap - -on: - workflow_dispatch: # can be triggered manually - push: # automatically run on changes to following paths - paths: - - ".github/workflows/doc.yml" - - "keymap_img/keymap_drawer.config.yaml" - - "config/*.keymap" - - "config/*.dtsi" - - "boards/*/*/*.keymap" - - "boards/*/*/*.dtsi" - -jobs: - draw: - uses: caksoylar/keymap-drawer/.github/workflows/draw-zmk.yml@main - permissions: - contents: write # allow workflow to commit to the repo - with: - commit_message: "doc: update keymap image" # commit message for the changes - keymap_patterns: "boards/*/*/*.keymap" # path to the keymaps to parse - config_path: "keymap_img/keymap_drawer.config.yaml" # config file, ignored if it does not exist - output_folder: "keymap_img" # path to save produced SVG and keymap YAML files - parse_args: "temper:'-c 10'" # map of extra args to pass to `keymap parse`, e.g. "corne:'-l Def Lwr Rse' cradio:''" - draw_args: "temper:'-k chocofi -s default num nav fun'" # map of extra args to pass to `keymap draw`, e.g. "corne:'-k corne_rotated' cradio:'-k paroxysm'" \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index b4d63a89..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "files.associations": { - "*.keymap": "c" - } -} \ No newline at end of file diff --git a/README.md b/README.md index 8eb73d18..bed49d92 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,21 @@ # Temper ZMK Config -This is my personal ZMK config for the [temper](https://github.com/raeedcho/temper). +This is my personal ZMK config for the [temper](https://github.com/raeedcho/temper). This repository contains zmk configuration for the Temper keyboard using two microcontrollers and additionally on configuration using a dongle which is connected to your computer via cable. ## How to build locally Additional requirements: `yq`, `jq` +Change the paths in the environment variables in the `.build.sh`, then run it. + ```shell ./build.sh ``` -![Temper Keymap](keymap_img/temper.svg) +This will create a directory called `output` and in there are all the `.uf2` files + +## Extra notes on the dongle part + +1. Flash all three microcontrollers with the reset firmware which has been build. All three with the same `.uf2` firmware. More information about this step can be found in the official documentation of ZMK . +2. Flash all microcontrollers with their respective firmware +3. Turn off bluetooth, plug in the dongle and everything should be working out of the box. diff --git a/build.sh b/build.sh index c264f289..b4884057 100755 --- a/build.sh +++ b/build.sh @@ -1,25 +1,24 @@ ZMK_APP_PATH="$HOME/Projects/Private/zmk/app" -ZMK_CONFIG_PATH="$HOME/Projects/Private/temper-zmk-config/config" -ZMK_EXTRA_MODULES_PATH="$HOME/Projects/Private/temper-zmk-config" -OUTPUT_DIRECTORY="$HOME/Projects/Private/temper-zmk-config/outputs/" +ZMK_CONFIG_ROOT_PATH="$HOME/Projects/Private/temper-zmk-config" +OUTPUT_DIRECTORY="$ZMK_CONFIG_ROOT_PATH/outputs/" rm -rf "$OUTPUT_DIRECTORY" mkdir -p "$OUTPUT_DIRECTORY" -cd "$ZMK_APP_PATH" -source ../.venv/bin/activate +( + cd "$ZMK_APP_PATH" + source ../.venv/bin/activate -# format to json lines then read ech json object per loop iterationn -yq -o=json -I=0 '.include[]' "$ZMK_EXTRA_MODULES_PATH/build.yaml" | while read line; do - board=$(echo $line | jq -r '.board') - shield=$(echo $line | jq -r '.shield') + # format to json lines then read ech json object per loop iterationn + yq -o=json -I=0 '.include[]' "$ZMK_CONFIG_ROOT_PATH/build.yaml" | while read -r line; do + board=$(echo "$line" | jq -r '.board') + shield=$(echo "$line" | jq -r '.shield') - west build -d "build/$shield-$board" -b $board --pristine -- -DZMK_CONFIG="$ZMK_CONFIG_PATH" -DSHIELD=$shield # -DZMK_EXTRA_MODULES="$ZMK_EXTRA_MODULES_PATH" - cp "build/$shield-$board/zephyr/zmk.uf2" "$OUTPUT_DIRECTORY/$shield-$board.uf2" -done + west build -d "build/$shield-$board" -b "$board" --pristine -- -DZMK_CONFIG="$ZMK_CONFIG_ROOT_PATH/config" -DSHIELD="$shield" + cp "build/$shield-$board/zephyr/zmk.uf2" "$OUTPUT_DIRECTORY/$shield-$board.uf2" + done -deactivate + deactivate -rm -rf build - -cd - + rm -rf build +) diff --git a/build.yaml b/build.yaml index 427ef4f8..3154b931 100644 --- a/build.yaml +++ b/build.yaml @@ -17,3 +17,12 @@ include: shield: temper_left - board: nice_nano_v2 shield: temper_right + - board: nice_nano_v2 + shield: temper_dongle_left + - board: nice_nano_v2 + shield: temper_dongle_right + - board: nice_nano_v2 + shield: temper_dongle_dongle + - board: nice_nano_v2 + shield: settings_reset + diff --git a/config/boards/shields/temper-dongle/Kconfig.defconfig b/config/boards/shields/temper-dongle/Kconfig.defconfig new file mode 100644 index 00000000..d09e0e31 --- /dev/null +++ b/config/boards/shields/temper-dongle/Kconfig.defconfig @@ -0,0 +1,16 @@ +if SHIELD_TEMPER_DONGLE + +config ZMK_KEYBOARD_NAME + default "Temper Dongle" + +config ZMK_SPLIT_ROLE_CENTRAL + default y + +endif + +if SHIELD_TEMPER_LEFT || SHIELD_TEMPER_RIGHT || SHIELD_TEMPER_DONGLE + +config ZMK_SPLIT + default y + +endif diff --git a/config/boards/shields/temper-dongle/Kconfig.shield b/config/boards/shields/temper-dongle/Kconfig.shield new file mode 100644 index 00000000..fd2426f6 --- /dev/null +++ b/config/boards/shields/temper-dongle/Kconfig.shield @@ -0,0 +1,11 @@ +# Copyright (c) 2020 Pete Johanson +# SPDX-License-Identifier: MIT + +config SHIELD_TEMPER_LEFT + def_bool $(shields_list_contains,temper_dongle_left) + +config SHIELD_TEMPER_RIGHT + def_bool $(shields_list_contains,temper_dongle_right) + +config SHIELD_TEMPER_DONGLE + def_bool $(shields_list_contains,temper_dongle_dongle) diff --git a/config/boards/shields/temper-dongle/boards/nice_nano.overlay b/config/boards/shields/temper-dongle/boards/nice_nano.overlay new file mode 100644 index 00000000..810340f9 --- /dev/null +++ b/config/boards/shields/temper-dongle/boards/nice_nano.overlay @@ -0,0 +1,47 @@ +#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"; + label = "WS2812"; + + /* 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 = ; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; diff --git a/config/boards/shields/temper-dongle/boards/nice_nano_v2.overlay b/config/boards/shields/temper-dongle/boards/nice_nano_v2.overlay new file mode 100644 index 00000000..810340f9 --- /dev/null +++ b/config/boards/shields/temper-dongle/boards/nice_nano_v2.overlay @@ -0,0 +1,47 @@ +#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"; + label = "WS2812"; + + /* 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 = ; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; diff --git a/config/boards/shields/temper-dongle/temper.conf b/config/boards/shields/temper-dongle/temper.conf new file mode 100644 index 00000000..6b4a087e --- /dev/null +++ b/config/boards/shields/temper-dongle/temper.conf @@ -0,0 +1 @@ +CONFIG_BT_CTLR_TX_PWR_PLUS_8=y diff --git a/config/boards/shields/temper-dongle/temper.dtsi b/config/boards/shields/temper-dongle/temper.dtsi new file mode 100644 index 00000000..056a591b --- /dev/null +++ b/config/boards/shields/temper-dongle/temper.dtsi @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2020 Pete Johanson + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <10>; + rows = <4>; +// | SW1 | SW2 | SW3 | SW4 | SW5 | | SW5 | SW4 | SW3 | SW2 | SW1 | +// | SW6 | SW7 | SW8 | SW9 | SW10 | | SW10 | SW9 | SW8 | SW7 | SW6 | +// | SW11 | SW12 | SW13 | SW14 | SW15 | | SW15 | SW14 | SW13 | SW12 | SW11 | +// | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | + 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,4) RC(3,5) RC(3,6) RC(3,7) + >; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + + 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)? +}; diff --git a/config/boards/shields/temper-dongle/temper.keymap b/config/boards/shields/temper-dongle/temper.keymap new file mode 100644 index 00000000..aee0b995 --- /dev/null +++ b/config/boards/shields/temper-dongle/temper.keymap @@ -0,0 +1,148 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include + +#define DEFAULT 0 +#define QWERTY 1 +#define NUM 2 +#define NAV 3 +#define FUN 4 + +/ { + conditional_layers { + compatible = "zmk,conditional-layers"; + tri_layer { + if-layers = ; + then-layer = ; + }; + }; + behaviors { + bspc_del: backspace_delete { + compatible = "zmk,behavior-mod-morph"; + #binding-cells = <0>; + bindings = <&kp BACKSPACE>, <&kp DELETE>; + mods = <(MOD_LSFT|MOD_RSFT)>; + keep-mods = <(MOD_RSFT)>; + }; + super_bspc: super_backspace { + compatible = "zmk,behavior-mod-morph"; + #binding-cells = <0>; + bindings = <&kp BACKSPACE>, <&kp LA(BACKSPACE)>; + mods = <(MOD_LSFT|MOD_RSFT)>; + }; + smart_shft: smart_shift { + compatible = "zmk,behavior-mod-morph"; + #binding-cells = <0>; + bindings = <&kp LSHFT>, <&caps_word>; + mods = <(MOD_LSFT)>; + }; + comma_semi: comma_semi { + compatible = "zmk,behavior-mod-morph"; + #binding-cells = <0>; + bindings = <&kp COMMA>, <&kp SEMI>; + mods = <(MOD_LSFT)>; + }; + dot_colon: dot_colon { + compatible = "zmk,behavior-mod-morph"; + #binding-cells = <0>; + bindings = <&kp DOT>, <&kp COLON>; + mods = <(MOD_LSFT)>; + }; + qmrk_excl: qmrk_excl { + compatible = "zmk,behavior-mod-morph"; + #binding-cells = <0>; + bindings = <&kp QMARK>, <&kp EXCL>; + mods = <(MOD_LSFT)>; + }; + slh_morph: slh_morph { + compatible = "zmk,behavior-mod-morph"; + #binding-cells = <0>; + bindings = <&kp FSLH>, <&kp BSLH>; + mods = <(MOD_LSFT)>; + }; + amps_morph: amps_morph { + compatible = "zmk,behavior-mod-morph"; + #binding-cells = <0>; + bindings = <&kp AMPS>, <&kp PIPE>; + mods = <(MOD_LSFT)>; + }; + }; + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < +// ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ + &kp Q &kp W &kp F &kp P &kp B &kp J &kp L &kp U &kp Y &kp APOS +// ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ + &kp A &kp R &kp S &kp T &kp G &kp M &kp N &kp E &kp I &kp O +// ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ + &kp Z &kp X &kp C &kp D &kp V &kp K &kp H &comma_semi &dot_colon &qmrk_excl +// ╰─────────────┴─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┴─────────────╯ + &kp LGUI &mo NUM &smart_shft &kp SPACE &mo NAV &super_bspc +// ╰─────────────┴─────────────┴─────────────╯ ╰─────────────┴─────────────┴─────────────╯ + >; + }; + qwerty_layer { + 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 &kp DOT &kp FSLH +// ╰─────────────┴─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┴─────────────╯ + &trans &trans &trans &trans &trans &trans +// ╰─────────────┴─────────────┴─────────────╯ ╰─────────────┴─────────────┴─────────────╯ + >; + }; + num_layer { + bindings = < +// ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ + &kp TILDE &kp AT &kp LBRC &kp RBRC &kp PRCNT &kp STAR &kp N7 &kp N8 &kp N9 &kp MINUS +// ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ + &kp CARET &kp HASH &kp LPAR &kp RPAR &kp DLLR &kp UNDER &kp N4 &kp N5 &kp N6 &kp PLUS +// ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ + &s_morph &kp LT &kp LBKT &kp RBKT &kp GT &slh_morph &kp N1 &kp N2 &kp N3 &kp EQUAL +// ╰─────────────┴─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┴─────────────╯ + &trans &trans &trans &kp N0 &trans &trans +// ╰─────────────┴─────────────┴─────────────╯ ╰─────────────┴─────────────┴─────────────╯ + >; + }; + + nav_layer { + bindings = < +// ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ + &trans &trans &trans &trans &trans &trans &kp HOME &kp END &kp TAB &super_bspc +// ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ + &sk LSHFT &sk LCTRL &sk LALT &sk LGUI &kp TAB &kp LEFT &kp DOWN &kp UP &kp RIGHT &gresc +// ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ + &trans &kp DEL &trans &trans &trans &trans &kp RET &trans &trans &trans +// ╰─────────────┴─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┴─────────────╯ + &trans &trans &trans &trans &trans &trans +// ╰─────────────┴─────────────┴─────────────╯ ╰─────────────┴─────────────┴─────────────╯ + >; + }; + + fun_layer { + bindings = < +// ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ + &tog QWERTY &kp K_MUTE &kp C_VOL_DN &kp C_VOL_UP &out OUT_TOG &trans &kp F7 &kp F8 &kp F9 &kp F12 +// ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ + &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &kp F4 &kp F5 &kp F6 &kp F11 +// ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ + &bt BT_CLR &kp C_PREV &kp C_PP &kp C_NEXT &trans &trans &kp F1 &kp F2 &kp F3 &kp F10 +// ╰─────────────┴─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┴─────────────╯ + &trans &trans &trans &trans &trans &trans +// ╰─────────────┴─────────────┴─────────────╯ ╰─────────────┴─────────────┴─────────────╯ + >; + }; + }; +}; diff --git a/config/boards/shields/temper-dongle/temper.zmk.yml b/config/boards/shields/temper-dongle/temper.zmk.yml new file mode 100644 index 00000000..445e5a49 --- /dev/null +++ b/config/boards/shields/temper-dongle/temper.zmk.yml @@ -0,0 +1,12 @@ +file_format: "1" +id: temper +name: Chocofi Temper +type: shield +url: https://github.com/raeedcho/chocofi-temper +requires: [pro_micro] +features: + - keys +siblings: + - temper_dongle_left + - temper_dongle_right + - temper_dongle_dongle diff --git a/config/boards/shields/temper-dongle/temper_dongle_dongle.conf b/config/boards/shields/temper-dongle/temper_dongle_dongle.conf new file mode 100644 index 00000000..ad069dfd --- /dev/null +++ b/config/boards/shields/temper-dongle/temper_dongle_dongle.conf @@ -0,0 +1,6 @@ +CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS=2 + +CONFIG_ZMK_SLEEP=n +# CONFIG_PM_DEVICE=n +CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000 +CONFIG_ZMK_EXT_POWER=y diff --git a/config/boards/shields/temper-dongle/temper_dongle_dongle.overlay b/config/boards/shields/temper-dongle/temper_dongle_dongle.overlay new file mode 100644 index 00000000..eadf123a --- /dev/null +++ b/config/boards/shields/temper-dongle/temper_dongle_dongle.overlay @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2020 Pete Johanson + * + * SPDX-License-Identifier: MIT + */ + +#include "temper.dtsi" + +&kscan0 { + col-gpios + = <&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> + ; +}; diff --git a/keymap_img/*.yaml b/config/boards/shields/temper-dongle/temper_dongle_left.conf similarity index 100% rename from keymap_img/*.yaml rename to config/boards/shields/temper-dongle/temper_dongle_left.conf diff --git a/config/boards/shields/temper-dongle/temper_dongle_left.overlay b/config/boards/shields/temper-dongle/temper_dongle_left.overlay new file mode 100644 index 00000000..38e8eeb0 --- /dev/null +++ b/config/boards/shields/temper-dongle/temper_dongle_left.overlay @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2020 Pete Johanson + * + * SPDX-License-Identifier: MIT + */ + +#include "temper.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> + ; +}; diff --git a/config/boards/shields/temper-dongle/temper_dongle_right.conf b/config/boards/shields/temper-dongle/temper_dongle_right.conf new file mode 100644 index 00000000..e69de29b diff --git a/config/boards/shields/temper-dongle/temper_dongle_right.overlay b/config/boards/shields/temper-dongle/temper_dongle_right.overlay new file mode 100644 index 00000000..0d292c62 --- /dev/null +++ b/config/boards/shields/temper-dongle/temper_dongle_right.overlay @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2020 Pete Johanson + * + * SPDX-License-Identifier: MIT + */ + +#include "temper.dtsi" + +&default_transform { + col-offset = <5>; +}; + +&kscan0 { + col-gpios + = <&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> + ; +}; diff --git a/config/boards/shields/temper/temper.dtsi b/config/boards/shields/temper/temper.dtsi index 7405c422..056a591b 100644 --- a/config/boards/shields/temper/temper.dtsi +++ b/config/boards/shields/temper/temper.dtsi @@ -8,7 +8,6 @@ / { chosen { - zephyr,display = &oled; zmk,kscan = &kscan0; zmk,matrix_transform = &default_transform; }; @@ -45,23 +44,3 @@ 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) // TODO: per-key RGB node(s)? }; - -&pro_micro_i2c { - status = "okay"; - - oled: ssd1306@3c { - compatible = "solomon,ssd1306fb"; - reg = <0x3c>; - label = "DISPLAY"; - width = <128>; - height = <32>; - segment-offset = <0>; - page-offset = <0>; - display-offset = <0>; - multiplex-ratio = <31>; - segment-remap; - com-invdir; - com-sequential; - prechargep = <0x22>; - }; -}; diff --git a/config/boards/shields/temper/temper.zmk.yml b/config/boards/shields/temper/temper.zmk.yml index eab579dd..445e5a49 100644 --- a/config/boards/shields/temper/temper.zmk.yml +++ b/config/boards/shields/temper/temper.zmk.yml @@ -4,11 +4,9 @@ name: Chocofi Temper type: shield url: https://github.com/raeedcho/chocofi-temper requires: [pro_micro] -exposes: [i2c_oled] features: - keys - - display - - underglow siblings: - - temper_left - - temper_right + - temper_dongle_left + - temper_dongle_right + - temper_dongle_dongle diff --git a/keymap_img/keymap_drawer.config.yaml b/keymap_img/keymap_drawer.config.yaml deleted file mode 100644 index b518e248..00000000 --- a/keymap_img/keymap_drawer.config.yaml +++ /dev/null @@ -1,317 +0,0 @@ -draw_config: - append_colon_to_layer_header: true - arc_radius: 6.0 - arc_scale: 1.0 - combo_h: 26.0 - combo_w: 28.0 - inner_pad_h: 2.0 - inner_pad_w: 2.0 - key_h: 56.0 - key_rx: 6.0 - key_ry: 6.0 - key_w: 60.0 - line_spacing: 1.2 - outer_pad_h: 56.0 - outer_pad_w: 30.0 - small_pad: 2.0 - split_gap: 30.0 - svg_style: | - /* font and background color specifications */ - svg { - font-family: SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace; - font-size: 14px; - font-kerning: normal; - text-rendering: optimizeLegibility; - fill: #24292e; - } - - /* default key styling */ - rect { - fill: #f6f8fa; - stroke: #c9cccf; - stroke-width: 1; - } - - /* color accent for combo boxes */ - rect.combo { - fill: #cdf; - } - - /* color accent for held keys */ - rect.held, rect.combo.held { - fill: #fdd; - } - - /* color accent for ghost (optional) keys */ - rect.ghost, rect.combo.ghost { - fill: #ddd; - } - - text { - text-anchor: middle; - dominant-baseline: middle; - } - - /* styling for layer labels */ - text.label { - font-weight: bold; - text-anchor: start; - stroke: white; - stroke-width: 2; - paint-order: stroke; - } - - /* styling for combo tap, and key hold/shifted label text */ - text.combo, text.hold, text.shifted { - font-size: 11px; - } - - text.hold { - text-anchor: middle; - dominant-baseline: auto; - } - - text.shifted { - text-anchor: middle; - dominant-baseline: hanging; - } - - /* styling for hold/shifted label text in combo box */ - text.combo.hold, text.combo.shifted { - font-size: 8px; - } - - /* styling for combo dendrons */ - path { - stroke-width: 1; - stroke: gray; - fill: none; - } -parse_config: - assign_combos_to_layers: false - preprocess: true - qmk_keycode_map: - AMPERSAND: '&' - AMPR: '&' - ASTERISK: '*' - ASTR: '*' - AT: '@' - BACKSLASH: \ - BSLS: \ - CIRC: ^ - CIRCUMFLEX: ^ - COLN: ':' - COLON: ':' - COMM: ',' - COMMA: ',' - DLR: $ - DOLLAR: $ - DOT: . - DOUBLE_QUOTE: '"' - DQT: '"' - DQUO: '"' - EQL: '=' - EQUAL: '=' - EXCLAIM: '!' - EXLM: '!' - GRAVE: '`' - GRV: '`' - GT: '>' - HASH: '#' - LABK: < - LBRC: '[' - LCBR: '{' - LEFT_ANGLE_BRACKET: < - LEFT_BRACKET: '[' - LEFT_CURLY_BRACE: '{' - LEFT_PAREN: ( - LPRN: ( - LT: < - MINS: '-' - MINUS: '-' - 'NO': '' - NONUS_HASH: '#' - NUHS: '#' - PERC: '%' - PERCENT: '%' - PIPE: '|' - PLUS: + - QUES: '?' - QUESTION: '?' - QUOT: '''' - QUOTE: '''' - RABK: '>' - RBRC: ']' - RCBR: '}' - RIGHT_ANGLE_BRACKET: '>' - RIGHT_BRACKET: ']' - RIGHT_CURLY_BRACE: '}' - RIGHT_PAREN: ) - RPRN: ) - SCLN: ; - SEMICOLON: ; - SLASH: / - SLSH: / - TILD: '~' - TILDE: '~' - TRANSPARENT: '' - TRNS: '' - UNDERSCORE: _ - UNDS: _ - SPACE: ⎵ - raw_binding_map: - '&mm_grescm': {t: '⎋', s: '` ~'} - '&mm_bspc_del': {t: '⌫', s: '⌦'} - '&bspc_del': {t: '⌫', s: '⌦'} - '&mm_grescm_gui': {t: ⎋, h: ⌘, s: '~ `'} - '&mm_spc_unds_layer': {t: '⎵', h: 'SYM', s: '_ -'} - '&mm_plus_minus': {t: '+', s: '-'} - '&mm_grave_caret': {t: '`', s: '^'} - '&mm_bracket_r': {t: '(', s: ')'} - '&mm_comma_semi_meh': {t: ',', s: ';', h: 'MEH'} - '&mm_dot_colon': {t: '.', s: ':'} - '&mm_none_undo': '' - '&mm_left_word_cut': '↞' - '&mm_up_save': '↑' - '&mm_down_copy': '↓' - '&mm_none_paste': '' - '&mm_1_cut': '1' - '&mm_2_copy': '2' - '&mm_5_save': '5' - '&swapper_cmd_tab': {t: '⌘↹'} - '&td_at_email': {t: '@'} - '&num_word': 'NUM' - '&nav_word': 'NAV' - '&caps_word_capslock': "Caps\nWord" - '&caps_word': '⇪' - '&td_shift_l': '⇧' - '&td_shift_r': '⇧' - '&td_nav_layer': {t: '⏎', h: 'NAV'} - '&td_bt_clear': 'BT CLR' - '&m_type_md_code_block': '```' - '&kt LSHFT': "⇧\nLock" - '<_num_word 4 0': {t: "Num\nWord", h: 'Num'} - '<og LGUI 5': {t: "Cancel\nNav", h: '⌘'} - '<og LGUI 6': {t: "Cancel\nNum", h: '⌘'} - '<og LGUI 7': {t: "Cancel\nSym", h: '⌘'} - '<og LGUI 8': {t: "Cancel\nFunc", h: '⌘'} - '<og LGUI 9': {t: "Cancel\nAdjust", h: '⌘'} - skip_binding_parsing: false - zmk_keycode_map: - AMPERSAND: '&' - AMPS: '&' - APOS: {t: "'", s: '"'} - APOSTROPHE: < - ASTERISK: '*' - ASTRK: '*' - AT: '@' - AT_SIGN: '@' - BACKSLASH: {t: '\', s: '|'} - BSLH: \ - CARET: ^ - COLON: ':' - COMMA: {t: ',', s: '<'} - DLLR: $ - DOLLAR: $ - DOT: {t: '.', s: '>'} - DOUBLE_QUOTES: '"' - DQT: '"' - EQUAL: {t: '=', s: '+'} - EXCL: '!' - EXCLAMATION: '!' - FSLH: / - GRAVE: {t: '`', s: '~'} - GREATER_THAN: '>' - GT: '>' - HASH: '#' - LBKT: {t: '[', s: '{'} - LBRC: '{' - LEFT_BRACE: '{' - LEFT_BRACKET: '[' - LEFT_PARENTHESIS: ( - LESS_THAN: < - LPAR: ( - LT: < - MINUS: {t: '-', s: '_'} - NON_US_BACKSLASH: \ - NON_US_BSLH: '|' - NON_US_HASH: '#' - NUHS: '#' - PERCENT: '%' - PERIOD: . - PIPE: '|' - PIPE2: '|' - PLUS: + - POUND: '#' - PRCNT: '%' - QMARK: '?' - QUESTION: '?' - RBKT: {t: ']', s: '}'} - RBRC: '}' - RIGHT_BRACE: '}' - RIGHT_BRACKET: ']' - RIGHT_PARENTHESIS: ) - RPAR: ) - SEMI: {t: ';', s: ':'} - SEMICOLON: {t: ';', s: ':'} - SINGLE_QUOTE: {t: '''', s: '"'} - SLASH: {t: '/', s: '?'} - SQT: '''' - STAR: '*' - TILDE: '~' - TILDE2: '~' - UNDER: _ - UNDERSCORE: _ - LCTRL: ⌃ - LALT: ⎇ - LGUI: ⌘ - LSHFT: ⇧ - RCTRL: ⌃ - LEFT_CONTROL: ⌃ - LEFT_ALT: ⎇ - LEFT_GUI: ⌘ - LEFT_SHFT: ⇧ - RALT: ⎇ - RGUI: ⌘ - RSHFT: ⇧ - RIGHT_CONTROL: ⌃ - RIGHT_ALT: ⎇ - RIGHT_GUI: ⌘ - RIGHT_SHFT: ⇧ - LEFT: ← - RIGHT: → - UP: ↑ - DOWN: ↓ - TAB: ↹ - RETURN: '⏎' - ESCAPE: '⎋' - C_REWIND: '⏮' - C_FAST_FORWARD: '⏭' - C_PAUSE: '⏯' - C_MUTE: "VOL\nMUTE" - C_VOLUME_DOWN: "VOL\nDOWN" - C_VOLUME_UP: "VOL\nUP" - C_BRIGHTNESS_DEC: '☀↓' - C_BRIGHTNESS_INC: '☀↑' - LA(LEFT): ↞ - LA(RIGHT): ↠ - LG(LEFT): ⇤ - LG(RIGHT): ⇥ - 'LS(LC(LG(LALT)))': 'HYPER' - 'RS(RC(RG(RALT)))': 'HYPER' - 'LC(LG(LALT))': 'MEH' - 'RC(RG(RALT))': 'MEH' - 'LG(Q)': '⌘Q' - 'LG(W)': '⌘W' - 'LG(GRAVE)': '⌘`' - 'LG(Z)': '⌘Z' - 'LG(X)': '⌘X' - 'LG(C)': '⌘C' - 'LG(V)': '⌘V' - 'LC(TAB)': '⌃↹' - 'LS(LC(TAB))': '⌃⇧↹' -# zmk_combos: -# combo_tog_nav_word: {'a': 'bottom', 'o': -0.25} -# combo_tog_num_word: {'a': 'bottom', 'o': 0.0} -# combo_return: {'a': 'bottom', 'o': 0.3} -# combo_capsword: {'k': "Caps\nWord"} diff --git a/keymap_img/temper.svg b/keymap_img/temper.svg deleted file mode 100644 index 591ac8de..00000000 --- a/keymap_img/temper.svg +++ /dev/null @@ -1,698 +0,0 @@ - - - -default: - - - -Q - - - -W - - - -F - - - -P - - - -B - - - -J - - - -L - - - -U - - - -Y - - - -' -" - - - -A - - - -R - - - -S - - - -T - - - -G - - - -M - - - -N - - - -E - - - -I - - - -O - - - -Z - - - -X - - - -C - - - -D - - - -V - - - -K - - - -H - - - -, -; - - - -. -: - - - -? -! - - - - - - - -num - - - - - - - - -SPACE - - - -nav - - - -BACKSPACE -Alt+ BACKS… - - - - -num: - - - -~ - - - -@ - - - -{ - - - -} - - - -% - - - -* - - - -7 - - - -8 - - - -9 - - - -- -_ - - - -^ - - - -# - - - -( - - - -) - - - -$ - - - -_ - - - -4 - - - -5 - - - -6 - - - -+ - - - -& -| - - - -< - - - -[ -{ - - - -] -} - - - -> - - - -/ -\ - - - -1 - - - -2 - - - -3 - - - -= -+ - - - - - - - - - - - - - - -0 - - - - - - - - - - - - -nav: - - - - - - - - - - - - - - - - - - - - - - - - - - - -HOME - - - -END - - - - - - - -BACKSPACE -Alt+ BACKS… - - - - -sticky - - - - -sticky - - - - -sticky - - - - -sticky - - - - - - - - - - - - - - - - - - - - - - - -ESC -` - - - - - - - -DEL - - - - - - - - - - - - - - - - - - - -RET - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -fun: - - - -qwerty -toggle - - - -MUTE - - - - -VOLDN - - - - - -VOLUP - - - - - -OUTTOG - - - - - - - - -F7 - - - -F8 - - - -F9 - - - -F12 - - - -BT -0 - - - -BT -1 - - - -BT -2 - - - -BT -3 - - - -BT -4 - - - - - - - -F4 - - - -F5 - - - -F6 - - - -F11 - - - - -BTCLR - - - - -PREV - - - -PP - - - -NEXT - - - - - - - - - - - -F1 - - - -F2 - - - -F3 - - - -F10 - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/keymap_img/temper.yaml b/keymap_img/temper.yaml deleted file mode 100644 index 6df0156e..00000000 --- a/keymap_img/temper.yaml +++ /dev/null @@ -1,159 +0,0 @@ -layers: - default: - - - Q - - W - - F - - P - - B - - J - - L - - U - - Y - - {t: '''', s: '"'} - - [A, R, S, T, G, M, N, E, I, O] - - - Z - - X - - C - - D - - V - - K - - H - - {t: ',', s: ;} - - {t: ., s: ':'} - - {t: '?', s: '!'} - - - ⌘ - - num - - {t: ⇧, s: ⇪} - - SPACE - - nav - - {t: BACKSPACE, s: Alt+ BACKSPACE} - qwerty: - - [Q, W, E, R, T, Y, U, I, O, P] - - - A - - S - - D - - F - - G - - H - - J - - K - - L - - {t: ;, s: ':'} - - - Z - - X - - C - - V - - B - - N - - M - - {t: ',', s: <} - - {t: ., s: '>'} - - / - - - {t: ▽, type: trans} - - {t: ▽, type: trans} - - {t: ▽, type: trans} - - {t: ▽, type: trans} - - {t: ▽, type: trans} - - {t: ▽, type: trans} - num: - - - '~' - - '@' - - '{' - - '}' - - '%' - - '*' - - '7' - - '8' - - '9' - - {t: '-', s: _} - - [^, '#', (, ), $, _, '4', '5', '6', +] - - - {t: '&', s: '|'} - - < - - {t: '[', s: '{'} - - {t: ']', s: '}'} - - '>' - - {t: /, s: \} - - '1' - - '2' - - '3' - - {t: '=', s: +} - - - {t: ▽, type: trans} - - {type: held} - - {t: ▽, type: trans} - - '0' - - {t: ▽, type: trans} - - {t: ▽, type: trans} - nav: - - - {t: ▽, type: trans} - - {t: ▽, type: trans} - - {t: ▽, type: trans} - - {t: ▽, type: trans} - - {t: ▽, type: trans} - - {t: ▽, type: trans} - - HOME - - END - - ↹ - - {t: BACKSPACE, s: Alt+ BACKSPACE} - - - {t: ⇧, h: sticky} - - {t: ⌃, h: sticky} - - {t: ⎇, h: sticky} - - {t: ⌘, h: sticky} - - ↹ - - ← - - ↓ - - ↑ - - → - - {t: ESC, s: '`'} - - - {t: ▽, type: trans} - - DEL - - {t: ▽, type: trans} - - {t: ▽, type: trans} - - {t: ▽, type: trans} - - {t: ▽, type: trans} - - RET - - {t: ▽, type: trans} - - {t: ▽, type: trans} - - {t: ▽, type: trans} - - - {t: ▽, type: trans} - - {t: ▽, type: trans} - - {t: ▽, type: trans} - - {t: ▽, type: trans} - - {type: held} - - {t: ▽, type: trans} - fun: - - - {t: qwerty, h: toggle} - - MUTE - - VOL DN - - VOL UP - - OUT TOG - - {t: ▽, type: trans} - - F7 - - F8 - - F9 - - F12 - - - {t: BT, h: '0'} - - {t: BT, h: '1'} - - {t: BT, h: '2'} - - {t: BT, h: '3'} - - {t: BT, h: '4'} - - {t: ▽, type: trans} - - F4 - - F5 - - F6 - - F11 - - - BT CLR - - PREV - - PP - - NEXT - - {t: ▽, type: trans} - - {t: ▽, type: trans} - - F1 - - F2 - - F3 - - F10 - - - {t: ▽, type: trans} - - {type: held} - - {t: ▽, type: trans} - - {t: ▽, type: trans} - - {type: held} - - {t: ▽, type: trans}