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

Personalized QWERTY keymap #17

Open
wants to merge 17 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
28 changes: 10 additions & 18 deletions build.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
# 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" ]
# include:
# - board: bdn9_rev2
# - board: nice_nano_v2
# shield: reviung41
#
---
include:
- board: nice_nano_v2
shield: corne_left nice_view_adapter nice_view
- board: nice_nano_v2
shield: corne_right nice_view_adapter nice_view
- board: seeeduino_xiao_ble
shield: totem_left
- board: seeeduino_xiao_ble
shield: totem_right
- board: seeeduino_xiao_ble
shield: totem_dongle
snippet: studio-rpc-usb-uart
cmake-args: -DCONFIG_ZMK_STUDIO=y
- board: seeeduino_xiao_ble
shield: settings_reset
25 changes: 25 additions & 0 deletions config/boards/shields/totem/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT

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 || SHIELD_TOTEM_DONGLE

config ZMK_SPLIT
default y

config ZMK_BLE
default y

endif
11 changes: 11 additions & 0 deletions config/boards/shields/totem/Kconfig.shield
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT

config SHIELD_TOTEM_LEFT
def_bool $(shields_list_contains,totem_left)

config SHIELD_TOTEM_RIGHT
def_bool $(shields_list_contains,totem_right)

config SHIELD_TOTEM_DONGLE
def_bool $(shields_list_contains,totem_dongle)
Empty file.
92 changes: 92 additions & 0 deletions config/boards/shields/totem/totem.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
/*
* Copyright (c) 2022 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

#include <dt-bindings/zmk/matrix_transform.h>
#include <physical_layouts.dtsi>

/ {
chosen {
zmk,kscan = &kscan0;
zmk,physical-layout = &default_layout;
};

default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <10>;
rows = <4>;
// | SW01 | SW02 | SW03 | SW04 | SW05 | | SW05 | SW04 | SW03 | SW02 | SW01 |
// | SW06 | SW07 | SW08 | SW09 | SW10 | | SW10 | SW09 | SW08 | SW07 | SW06 |
// | SW16 | SW11 | SW12 | SW13 | SW14 | SW15 | | SW15 | SW14 | SW13 | SW12 | SW11 | SW16 |
// | SW17 | SW18 | SW19 | | SW19 | SW18 | SW17 |
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(3,0) 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,9)
RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7)
>;
};

default_layout: default_layout {
compatible = "zmk,physical-layout";
display-name = "TOTEM";
transform = <&default_transform>;
kscan = <&kscan0>;

keys // w h x y rot rx ry
= <&key_physical_attrs 105 100 77 151 (-1000) 130 201>
, <&key_physical_attrs 105 100 196 60 (-400) 249 110>
, <&key_physical_attrs 105 100 317 0 0 0 0>
, <&key_physical_attrs 105 100 423 49 0 0 0>
, <&key_physical_attrs 105 100 529 65 0 0 0>
, <&key_physical_attrs 105 100 868 65 0 0 0>
, <&key_physical_attrs 105 100 974 49 0 0 0>
, <&key_physical_attrs 105 100 1080 0 0 0 0>
, <&key_physical_attrs 105 100 1200 60 400 1253 110>
, <&key_physical_attrs 105 100 1319 152 1000 1372 202>
, <&key_physical_attrs 105 100 95 250 (-1000) 147 300>
, <&key_physical_attrs 105 100 203 160 (-400) 256 210>
, <&key_physical_attrs 105 100 317 100 0 0 0>
, <&key_physical_attrs 105 100 423 149 0 0 0>
, <&key_physical_attrs 105 100 529 165 0 0 0>
, <&key_physical_attrs 105 100 868 166 0 0 0>
, <&key_physical_attrs 105 100 974 149 0 0 0>
, <&key_physical_attrs 105 100 1080 100 0 0 0>
, <&key_physical_attrs 105 100 1193 160 400 1246 210>
, <&key_physical_attrs 105 100 1302 250 1000 1355 300>
, <&key_physical_attrs 105 100 0 323 (-1000) 52 373>
, <&key_physical_attrs 105 100 112 348 (-1000) 165 398>
, <&key_physical_attrs 105 100 210 260 (-400) 263 310>
, <&key_physical_attrs 105 100 317 200 0 0 0>
, <&key_physical_attrs 105 100 423 249 0 0 0>
, <&key_physical_attrs 105 100 529 265 0 0 0>
, <&key_physical_attrs 105 100 868 266 0 0 0>
, <&key_physical_attrs 105 100 974 249 0 0 0>
, <&key_physical_attrs 105 100 1080 200 0 0 0>
, <&key_physical_attrs 105 100 1186 260 400 1239 310>
, <&key_physical_attrs 105 100 1285 349 1000 1338 399>
, <&key_physical_attrs 105 100 1397 323 1000 1450 373>
, <&key_physical_attrs 105 100 393 371 0 0 0>
, <&key_physical_attrs 105 100 511 387 1500 563 437>
, <&key_physical_attrs 105 100 619 432 3000 672 482>
, <&key_physical_attrs 105 100 778 432 (-3000) 831 482>
, <&key_physical_attrs 105 100 886 387 (-1500) 939 437>
, <&key_physical_attrs 105 100 1003 371 0 0 0>
;
};

kscan0: kscan_0 {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN";

diode-direction = "col2row";
row-gpios
= <&xiao_d 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&xiao_d 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&xiao_d 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&xiao_d 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
};
};
163 changes: 163 additions & 0 deletions config/boards/shields/totem/totem.keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
//
// ▀▀▀▀▀ ▀▀▀▀▀ ▀▀█▀▀
// ▄▀▀▀▄ ▄ ▄▀▀▀▄ ▄ ▄▀▀▀▄ █ ▄▀▀▀▄
// █ █ █ █ █ █ █ █ █ █ █
// ▀▀▀ █ ▀▀▀ █ ▀▀▀ ▀ ▀▀▀
// █ ▄▄▄█▄▄▄ █ █
// ▀ █ █ █ █▄█
// ▀▀▀▀▀ █ █ █ ▀
// ▀ ▀ ▀
//
// ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄

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

#define Base 0
#define Media 1
#define Nav 2
#define Mouse 3
#define Sym 4
#define Num 5
#define Fun 6
#define Button 7
#define Game 8
#define Gameplus 9

&mt {
quick-tap-ms = <100>;
global-quick-tap;
flavor = "tap-preferred";
tapping-term-ms = <170>;
};

&lt {
tapping-term-ms = <240>;
flavor = "balanced";
quick-tap-ms = <150>;
};

/ {

behaviors {
hm: homerow_mods {
compatible = "zmk,behavior-hold-tap";
label = "HOMEROW_MODS";
#binding-cells = <2>;
flavor = "tap-preferred";
tapping-term-ms = <240>;
quick-tap-ms = <150>;
global-quick-tap;
bindings =
<&kp>,
<&kp>;
};
};

keymap {
compatible = "zmk,keymap";

Base {
label = "Base";
bindings = <
&kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P
&hm LGUI A &hm LALT S &hm LCTRL D &hm LSHIFT F &kp G &kp H &hm RSHFT J &hm RCTRL K &hm RALT L &hm RGUI SEMICOLON
&trans &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &lt 7 SLASH &trans
&lt 1 ESCAPE &lt 2 TAB &lt 3 SPACE &lt 4 BACKSPACE &lt 5 ENTER &lt 6 DELETE
>;
};

Media {
label = "Media";
bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&kp LGUI &kp LALT &kp LCTRL &kp LSHIFT &trans &trans &kp C_PREVIOUS &kp C_VOLUME_DOWN &kp C_VOLUME_UP &kp C_NEXT
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &tog 8 &kp C_STOP &kp C_PLAY_PAUSE &trans
>;
};

Nav {
label = "Nav";
bindings = <
&kp DELETE &trans &trans &trans &trans &trans &trans &trans &trans &trans
&kp LEFT_GUI &kp LALT &kp LCTRL &kp LSHIFT &kp SQT &kp CAPS &kp LEFT &kp DOWN &kp UP &kp RIGHT
&trans &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp C_PLAY_PAUSE &kp INSERT &kp HOME &kp PAGE_DOWN &kp PAGE_UP &kp END &trans
&trans &trans &trans &kp DELETE &kp ENTER &trans
>;
};

Mouse {
label = "Mouse";
bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans
>;
};

Sym {
label = "Sym";
bindings = <
&kp LEFT_BRACE &kp AMPERSAND &kp ASTERISK &kp LEFT_PARENTHESIS &kp RIGHT_BRACE &trans &trans &trans &trans &trans
&kp COLON &kp DOLLAR &kp PERCENT &kp CARET &kp PLUS &trans &kp RSHIFT &kp RCTRL &kp RALT &kp RGUI
&trans &kp TILDE &kp EXCL &kp AT &kp HASH &kp PIPE &trans &trans &trans &trans &trans &trans
&kp LEFT_PARENTHESIS &kp RIGHT_PARENTHESIS &kp UNDERSCORE &trans &trans &trans
>;
};

Num {
label = "Num";
bindings = <
&kp LEFT_BRACKET &kp NUMBER_7 &kp NUMBER_8 &kp NUMBER_9 &kp RIGHT_BRACKET &trans &trans &trans &trans &trans
&kp SEMICOLON &kp NUMBER_4 &kp NUMBER_5 &kp NUMBER_6 &kp EQUAL &trans &kp RSHIFT &kp RCTRL &kp RALT &kp RGUI
&trans &kp GRAVE &kp NUMBER_1 &kp NUMBER_2 &kp NUMBER_3 &kp BACKSLASH &trans &trans &trans &trans &trans &trans
&kp SQT &kp NUMBER_0 &kp MINUS &trans &trans &trans
>;
};

Fun {
label = "Fun";
bindings = <
&kp F12 &kp F7 &kp F8 &kp F9 &kp PRINTSCREEN &trans &trans &trans &trans &trans
&kp F11 &kp F4 &kp F5 &kp F6 &kp SCROLLLOCK &trans &kp RSHIFT &kp RCTRL &kp RALT &kp RGUI
&trans &kp F10 &kp F1 &kp F2 &kp F3 &kp PAUSE_BREAK &trans &trans &trans &trans &trans &trans
&kp C_MENU &kp TAB &kp SPACE &trans &trans &trans
>;
};

Button {
label = "Button";
bindings = <
&bt BT_CLR &bootloader &trans &trans &bt BT_SEL 0 &trans &trans &trans &bootloader &trans
&kp LGUI &kp LALT &kp LCTRL &kp LSHIFT &bt BT_SEL 1 &trans &kp RSHIFT &kp RCTRL &kp RALT &kp RGUI
&trans &ext_power EP_TOG &trans &trans &trans &bt BT_SEL 2 &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans
>;
};

Game {
label = "Game";
bindings = <
&kp TAB &kp Z &kp X &kp C &kp V &trans &trans &trans &trans &trans
&kp LEFT_SHIFT &kp Q &kp W &kp E &kp R &trans &trans &trans &trans &trans
&trans &kp LCTRL &kp A &kp S &kp D &kp F &trans &trans &trans &trans &trans &trans
&kp LALT &lt 9 ESCAPE &kp SPACE &trans &trans &trans
>;
};

Gameplus {
label = "Gameplus";
bindings = <
&kp NUMBER_1 &kp NUMBER_2 &kp NUMBER_3 &kp NUMBER_4 &kp NUMBER_5 &trans &trans &trans &trans &trans
&kp G &trans &trans &trans &kp T &trans &trans &trans &trans &trans
&trans &kp TAB &trans &trans &trans &kp B &trans &trans &trans &trans &trans &trans
&kp ESCAPE &trans &tog 8 &trans &trans &trans
>;
};
};
};
12 changes: 12 additions & 0 deletions config/boards/shields/totem/totem.zmk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
file_format: "1"
id: totem
name: TOTEM
type: shield
url: https://github.com/GEIGEIGEIST/TOTEM
requires: [seeeduino_xiao_ble]
features:
- keys
siblings:
- totem_left
- totem_right
- totem_dongle
10 changes: 10 additions & 0 deletions config/boards/shields/totem/totem_dongle.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS=2

CONFIG_ZMK_SLEEP=n

#CONFIG_ZMK_USB_LOGGING=y
#CONFIG_LOG_MODE_IMMEDIATE=n
#CONFIG_LOG_TIMESTAMP_64BIT=y
#CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=5000
#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>
;
};
Empty file.
17 changes: 17 additions & 0 deletions config/boards/shields/totem/totem_left.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 4 GPIO_ACTIVE_HIGH>
, <&xiao_d 5 GPIO_ACTIVE_HIGH>
, <&xiao_d 10 GPIO_ACTIVE_HIGH>
, <&xiao_d 9 GPIO_ACTIVE_HIGH>
, <&xiao_d 8 GPIO_ACTIVE_HIGH>
;
};
Empty file.
Loading