first attempt at zmk swweeep firmware
This commit is contained in:
5
.github/workflows/build.yml
vendored
Normal file
5
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
on: [push, pull_request, workflow_dispatch]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@main
|
||||||
21
build.yaml
Normal file
21
build.yaml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# 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: swweeep_left nice_view_adapter nice_view
|
||||||
|
- board: nice_nano_v2
|
||||||
|
shield: swweeep_right nice_view_adapter nice_view
|
||||||
|
- board: nice_nano_v2
|
||||||
|
shield: settings_reset
|
||||||
17
config/boards/shields/swweeep/Kconfig.defconfig
Normal file
17
config/boards/shields/swweeep/Kconfig.defconfig
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# Copyright (c) 2022 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
if SHIELD_SWWEEEP_LEFT
|
||||||
|
|
||||||
|
config ZMK_KEYBOARD_NAME
|
||||||
|
default "swweeep"
|
||||||
|
|
||||||
|
config ZMK_SPLIT_ROLE_CENTRAL
|
||||||
|
default y
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
if SHIELD_SWWEEEP_LEFT || SHIELD_SWWEEEP_RIGHT
|
||||||
|
config ZMK_SPLIT
|
||||||
|
default y
|
||||||
|
endif
|
||||||
8
config/boards/shields/swweeep/Kconfig.shield
Normal file
8
config/boards/shields/swweeep/Kconfig.shield
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2022 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
config SHIELD_SWWEEEP_LEFT
|
||||||
|
def_bool $(shields_list_contains,swweeep_left)
|
||||||
|
|
||||||
|
config SHIELD_SWWEEEP_RIGHT
|
||||||
|
def_bool $(shields_list_contains,swweeep_right)
|
||||||
0
config/boards/shields/swweeep/swweeep.conf
Normal file
0
config/boards/shields/swweeep/swweeep.conf
Normal file
55
config/boards/shields/swweeep/swweeep.dtsi
Normal file
55
config/boards/shields/swweeep/swweeep.dtsi
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <dt-bindings/zmk/matrix_transform.h>
|
||||||
|
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zmk,kscan = &kscan0;
|
||||||
|
zmk,matrix_transform = &default_transform;
|
||||||
|
};
|
||||||
|
|
||||||
|
default_transform: keymap_transform_0 {
|
||||||
|
compatible = "zmk,matrix-transform";
|
||||||
|
columns = <36>;
|
||||||
|
rows = <1>;
|
||||||
|
|
||||||
|
map = <
|
||||||
|
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,22) RC(0,21) RC(0,20) RC(0,19) RC(0,18)
|
||||||
|
RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,27) RC(0,26) RC(0,25) RC(0,24) RC(0,23)
|
||||||
|
RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,32) RC(0,31) RC(0,30) RC(0,29) RC(0,28)
|
||||||
|
RC(0,15) RC(0,16) RC(0,17) RC(0,35) RC(0,34) RC(0,33)
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
kscan0: kscan_0 {
|
||||||
|
compatible = "zmk,kscan-gpio-direct";
|
||||||
|
label = "KSCAN";
|
||||||
|
input-gpios
|
||||||
|
= <&pro_micro 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
, <&pro_micro 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
, <&pro_micro 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
, <&pro_micro 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
, <&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
, <&pro_micro 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
, <&pro_micro 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
, <&gpio1 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
, <&gpio1 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
, <&gpio1 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
, <&pro_micro 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
, <&pro_micro 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
, <&pro_micro 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
, <&pro_micro 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
, <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
, <&pro_micro 21 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
, <&pro_micro 20 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
, <&pro_micro 19 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
142
config/boards/shields/swweeep/swweeep.keymap
Normal file
142
config/boards/shields/swweeep/swweeep.keymap
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
#include <behaviors.dtsi>
|
||||||
|
#include <dt-bindings/zmk/keys.h>
|
||||||
|
#include <dt-bindings/zmk/bt.h>
|
||||||
|
#include <dt-bindings/zmk/outputs.h>
|
||||||
|
|
||||||
|
#define DEFAULT 0
|
||||||
|
#define NAV 1
|
||||||
|
#define SYM 2
|
||||||
|
#define FUNC 3
|
||||||
|
#define MEDIA 4
|
||||||
|
#define MOUSE 5
|
||||||
|
#define WINNAV 6
|
||||||
|
|
||||||
|
&caps_word {
|
||||||
|
continue-list = <UNDERSCORE MINUS>;
|
||||||
|
};
|
||||||
|
|
||||||
|
/ {
|
||||||
|
combos {
|
||||||
|
compatible = "zmk,combos";
|
||||||
|
combo_undo {
|
||||||
|
timeout-ms = <50>;
|
||||||
|
key-positions = <20 21>;
|
||||||
|
bindings = <&kp LC(Z)>;
|
||||||
|
};
|
||||||
|
combo_q {
|
||||||
|
timeout-ms = <50>;
|
||||||
|
key-positions = <21 22>;
|
||||||
|
bindings = <&kp Q>;
|
||||||
|
};
|
||||||
|
combo_semicolon {
|
||||||
|
timeout-ms = <50>;
|
||||||
|
key-positions = <27 28>;
|
||||||
|
bindings = <&kp SEMI>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/ {
|
||||||
|
|
||||||
|
behaviors {
|
||||||
|
hm: homerow_mods {
|
||||||
|
compatible = "zmk,behavior-hold-tap";
|
||||||
|
label = "HOMEROW_MODS";
|
||||||
|
#binding-cells = <2>;
|
||||||
|
tapping-term-ms = <200>;
|
||||||
|
quick_tap_ms = <0>;
|
||||||
|
flavor = "balanced";
|
||||||
|
bindings = <&kp>, <&kp>;
|
||||||
|
};
|
||||||
|
hs: homerow_shift {
|
||||||
|
compatible = "zmk,behavior-hold-tap";
|
||||||
|
label = "HOMEROW_SHIFT";
|
||||||
|
#binding-cells = <2>;
|
||||||
|
tapping-term-ms = <175>;
|
||||||
|
quick_tap_ms = <0>;
|
||||||
|
flavor = "balanced";
|
||||||
|
bindings = <&kp>, <&kp>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
keymap {
|
||||||
|
compatible = "zmk,keymap";
|
||||||
|
|
||||||
|
default_layer {
|
||||||
|
label = "Default";
|
||||||
|
|
||||||
|
bindings = <
|
||||||
|
&kp Q &kp W &kp F &kp P &kp B &kp J &kp L < WINNAV U &kp Y &kp SEMI
|
||||||
|
&hm LCTL A &hm LGUI R &hm LALT S &hs LSHIFT T &kp G < MOUSE M &hs RSHIFT N &hm RALT E &hm RGUI I &hm RCTL O
|
||||||
|
&kp Z &kp X &kp C &kp D &kp V &kp K &kp H &kp COMMA &kp DOT &kp FSLH
|
||||||
|
&kp DEL < NAV RET < FUNC TAB < MEDIA BSPC < SYM SPACE &kp SQT
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
nav_layer {
|
||||||
|
label = "Navigation";
|
||||||
|
|
||||||
|
bindings = <
|
||||||
|
&kp ESC &kp PG_UP &kp UP &kp PG_DN &trans &kp ASTRK &kp N7 &kp N8 &kp N9 &kp MINUS
|
||||||
|
&kp HOME &kp LEFT &kp DOWN &kp RIGHT &kp END &kp FSLH &kp N4 &kp N5 &kp N6 &kp PLUS
|
||||||
|
&trans &trans &trans &trans &trans &kp EQUAL &kp N1 &kp N2 &kp N3 &kp N0
|
||||||
|
&trans &trans &kp TAB &kp BSPC &kp SPACE &kp DOT
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
sym_layer {
|
||||||
|
label = "Symbols";
|
||||||
|
|
||||||
|
bindings = <
|
||||||
|
&kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp ASTRK &kp UNDER &kp EQUAL
|
||||||
|
&kp MINUS &kp LBKT &kp LBRC &kp LPAR &kp LT &kp GT &kp RPAR &kp RBRC &kp RBKT &kp PLUS
|
||||||
|
&kp CAPS &kp GRAVE &kp LC(LS(TAB)) &kp LC(LG(LEFT)) &caps_word &trans &kp LC(LG(RIGHT)) &kp LC(TAB) &trans &kp BSLH
|
||||||
|
&trans &kp RET &kp DEL &kp BSPC &trans &trans
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
func_layer {
|
||||||
|
label = "Function";
|
||||||
|
|
||||||
|
bindings = <
|
||||||
|
&trans &kp LS(PG_UP) &kp LS(UP) &kp LS(PG_DN) &trans &kp C_PLAY_PAUSE &kp F7 &kp F8 &kp F9 &kp F10
|
||||||
|
&kp LS(HOME) &kp LS(LEFT) &kp LS(DOWN) &kp LS(RIGHT) &kp LS(END) &kp K_VOL_UP &kp F4 &kp F5 &kp F6 &kp F11
|
||||||
|
&trans &trans &trans &trans &kp C_MUTE &kp K_VOL_DN &kp F1 &kp F2 &kp F3 &kp F12
|
||||||
|
&trans &trans &trans &trans &trans &kp SPACE
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
media_layer {
|
||||||
|
label = "Media";
|
||||||
|
|
||||||
|
bindings = <
|
||||||
|
&trans &trans &trans &trans &trans &trans &bt BT_PRV &bt BT_NXT &trans &trans
|
||||||
|
&trans &trans &trans &trans &trans &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3
|
||||||
|
&trans &trans &trans &trans &trans &ext_power EP_TOG &ext_power EP_ON &ext_power EP_OFF &out OUT_USB &out OUT_BLE
|
||||||
|
&trans &trans &trans &trans &trans &trans
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
mouse_layer {
|
||||||
|
label = "Mouse";
|
||||||
|
|
||||||
|
bindings = <
|
||||||
|
&bootloader &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
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
winnav_layer {
|
||||||
|
label = "Win Navigation";
|
||||||
|
|
||||||
|
bindings = <
|
||||||
|
&trans &trans &kp LG(UP) &trans &trans &trans &trans &trans &trans &trans
|
||||||
|
&trans &kp LG(LEFT) &kp LG(DOWN) &kp LG(RIGHT) &trans &trans &trans &trans &trans &trans
|
||||||
|
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||||
|
&trans &trans &trans &trans &trans &trans
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
11
config/boards/shields/swweeep/swweeep.zmk.yml
Normal file
11
config/boards/shields/swweeep/swweeep.zmk.yml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
file_format: "1"
|
||||||
|
id: swweeep
|
||||||
|
name: swweeep
|
||||||
|
type: shield
|
||||||
|
url: https://github.com/sadekbaroudi/sweep36
|
||||||
|
requires: [pro_micro]
|
||||||
|
features:
|
||||||
|
- keys
|
||||||
|
siblings:
|
||||||
|
- swweeep_left
|
||||||
|
- swweeep_right
|
||||||
0
config/boards/shields/swweeep/swweeep_left.conf
Normal file
0
config/boards/shields/swweeep/swweeep_left.conf
Normal file
7
config/boards/shields/swweeep/swweeep_left.overlay
Normal file
7
config/boards/shields/swweeep/swweeep_left.overlay
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "swweeep.dtsi"
|
||||||
0
config/boards/shields/swweeep/swweeep_right.conf
Normal file
0
config/boards/shields/swweeep/swweeep_right.conf
Normal file
11
config/boards/shields/swweeep/swweeep_right.overlay
Normal file
11
config/boards/shields/swweeep/swweeep_right.overlay
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "swweeep.dtsi"
|
||||||
|
|
||||||
|
&default_transform {
|
||||||
|
col-offset = <18>;
|
||||||
|
};
|
||||||
11
config/west.yml
Normal file
11
config/west.yml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
manifest:
|
||||||
|
remotes:
|
||||||
|
- name: zmkfirmware
|
||||||
|
url-base: https://github.com/zmkfirmware
|
||||||
|
projects:
|
||||||
|
- name: zmk
|
||||||
|
remote: zmkfirmware
|
||||||
|
revision: main
|
||||||
|
import: app/west.yml
|
||||||
|
self:
|
||||||
|
path: config
|
||||||
Reference in New Issue
Block a user