Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/dongle #22

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@ include:
shield: totem_left
- board: seeeduino_xiao_ble
shield: totem_right
- board: seeeduino_xiao_ble
shield: totem_dongle
snippet: zmk-usb-logging
# there is no settingsreset (needed) for the XIAO
# - board: seeeduino_xiao_ble
# shield: settings_reset
12 changes: 9 additions & 3 deletions config/boards/shields/totem/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT

if SHIELD_TOTEM_LEFT
if SHIELD_TOTEM_DONGLE

config ZMK_KEYBOARD_NAME
default "TOTEM"

config ZMK_SPLIT_ROLE_CENTRAL
default y

config ZMK_USB
default y

endif

if SHIELD_TOTEM_LEFT || SHIELD_TOTEM_RIGHT
if SHIELD_TOTEM_LEFT || SHIELD_TOTEM_RIGHT || SHIELD_TOTEM_DONGLE

config ZMK_SPLIT
default y

endif
config ZMK_BLE
default y

endif
3 changes: 3 additions & 0 deletions config/boards/shields/totem/Kconfig.shield
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ config SHIELD_TOTEM_LEFT

config SHIELD_TOTEM_RIGHT
def_bool $(shields_list_contains,totem_right)

config SHIELD_TOTEM_DONGLE
def_bool $(shields_list_contains,totem_dongle)
83 changes: 69 additions & 14 deletions config/boards/shields/totem/totem.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@
// ▀ ▀ ▀
//
// ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄


#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/outputs.h>

#define BASE 0
#define NAV 1
#define SYM 2
#define ADJ 3
#define TVP1 4
#define TVP2 5

&mt {
quick-tap-ms = <100>;
Expand All @@ -29,13 +27,18 @@
};

/ {
combos {
combos {
compatible = "zmk,combos";
combo_esc {
timeout-ms = <50>;
key-positions = <0 1>;
bindings = <&kp ESC>;
};
combo_tvp {
timeout-ms = <100>;
key-positions = <11 12 13>;
bindings = <&tog TVP1>;
};
};

macros {
Expand All @@ -61,21 +64,21 @@
label= "BASE" ;
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
// ┏━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┓ ┏━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┓
// ┃ Q ┃ W ┃ FPG ┃ ┃ JLUY;
// ┃ Q ┃ W ┃ ERT ┃ ┃ YUIOP
// ┣━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━┫ ┣━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━┫
// ┃ A ┃ RSTD ┃ ┃ H ┃ NEIO
// ┃ A ┃ SDFG ┃ ┃ H ┃ JKL;
// ┏━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━┫ ┣━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━┓
// ┃ ┃ Z ┃ X ┃ C ┃ V ┃ B ┃ ┃ K ┃ M ┃ , ┃ . ┃ / ┃
// ┃ Q ┃ Z ┃ X ┃ C ┃ V ┃ B ┃ ┃ N ┃ M ┃ , ┃ . ┃ / ┃ \
// ┗━━━━━━━━━━━┻━━━━━━━━━━━┻━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━┫ ┣━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━┻━━━━━━━━━━━┻━━━━━━━━━━━┛
// ┃ ┃ TAB ┃ SPC ┃ ┃ ENTER ┃ BSPC
// ┃ DEL ┃ TAB ┃ SPC ┃ ┃ ENTER ┃ ESC BSPC
// ┗━━━━━━━━━━━┻━━━━━━━━━━━┻━━━━━━━━━━━┛ ┗━━━━━━━━━━━┻━━━━━━━━━━━┻━━━━━━━━━━━┛
bindings = <
// ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷

&kp Q &kp W &kp F &kp P &kp G &kp J &kp L &kp U &kp Y &kp SEMI
&mt LGUI A &mt LALT R &mt LCTRL S &mt LSHFT T &kp D &kp H &mt RSHFT N &mt RCTRL E &mt RALT I &mt RGUI O
&kp Z &kp Z &kp X &kp C &kp V &kp B &kp K &kp M &kp COMMA &kp DOT &kp FSLH &kp FSLH
&kp TAB &kp TAB &lt NAV SPACE &lt SYM RET &kp BSPC &kp BSPC
&kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P
&mt LGUI A &mt LALT S &mt LCTRL D &mt LSHFT F &kp G &kp H &mt RSHFT J &mt RCTRL K &mt RALT L &mt RGUI SEMI
&kp Q &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp BSLH
&kp DEL &lt NAV TAB &kp SPACE &kp RET &lt SYM ESC &kp BSPC
>;
};

Expand Down Expand Up @@ -156,5 +159,57 @@ label= "ADJ" ;
&trans &trans &trans &trans &trans &trans
>;
};

// ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄


tvp1_layer {
// ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
label= "TVP 1" ;
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
// ┏━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┓ ┏━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┓
// ┃ NEXT FILE ┃ MARK IN ┃ ROTATE ┃ MARK OUT ┃ SHOW SNAP ┃ ┃ ┃ ┃ ┃ ┃ ┃
// ┣━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━┫ ┣━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━┫
// ┃ TVP II ┃ LEFT ┃ PAN ┃ RIGHT ┃ PLAY/FLIP ┃ ┃ ┃ ┃ ┃ ┃ ┃
// ┏━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━┫ ┣━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━┓
// ┃ FULLSCR ┃ SHIFT ┃ COPY ┃ DELETE ┃ PASTE ┃ IMG MARK ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃
// ┗━━━━━━━━━━━┻━━━━━━━━━━━┻━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━┫ ┣━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━┻━━━━━━━━━━━┻━━━━━━━━━━━┛
// ┃ ┃ UNDO/SAVE ┃ SEL/MOV ┃ ┃ ┃ ┃ ┃
// ┗━━━━━━━━━━━┻━━━━━━━━━━━┻━━━━━━━━━━━┛ ┗━━━━━━━━━━━┻━━━━━━━━━━━┻━━━━━━━━━━━┛
bindings = <
// ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷

&kp TAB &kp I &kp LC(LALT) &kp O &kp LC(F20) &none &none &none &none &none
&lt TVP2 L &kp LEFT &kp LALT &kp RIGHT &kp SPACE &none &none &none &none &none
&kp J &kp LSHFT &kp LC(C) &kp BSPC &kp LC(V) &kp LC(F19) &none &none &none &none &none &none
&trans &kp LC(F14) &kp LC(F13) &none &none &none
>;
};

// ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄


tvp2_layer {
// ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
label= "TVP 2" ;
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
// ┏━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┓ ┏━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┓
// ┃ SOLO ┃ TOGGLE IN ┃ RESET ROT ┃ TOGGLE OUT┃ TAKE SNAP ┃ ┃ ┃ ┃ ┃ ┃ ┃
// ┣━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━┫ ┣━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━┫
// ┃ --- ┃ LAST KEY ┃ NEW KEY ┃ NEXT KEY ┃ ENTER ┃ ┃ ┃ ┃ ┃ ┃ ┃
// ┏━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━┫ ┣━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━┓
// ┃ ┃ FULLSCR ┃ CPY2BRUSH ┃ DEL HEAD ┃ PSTinPLACE┃ BOOK MARK ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃
// ┗━━━━━━━━━━━┻━━━━━━━━━━━┻━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━┫ ┣━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━╋━━━━━━━━━━━┻━━━━━━━━━━━┻━━━━━━━━━━━┛
// ┃ ┃ REDO/SAV1 ┃TRANS/WARP ┃ ┃ ┃ ┃ ┃
// ┗━━━━━━━━━━━┻━━━━━━━━━━━┻━━━━━━━━━━━┛ ┗━━━━━━━━━━━┻━━━━━━━━━━━┻━━━━━━━━━━━┛
bindings = <
// ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷

&kp LC(F18) &kp LS(I) &kp LS(HOME) &kp LS(O) &kp LS(F) &trans &kp F7 &kp F8 &kp F9 &kp F12
&trans &kp LS(LEFT) &kp LC(F17) &kp LS(RIGHT) &kp RET &trans &kp F4 &kp F5 &kp F6 &kp F11
&trans &kp J &kp LS(C) &kp LC(F16) &kp LS(V) &kp LC(F15) &trans &kp F1 &kp F2 &kp F3 &kp F10 &trans
&trans &kp LC(F12) &kp LC(F11) &trans &trans &trans
>;
};
};
};
};
1 change: 1 addition & 0 deletions config/boards/shields/totem/totem.zmk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ features:
siblings:
- totem_left
- totem_right
- totem_dongle
13 changes: 13 additions & 0 deletions config/boards/shields/totem/totem_dongle.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
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

CONFIG_ZMK_USB_LOGGING=y
CONFIG_LOG_MODE_IMMEDIATE=n
CONFIG_LOG_TIMESTAMP_64BIT=y
CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=2000
CONFIG_ZMK_LOG_LEVEL_DBG=y
CONFIG_KSCAN_LOG_LEVEL_INF=y
17 changes: 17 additions & 0 deletions config/boards/shields/totem/totem_dongle.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright (c) 2022 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

#include "totem.dtsi"

&kscan0 {
col-gpios
= <&xiao_d 8 GPIO_ACTIVE_HIGH>
, <&xiao_d 9 GPIO_ACTIVE_HIGH>
, <&xiao_d 10 GPIO_ACTIVE_HIGH>
, <&xiao_d 5 GPIO_ACTIVE_HIGH>
, <&xiao_d 4 GPIO_ACTIVE_HIGH>
;
};
53 changes: 53 additions & 0 deletions config/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"id": "totem",
"name": "totem",
"url": "https://github.com/GEIGEIGEIST/TOTEM",
"layouts": {
"LAYOUT": {
"layout": [
{ "row": 0, "col": 1, "x": 0.776, "y": 1.519, "w": 1.059, "r": -10, "rx": 1.305, "ry": 2.019 },
{ "row": 0, "col": 2, "x": 1.964, "y": 0.605, "w": 1.059, "r": -4, "rx": 2.494, "ry": 1.105 },
{ "row": 0, "col": 3, "x": 3.175, "y": 0, "w": 1.059 },
{ "row": 0, "col": 4, "x": 4.234, "y": 0.496, "w": 1.059 },
{ "row": 0, "col": 5, "x": 5.292, "y": 0.656, "w": 1.059 },
{ "row": 0, "col": 7, "x": 8.682, "y": 0.656, "w": 1.059 },
{ "row": 0, "col": 8, "x": 9.741, "y": 0.496, "w": 1.059 },
{ "row": 0, "col": 9, "x": 10.8, "y": 0, "w": 1.059 },
{ "row": 0, "col": 10, "x": 12.007, "y": 0.606, "w": 1.059, "r": 4, "rx": 12.537, "ry": 1.106 },
{ "row": 0, "col": 11, "x": 13.199, "y": 1.52, "w": 1.059, "r": 10, "rx": 13.729, "ry": 2.02 },

{ "row": 1, "col": 1, "x": 0.95, "y": 2.504, "w": 1.059, "r": -10, "rx": 1.479, "ry": 3.004 },
{ "row": 1, "col": 2, "x": 2.033, "y": 1.602, "w": 1.059, "r": -4, "rx": 2.562, "ry": 2.102 },
{ "row": 1, "col": 3, "x": 3.175, "y": 1, "w": 1.059 },
{ "row": 1, "col": 4, "x": 4.234, "y": 1.496, "w": 1.059 },
{ "row": 1, "col": 5, "x": 5.292, "y": 1.656, "w": 1.059 },
{ "row": 1, "col": 7, "x": 8.682, "y": 1.661, "w": 1.059 },
{ "row": 1, "col": 8, "x": 9.741, "y": 1.496, "w": 1.059 },
{ "row": 1, "col": 9, "x": 10.8, "y": 1, "w": 1.059 },
{ "row": 1, "col": 10, "x": 11.937, "y": 1.603, "w": 1.059, "r": 4, "rx": 12.466, "ry": 2.103 },
{ "row": 1, "col": 11, "x": 13.026, "y": 2.505, "w": 1.059, "r": 10, "rx": 13.556, "ry": 3.005 },

{ "row": 2, "col": 0, "x": 0, "y": 3.231, "w": 1.059, "r": -10, "rx": 0.529, "ry": 3.731 },
{ "row": 2, "col": 1, "x": 1.124, "y": 3.489, "w": 1.059, "r": -10, "rx": 1.654, "ry": 3.989 },
{ "row": 2, "col": 2, "x": 2.103, "y": 2.6, "w": 1.059, "r": -4, "rx": 2.633, "ry": 3.1 },
{ "row": 2, "col": 3, "x": 3.175, "y": 2, "w": 1.059 },
{ "row": 2, "col": 4, "x": 4.234, "y": 2.496, "w": 1.059 },
{ "row": 2, "col": 5, "x": 5.292, "y": 2.656, "w": 1.059 },
{ "row": 2, "col": 7, "x": 8.682, "y": 2.661, "w": 1.059 },
{ "row": 2, "col": 8, "x": 9.741, "y": 2.496, "w": 1.059 },
{ "row": 2, "col": 9, "x": 10.8, "y": 2, "w": 1.059 },
{ "row": 2, "col": 10, "x": 11.868, "y": 2.601, "w": 1.059, "r": 4, "rx": 12.398, "ry": 3.101 },
{ "row": 2, "col": 11, "x": 12.852, "y": 3.49, "w": 1.059, "r": 10, "rx": 13.382, "ry": 3.99 },
{ "row": 2, "col": 12, "x": 13.973, "y": 3.231, "w": 1.059, "r": 10, "rx": 14.503, "ry": 3.731 },

{ "row": 3, "col": 3, "x": 3.938, "y": 3.714, "w": 1.059 },
{ "row": 3, "col": 4, "x": 5.11, "y": 3.878, "w": 1.059, "r": 15, "rx": 5.639, "ry": 4.378 },
{ "row": 3, "col": 5, "x": 6.195, "y": 4.329, "w": 1.059, "r": 30, "rx": 6.724, "ry": 4.829 },
{ "row": 3, "col": 7, "x": 7.781, "y": 4.329, "w": 1.059, "r": -30, "rx": 8.31, "ry": 4.829 },
{ "row": 3, "col": 8, "x": 8.866, "y": 3.878, "w": 1.059, "r": -15, "rx": 9.396, "ry": 4.378 },
{ "row": 3, "col": 9, "x": 10.037, "y": 3.714, "w": 1.059 }
]
}
},
"sensors": []
}
4 changes: 3 additions & 1 deletion config/totem.conf
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
CONFIG_ZMK_USB_LOGGING=n
CONFIG_ZMK_USB_LOGGING=n

CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
Loading