Skip to content

Commit

Permalink
add pandemonium
Browse files Browse the repository at this point in the history
  • Loading branch information
D0hnut5 authored Jul 30, 2024
1 parent 71b1874 commit 30709ee
Show file tree
Hide file tree
Showing 6 changed files with 163 additions and 0 deletions.
9 changes: 9 additions & 0 deletions boards/arm/pandemonium/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT

if SHIELD_PANDEMONIUM

config ZMK_KEYBOARD_NAME
default "PANDEMONIUM"

endif
5 changes: 5 additions & 0 deletions boards/arm/pandemonium/Kconfig.shield
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT

config SHIELD_PANDEMONIUM
def_bool $(shields_list_contains,pandemonium)
Empty file.
88 changes: 88 additions & 0 deletions boards/arm/pandemonium/pandemonium.keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

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

#define ALPHA 0
#define NUMFN 1
#define SYMBL 2
#define NAVVL 3

/ { combos {
compatible = "zmk,combos";
combo_esc {
timeout-ms = <50>;
key-positions = <0 1>;
bindings = <&kp ESC>;
};
combo_enter {
timeout-ms = <50>;
key-positions = <31 32>;
bindings = <&kp ENTER>;
};
};
};

/ {
behaviors {
td0: tap_dance_0 {
compatible = "zmk,behavior-tap-dance";
label = "TAP_DANCE_0";
#binding-cells = <0>;
tapping-term-ms = <200>;
bindings = <&kp C_NEXT>, <&kp C_PREV>, <&kp C_MUTE>;
};
};
};

&lt {
tapping-term-ms = <200>;
quick-tap-ms = <200>;
};

/ {
keymap {
compatible = "zmk,keymap";

ALPHA {
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 APOS
&mt LSHFT Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &mt RSHFT DOT
&kp LGUI &mt LCTRL DEL &lt 1 SPACE &lt 2 BSPC &kp SLASH
>;
};

NUMFN {
bindings = <
&kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0
&kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp STAR &kp LPAR &kp RPAR
&kp LSHFT &kp TAB &kp LALT &kp DEL &kp DOT &kp LBKT &kp RBKT &kp MINUS &kp EQUAL
&trans &trans &trans &trans &kp SEMI
>;
};

SYMBL {
bindings = <
&mo 3 &trans &trans &kp F4 &trans &kp GRAVE &kp HOME &kp UP &kp END &kp PG_UP
&trans &trans &trans &trans &trans &trans &kp LEFT &kp DOWN &kp RIGHT &kp PG_DN
&trans &trans &trans &trans &kp LG(LS(S)) &td0 &kp C_VOL_DN &kp C_VOL_UP &kp C_PP
&trans &trans &trans &trans &trans
>;
};

NAVVL {
bindings = <
&trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_CLR &trans &trans &trans &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
>;
};
};
};
53 changes: 53 additions & 0 deletions boards/arm/pandemonium/pandemonium.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* Copyright (c) 2020 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 = <5>;
rows = <8>;
map = <
RC(0,0) RC(1,0) RC(0,1) RC(1,1) RC(0,2) RC(1,2) RC(0,3) RC(1,3) RC(0,4) RC(1,4)
RC(2,0) RC(3,0) RC(2,1) RC(3,1) RC(2,2) RC(3,2) RC(2,3) RC(3,3) RC(2,4) RC(3,4)
RC(4,0) RC(5,0) RC(4,1) RC(5,1) RC(4,2) RC(5,2) RC(4,3) RC(5,3) RC(4,4)
RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(7,3)
>;
};


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

col-gpios
= <&gpio1 11 GPIO_ACTIVE_HIGH>
, <&gpio0 5 GPIO_ACTIVE_HIGH>
, <&gpio0 4 GPIO_ACTIVE_HIGH>
, <&gpio0 29 GPIO_ACTIVE_HIGH>
, <&gpio1 14 GPIO_ACTIVE_HIGH>
;

row-gpios
= <&gpio1 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio1 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 28 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&gpio0 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
};

};
8 changes: 8 additions & 0 deletions boards/arm/pandemonium/pandemonium.zmk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
file_format: "1"
id: pandemonium
name: PANDEMONIUM
type: shield
url: https://github.com/calvin-mcd/pandemonium
requires: [seeeduino_xiao_ble]
features:
- keys

0 comments on commit 30709ee

Please sign in to comment.