-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
New Sheild Pteron36 #1364
base: main
Are you sure you want to change the base?
New Sheild Pteron36 #1364
Changes from all commits
4edb09e
8d94cf0
7efbd5d
3064bfa
40b483d
5c34846
865efce
61e1cec
4e1e2ba
22fc96a
59fe749
7085eb8
e4ad7ab
e4f210a
966934f
f4ccb76
23b2cd0
f7ad5e2
a27c986
fda1828
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
if SHIELD_PTERON36_LEFT | ||
|
||
config ZMK_KEYBOARD_NAME | ||
default "Pteron36" | ||
|
||
config ZMK_SPLIT_BLE_ROLE_CENTRAL | ||
default y | ||
|
||
endif | ||
|
||
if SHIELD_PTERON36_LEFT || SHIELD_PTERON36_RIGHT | ||
|
||
config ZMK_SPLIT | ||
default y | ||
|
||
endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
config SHIELD_PTERON36_LEFT | ||
def_bool $(shields_list_contains,pteron36_left) | ||
|
||
config SHIELD_PTERON36_RIGHT | ||
def_bool $(shields_list_contains,pteron36_right) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
# Copyright (c) 2022 The ZMK Contributors | ||
# SPDX-License-Identifier: MIT | ||
|
||
# Uncomment the following line to enable the Lotus58 OLED Display | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might want to remove the display and encoder configs to not confuse users, if they aren't supported by the firmware yet. |
||
# CONFIG_ZMK_DISPLAY=y | ||
|
||
# Uncomment these two lines to add support for encoders | ||
# CONFIG_EC11=y | ||
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,45 @@ | ||||||||||||||||||||||
/* | ||||||||||||||||||||||
* Copyright (c) 2020 Pete Johanson | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might want to fix the copyright headers in this file and others to |
||||||||||||||||||||||
* | ||||||||||||||||||||||
* 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 = <10>; | ||||||||||||||||||||||
rows = <4>; | ||||||||||||||||||||||
// SW5 | SW4 | SW3 | SW2 | SW1 | | SW1 | SW2 | SW3 | SW4 | SW5 | | ||||||||||||||||||||||
|
||||||||||||||||||||||
// SW11 | SW10 | SW9 | SW8 | SW7 | | SW7 | SW8 | SW9 | SW10 | SW11 | | ||||||||||||||||||||||
// SW17 | SW16 | SW15 | SW14 | SW13 | | SW13 | SW14 | SW15 | SW16 | SW17 | | ||||||||||||||||||||||
// SW28 | SW27 | SW26 | | SW26 | SW27 | SW28 | | ||||||||||||||||||||||
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,0) RC(3,1) RC(3,2) RC(3,7) RC(3,8) RC(3,9) | ||||||||||||||||||||||
Comment on lines
+25
to
+28
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
If you reorder the transform, you can use the same |
||||||||||||||||||||||
>; | ||||||||||||||||||||||
}; | ||||||||||||||||||||||
|
||||||||||||||||||||||
kscan0: kscan { | ||||||||||||||||||||||
compatible = "zmk,kscan-gpio-matrix"; | ||||||||||||||||||||||
label = "KSCAN"; | ||||||||||||||||||||||
|
||||||||||||||||||||||
Comment on lines
+34
to
+35
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
The |
||||||||||||||||||||||
diode-direction = "row2col"; | ||||||||||||||||||||||
row-gpios | ||||||||||||||||||||||
= <&pro_micro 7 (GPIO_ACTIVE_HIGH)> | ||||||||||||||||||||||
, <&pro_micro 6 (GPIO_ACTIVE_HIGH )> | ||||||||||||||||||||||
, <&pro_micro 8 (GPIO_ACTIVE_HIGH )> | ||||||||||||||||||||||
, <&pro_micro 9 (GPIO_ACTIVE_HIGH )> | ||||||||||||||||||||||
Comment on lines
+39
to
+41
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ZMK's standard is to use spaces for indentation instead of tabs. Installing and running
Suggested change
|
||||||||||||||||||||||
; | ||||||||||||||||||||||
|
||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
}; | ||||||||||||||||||||||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
#include <behaviors.dtsi> | ||
#include <dt-bindings/zmk/keys.h> | ||
#include <dt-bindings/zmk/bt.h> | ||
#include <dt-bindings/zmk/ext_power.h> | ||
#include <dt-bindings/zmk/outputs.h> | ||
|
||
#define BASE 0 | ||
#define NAVR 1 | ||
#define MOUR 2 | ||
#define MEDR 3 | ||
#define NSL 4 | ||
#define NSSL 5 | ||
#define FUNL 6 | ||
|
||
/ { | ||
behaviors { | ||
hm: homerow_mods { | ||
compatible = "zmk,behavior-hold-tap"; | ||
label = "HOMEROW_MODS"; | ||
#binding-cells = <2>; | ||
tapping-term-ms = <200>; | ||
quick_tap_ms = <0>; | ||
flavor = "tap-preferred"; | ||
bindings = <&kp>, <&kp>; | ||
}; | ||
}; | ||
keymap { | ||
compatible = "zmk,keymap"; | ||
|
||
default_layer { | ||
// ------------------------------------------------------------------------------------------------------------ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd either correct the commented layer diagrams or remove them altogether. |
||
// | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | | ||
// | TAB | Q | W | E | R | T | | Y | U | I | O | P | - | | ||
// | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' | | ||
// | SHIFT | Z | X | C | V | B | "[" | | "]" | N | M | , | . | / | SHIFT | | ||
// | ALT | GUI | LOWER| SPACE | | ENTER | RAISE| BSPC | GUI | | ||
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 LSHFT F &kp G &kp H &hm RSHFT J &hm LCTRL K &hm RALT L &hm RGUI APOS | ||
&kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH | ||
< MEDR ESC < NAVR SPACE < MOUR TAB < NSSL RET < NSL BSPC < FUNL DEL | ||
>; | ||
|
||
|
||
}; | ||
|
||
navr_layer { | ||
// ------------------------------------------------------------------------------------------------------------ | ||
// | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | | | ||
// | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | ||
// | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | ~ | | ||
// | | | | | | | | | | | _ | + | { | } | "|" | | ||
// | | | | | | | | | | | ||
bindings = < | ||
|
||
&trans &trans &trans &trans &trans &kp C_AC_REDO &kp C_AC_PASTE &kp C_AC_COPY &kp C_AC_CUT &kp C_AC_UNDO | ||
&trans &trans &trans &trans &trans &kp CAPS &kp LEFT &kp DOWN &kp UP &kp RIGHT | ||
&trans &trans &trans &trans &trans &kp INS &kp HOME &kp PG_DN &kp PG_UP &kp END | ||
&trans &trans &trans &trans &trans &trans | ||
>; | ||
|
||
|
||
}; | ||
|
||
mour_layer { | ||
// ------------------------------------------------------------------------------------------------------------ | ||
// | | | | | | | | | | | | | | | ||
// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | | ||
// | F1 | F2 | F3 | F4 | F5 | F6 | | | <- | ^ | v | -> | | | ||
// | F7 | F8 | F9 | F10 | F11 | F12 | | | | + | - | = | [ | ] | \ | | ||
// | | | | | | | | | | | ||
bindings = < | ||
&kp F12 &kp F7 &kp F8 &kp F9 &kp PSCRN &trans &trans &trans &trans &trans | ||
&kp F11 &kp F4 &kp F5 &kp F6 &kp SLCK &trans &trans &trans &trans &trans | ||
&kp F10 &kp F1 &kp F2 &kp F3 &kp PAUSE_BREAK &trans &trans &trans &trans &trans | ||
&trans &trans &trans &trans &trans &trans | ||
>; | ||
|
||
|
||
}; | ||
|
||
medr_layer { | ||
// ------------------------------------------------------------------------------------------------------------ | ||
// | | | | | | | | | | | | | | | ||
// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | | ||
// | F1 | F2 | F3 | F4 | F5 | F6 | | | <- | ^ | v | -> | | | ||
// | F7 | F8 | F9 | F10 | F11 | F12 | | | | + | - | = | [ | ] | \ | | ||
// | | | | | | | | | | | ||
bindings = < | ||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans | ||
&trans &trans &trans &trans &trans &trans &kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_NEXT | ||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans | ||
&trans &trans &trans &kp C_STOP &kp C_PP &kp C_MUTE | ||
>; | ||
|
||
|
||
}; | ||
|
||
nsl_layer { | ||
// ------------------------------------------------------------------------------------------------------------ | ||
// | | | | | | | | | | | | | | | ||
// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | | ||
// | F1 | F2 | F3 | F4 | F5 | F6 | | | <- | ^ | v | -> | | | ||
// | F7 | F8 | F9 | F10 | F11 | F12 | | | | + | - | = | [ | ] | \ | | ||
// | | | | | | | | | | | ||
bindings = < | ||
&kp LBKT &kp N7 &kp N8 &kp N9 &kp RBKT &trans &trans &trans &trans &trans | ||
&kp SEMICOLON &kp N4 &kp N5 &kp N6 &kp EQUAL &trans &trans &trans &trans &trans | ||
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp BSLH &trans &trans &trans &trans &trans | ||
&kp DOT &kp N0 &kp MINUS &trans &trans &trans | ||
>; | ||
|
||
|
||
}; | ||
|
||
nssl_layer { | ||
// ------------------------------------------------------------------------------------------------------------ | ||
// | | | | | | | | | | | | | | | ||
// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | | ||
// | F1 | F2 | F3 | F4 | F5 | F6 | | | <- | ^ | v | -> | | | ||
// | F7 | F8 | F9 | F10 | F11 | F12 | | | | + | - | = | [ | ] | \ | | ||
// | | | | | | | | | | | ||
bindings = < | ||
&kp LS(LBKT) &kp LS(N7) &kp LS(N8) &kp LS(N9) &kp LS(RBKT) &trans &trans &trans &trans &trans | ||
&kp LS(SEMICOLON) &kp LS(N4) &kp LS(N5) &kp LS(N6) &kp LS(EQUAL) &trans &trans &trans &trans &trans | ||
&kp LS(GRAVE) &kp LS(N1) &kp LS(N2) &kp LS(N3) &kp LS(BSLH) &trans &trans &trans &trans &trans | ||
&kp LS(DOT) &kp LS(N0) &kp LS(MINUS) &trans &trans &trans | ||
>; | ||
|
||
|
||
}; | ||
|
||
funl_layer { | ||
// ------------------------------------------------------------------------------------------------------------ | ||
// | | | | | | | | | | | | | | | ||
// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | | ||
// | F1 | F2 | F3 | F4 | F5 | F6 | | | <- | ^ | v | -> | | | ||
// | F7 | F8 | F9 | F10 | F11 | F12 | | | | + | - | = | [ | ] | \ | | ||
// | | | | | | | | | | | ||
bindings = < | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't this identical to the |
||
|
||
&kp F12 &kp F7 &kp F8 &kp F9 &kp PSCRN &trans &trans &trans &trans &trans | ||
&kp F11 &kp F4 &kp F5 &kp F6 &kp SLCK &trans &trans &trans &trans &trans | ||
&kp F10 &kp F1 &kp F2 &kp F3 &kp PAUSE_BREAK &trans &trans &trans &trans &trans | ||
&kp K_APP &kp SPACE &kp TAB &trans &trans &trans | ||
>; | ||
|
||
|
||
}; | ||
|
||
}; | ||
|
||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
file_format: "1" | ||
id: pteron36 | ||
name: Pteron36 | ||
type: shield | ||
requires: [pro_micro] | ||
features: | ||
- keys | ||
siblings: | ||
- pteron36_left | ||
- pteron36_right |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,17 @@ | ||||||||||||||||||||
/* | ||||||||||||||||||||
* Copyright (c) 2020 Pete Johanson | ||||||||||||||||||||
* | ||||||||||||||||||||
* SPDX-License-Identifier: MIT | ||||||||||||||||||||
*/ | ||||||||||||||||||||
|
||||||||||||||||||||
#include "pteron36.dtsi" | ||||||||||||||||||||
|
||||||||||||||||||||
&kscan0 { | ||||||||||||||||||||
col-gpios | ||||||||||||||||||||
= <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> | ||||||||||||||||||||
, <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> | ||||||||||||||||||||
, <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> | ||||||||||||||||||||
, <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> | ||||||||||||||||||||
, <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> | ||||||||||||||||||||
; | ||||||||||||||||||||
Comment on lines
+8
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Moved to |
||||||||||||||||||||
}; |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,21 @@ | ||||||||||||||||||||
/* | ||||||||||||||||||||
* Copyright (c) 2020 Pete Johanson | ||||||||||||||||||||
* | ||||||||||||||||||||
* SPDX-License-Identifier: MIT | ||||||||||||||||||||
*/ | ||||||||||||||||||||
|
||||||||||||||||||||
#include "pteron36.dtsi" | ||||||||||||||||||||
|
||||||||||||||||||||
&default_transform { | ||||||||||||||||||||
col-offset = <5>; | ||||||||||||||||||||
}; | ||||||||||||||||||||
|
||||||||||||||||||||
&kscan0 { | ||||||||||||||||||||
col-gpios | ||||||||||||||||||||
= <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> | ||||||||||||||||||||
, <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> | ||||||||||||||||||||
, <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> | ||||||||||||||||||||
, <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> | ||||||||||||||||||||
, <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> | ||||||||||||||||||||
; | ||||||||||||||||||||
Comment on lines
+12
to
+20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Moved to |
||||||||||||||||||||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.