Add support for keeb.io fourier split keyboard (#1056)
* Add support for keeb.io fourier * Update app/boards/shields/fourier/fourier_right.overlay Co-authored-by: Nick Winans <nick@winans.codes> * Update app/boards/shields/fourier/fourier_left.overlay Co-authored-by: Nick Winans <nick@winans.codes> * Convert spaces to tabs in .dtsi Co-authored-by: Nick Winans <nick@winans.codes>
This commit is contained in:
parent
b23934cf94
commit
eca051efa0
7 changed files with 189 additions and 0 deletions
20
app/boards/shields/fourier/Kconfig.defconfig
Normal file
20
app/boards/shields/fourier/Kconfig.defconfig
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# Copyright (c) 2021 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
|
||||||
|
if SHIELD_FOURIER_LEFT
|
||||||
|
|
||||||
|
config ZMK_KEYBOARD_NAME
|
||||||
|
default "Fourier"
|
||||||
|
|
||||||
|
config ZMK_SPLIT_BLE_ROLE_CENTRAL
|
||||||
|
default y
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
if SHIELD_FOURIER_LEFT || SHIELD_FOURIER_RIGHT
|
||||||
|
|
||||||
|
config ZMK_SPLIT
|
||||||
|
default y
|
||||||
|
|
||||||
|
endif
|
9
app/boards/shields/fourier/Kconfig.shield
Normal file
9
app/boards/shields/fourier/Kconfig.shield
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# Copyright (c) 2021 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
|
||||||
|
config SHIELD_FOURIER_LEFT
|
||||||
|
def_bool $(shields_list_contains,fourier_left)
|
||||||
|
|
||||||
|
config SHIELD_FOURIER_RIGHT
|
||||||
|
def_bool $(shields_list_contains,fourier_right)
|
43
app/boards/shields/fourier/fourier.dtsi
Normal file
43
app/boards/shields/fourier/fourier.dtsi
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2021 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <dt-bindings/zmk/matrix_transform.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zmk,kscan = &kscan0;
|
||||||
|
zmk,matrix_transform = &default_transform;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This transform correspondsto the 60% left without macro keypad and 65% right, even this
|
||||||
|
* combination of PCBs can have keys in different locations based on configuration.
|
||||||
|
*/
|
||||||
|
default_transform: keymap_transform_0 {
|
||||||
|
compatible = "zmk,matrix-transform";
|
||||||
|
columns = <13>;
|
||||||
|
rows = <4>;
|
||||||
|
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(0,10) RC(0, 11) RC(0,12)
|
||||||
|
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(1,10) RC(1,12)
|
||||||
|
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) /**/ RC(2,6) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12)
|
||||||
|
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) /**/ RC(3,6) RC(3,9) RC(3,10) RC(3,11) RC(3,12)
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
kscan0: kscan {
|
||||||
|
compatible = "zmk,kscan-gpio-matrix";
|
||||||
|
label = "KSCAN";
|
||||||
|
|
||||||
|
diode-direction = "col2row";
|
||||||
|
row-gpios
|
||||||
|
= <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row A
|
||||||
|
, <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row B
|
||||||
|
, <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row C
|
||||||
|
, <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> // Row D
|
||||||
|
;
|
||||||
|
};
|
||||||
|
};
|
64
app/boards/shields/fourier/fourier.keymap
Normal file
64
app/boards/shields/fourier/fourier.keymap
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2021 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <behaviors.dtsi>
|
||||||
|
#include <dt-bindings/zmk/bt.h>
|
||||||
|
#include <dt-bindings/zmk/keys.h>
|
||||||
|
#include <dt-bindings/zmk/rgb.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
keymap {
|
||||||
|
compatible = "zmk,keymap";
|
||||||
|
|
||||||
|
// ---------------------------------------------- ----------------------------------------------
|
||||||
|
// | ESC | Q | W | E | R | T | | Y | U | I | O | P | | BKSP |
|
||||||
|
// | TAB | A | S | D | F | G | | H | J | K | L | ' | ENTER |
|
||||||
|
// | SHIFT | Z | X | C | V | B | | N | M | , | . | / | RSHFT |
|
||||||
|
// | LCTRL | LALT| LGUI | SPACE | | SPACE/L1 | L2 | RGUI | RALT |RCTRL|
|
||||||
|
// ------------------------------------------- -----------------------------------------------
|
||||||
|
|
||||||
|
default_layer {
|
||||||
|
bindings = <
|
||||||
|
&kp ESC &kp Q &kp W &kp E &kp R &kp T /**/ &kp Y &kp U &kp I &kp O &kp P &none &kp BACKSPACE
|
||||||
|
&kp TAB &kp A &kp S &kp D &kp F &kp G /**/ &kp H &kp J &kp K &kp L &kp SQT &kp ENTER
|
||||||
|
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B /**/ &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
|
||||||
|
&kp LCTRL &kp LALT &kp LGUI &none &kp SPACE /**/ < 1 SPACE &mo 2 &kp RGUI &kp RALT &kp RCTRL
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---------------------------------------------- ----------------------------------------------
|
||||||
|
// | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | O | PSCR | | DEL |
|
||||||
|
// | ` | | <- | ^ | -> | Vo+ | | [ | ] | - | = | ; | \ |
|
||||||
|
// | trans | | | | V | Vo- | | | | | | | trans |
|
||||||
|
// | trans | trans| trans | trans | | trans | trans | trans | trans|trans|
|
||||||
|
// ------------------------------------------- -----------------------------------------------
|
||||||
|
|
||||||
|
symbols_layer {
|
||||||
|
bindings = <
|
||||||
|
&kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 /**/ &kp N7 &kp N8 &kp N9 &kp N0 &kp PSCRN &none &kp DEL
|
||||||
|
&kp GRAVE &none &kp LEFT &kp UP &kp RIGHT &kp C_VOL_UP /**/ &kp LBKT &kp RBKT &kp MINUS &kp EQUAL &kp SEMI &kp BACKSLASH
|
||||||
|
&trans &none &none &none &kp DOWN &kp C_VOL_DN /**/ &none &none &none &none &none &trans
|
||||||
|
&trans &trans &trans &none &trans /**/ &trans &trans &trans &trans &trans
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---------------------------------------------- ----------------------------------------------
|
||||||
|
// | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F1O | F11 | | F12 |
|
||||||
|
// | CAP | | home| PgUp | End | | | | | | | | |
|
||||||
|
// | trans | RGB T | RGB M | PgDn | | | BT_NXT | BT_CLR | | | | |trans|
|
||||||
|
// | trans | trans| trans | trans | | trans | trans | trans | trans | trans |
|
||||||
|
// ------------------------------------------- -----------------------------------------------
|
||||||
|
|
||||||
|
fn_layer {
|
||||||
|
bindings = <
|
||||||
|
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 /**/ &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &none &kp F12
|
||||||
|
&kp CAPS &none &kp HOME &kp PG_UP &kp END &none /**/ &none &none &none &none &none &none
|
||||||
|
&trans &rgb_ug RGB_TOG &rgb_ug RGB_EFF &none &kp PG_DN &none /**/ &bt BT_NXT &bt BT_CLR &none &none &none &trans
|
||||||
|
&trans &trans &trans &none &trans /**/ &trans &trans &trans &trans &trans
|
||||||
|
>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
12
app/boards/shields/fourier/fourier.zmk.yml
Normal file
12
app/boards/shields/fourier/fourier.zmk.yml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
file_format: "1"
|
||||||
|
id: fourier
|
||||||
|
name: Fourier Rev. 1
|
||||||
|
type: shield
|
||||||
|
url: https://github.com/keebio/fourier
|
||||||
|
requires:
|
||||||
|
- pro_micro
|
||||||
|
features:
|
||||||
|
- keys
|
||||||
|
siblings:
|
||||||
|
- fourier_left
|
||||||
|
- fourier_right
|
18
app/boards/shields/fourier/fourier_left.overlay
Normal file
18
app/boards/shields/fourier/fourier_left.overlay
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2021 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "fourier.dtsi"
|
||||||
|
|
||||||
|
&kscan0 {
|
||||||
|
col-gpios
|
||||||
|
= <&pro_micro 20 GPIO_ACTIVE_HIGH> // Col1
|
||||||
|
, <&pro_micro 19 GPIO_ACTIVE_HIGH> // Col2
|
||||||
|
, <&pro_micro 18 GPIO_ACTIVE_HIGH> // Col3
|
||||||
|
, <&pro_micro 15 GPIO_ACTIVE_HIGH> // Col4
|
||||||
|
, <&pro_micro 14 GPIO_ACTIVE_HIGH> // Col5
|
||||||
|
, <&pro_micro 16 GPIO_ACTIVE_HIGH> // Col6
|
||||||
|
;
|
||||||
|
};
|
23
app/boards/shields/fourier/fourier_right.overlay
Normal file
23
app/boards/shields/fourier/fourier_right.overlay
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2021 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "fourier.dtsi"
|
||||||
|
|
||||||
|
&default_transform {
|
||||||
|
col-offset = <6>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&kscan0 {
|
||||||
|
col-gpios
|
||||||
|
= <&pro_micro 20 GPIO_ACTIVE_HIGH> // Col1
|
||||||
|
, <&pro_micro 19 GPIO_ACTIVE_HIGH> // Col2
|
||||||
|
, <&pro_micro 18 GPIO_ACTIVE_HIGH> // Col3
|
||||||
|
, <&pro_micro 15 GPIO_ACTIVE_HIGH> // Col4
|
||||||
|
, <&pro_micro 14 GPIO_ACTIVE_HIGH> // Col5
|
||||||
|
, <&pro_micro 16 GPIO_ACTIVE_HIGH> // Col6
|
||||||
|
, <&pro_micro 10 GPIO_ACTIVE_HIGH> // Col7
|
||||||
|
;
|
||||||
|
};
|
Loading…
Reference in a new issue