init
This commit is contained in:
commit
7d428dfce9
9
Kconfig.defconfig
Normal file
9
Kconfig.defconfig
Normal file
@ -0,0 +1,9 @@
|
||||
# Copyright (c) 2021 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
if SHIELD_CHOCTOPUS44
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "Choctopus44"
|
||||
|
||||
endif
|
5
Kconfig.shield
Normal file
5
Kconfig.shield
Normal file
@ -0,0 +1,5 @@
|
||||
# Copyright (c) 2021 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config SHIELD_CHOCTOPUS44
|
||||
def_bool $(shields_list_contains,choctopus44)
|
4
choctopus44.conf
Normal file
4
choctopus44.conf
Normal file
@ -0,0 +1,4 @@
|
||||
#Uncomment to enable encoder
|
||||
CONFIG_EC11=y
|
||||
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
||||
CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y
|
66
choctopus44.dtsi
Executable file
66
choctopus44.dtsi
Executable file
@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright (c) 2021 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <dt-bindings/zmk/matrix_transform.h>
|
||||
|
||||
/ {
|
||||
|
||||
chosen {
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,battery = &vbatt;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
};
|
||||
|
||||
vbatt: vbatt {
|
||||
compatible = "zmk,battery-nrf-vddh";
|
||||
label = "VBATT";
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <6>;
|
||||
rows = <7>;
|
||||
|
||||
map = <
|
||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5)
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5)
|
||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(6,0) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5)
|
||||
RC(6,2) RC(6,3) RC(6,4) RC(6,5) RC(7,0) RC(7,1) RC(7,2) RC(7,3)
|
||||
>;
|
||||
};
|
||||
|
||||
kscan0: kscan_0 {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
diode-direction = "col2row";
|
||||
|
||||
row-gpios
|
||||
= <&pro_micro_a 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro_a 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro_a 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro_a 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro_d 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro_d 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro_d 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro_d 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
;
|
||||
};
|
||||
|
||||
middle_encoder: encoder_middle {
|
||||
compatible = "alps,ec11";
|
||||
label = "MIDDLE_ENCODER";
|
||||
a-gpios = <&pro_micro_d 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&pro_micro_d 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
steps = <60>;
|
||||
status = "enabled";
|
||||
};
|
||||
|
||||
sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&middle_encoder>;
|
||||
triggers-per-rotation = <15>;
|
||||
};
|
||||
};
|
114
choctopus44.keymap
Normal file
114
choctopus44.keymap
Normal file
@ -0,0 +1,114 @@
|
||||
// vim:fileencoding=utf-8:foldmethod=marker:filetype=dts
|
||||
/*
|
||||
* Copyright (c) 2021 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <dt-bindings/zmk/bt.h>
|
||||
#include <dt-bindings/zmk/rgb.h>
|
||||
|
||||
#define COLEMAK 0
|
||||
// #define QWERTY 1
|
||||
#define LWR 1
|
||||
#define HIG 2
|
||||
#define ADJ 3
|
||||
#define NUM 4
|
||||
|
||||
&mt {
|
||||
tapping-term-ms = <140>;
|
||||
quick_tap_ms = <140>;
|
||||
};
|
||||
< {
|
||||
quick_tap_ms = <200>;
|
||||
};
|
||||
|
||||
/ {
|
||||
|
||||
behaviors {
|
||||
rot_kp: behavior_sensor_rotate_kp {
|
||||
compatible = "zmk,behavior-sensor-rotate";
|
||||
label = "ENC_KP";
|
||||
#sensor-binding-cells = <0>;
|
||||
bindings = <&kp PG_UP>, <&kp PG_DN>;
|
||||
};
|
||||
rot_kpp: behavior_sensor_rotate_kpp {
|
||||
compatible = "zmk,behavior-sensor-rotate";
|
||||
label = "ENC_KPP";
|
||||
#sensor-binding-cells = <0>;
|
||||
bindings = <&kp C_VOL_UP>, <&kp C_VOL_DN>;
|
||||
};
|
||||
rot_kppp: behavior_sensor_rotate_kppp {
|
||||
compatible = "zmk,behavior-sensor-rotate";
|
||||
label = "ENC_KPPP";
|
||||
#sensor-binding-cells = <0>;
|
||||
bindings = <&kp C_BRI_UP>, <&kp C_BRI_DN>;
|
||||
};
|
||||
};
|
||||
|
||||
keymap {
|
||||
compatible = "zmk,keymap";
|
||||
|
||||
|
||||
default_layer {
|
||||
bindings = <
|
||||
&kp GRAVE &kp Q &kp W &kp F &kp P &kp B &kp J &kp L &kp U &kp Y &kp SEMI &kp BSLH
|
||||
&mt LCTL ESC &kp A &kp R &kp S < NUM T &kp G &kp H &kp N &kp E &kp I &kp O &kp SQT
|
||||
&kp LSHFT &kp Z &kp X &kp C &kp D &kp V &kp C_PLAY_PAUSE &kp K &kp M &kp COMMA &kp DOT &kp FSLH &mt RSHFT RET
|
||||
|
||||
&kp LGUI &kp LALT < LWR TAB &mt LSHFT SPACE < HIG RET &kp BSPC &kp RALT &kp PSCRN
|
||||
>;
|
||||
sensor-bindings = <&rot_kp>;
|
||||
};
|
||||
|
||||
// qwerty_layer {
|
||||
// bindings = <
|
||||
// &kp GRAVE &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT
|
||||
// &mt LCTL ESC &kp A &kp S &kp D < NUM F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
|
||||
// &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp C_PLAY_PAUSE &kp N &kp M &kp COMMA &kp DOT &kp FSLH &mt RSHFT RET
|
||||
// &kp LGUI &kp LALT < LWR TAB &mt LSHFT SPACE < HIG RET &kp BSPC &kp RALT &kp PSCRN
|
||||
// >;
|
||||
// sensor-bindings = <&rot_kp>;
|
||||
// };
|
||||
|
||||
lower_layer {
|
||||
bindings = <
|
||||
&trans &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS
|
||||
&trans &kp EXCL &kp ASTRK &kp PLUS &kp DLLR &kp EQUAL &kp PRCNT &kp LPAR &kp RPAR &kp LBRC &kp RBRC &kp GT
|
||||
&trans &kp AT &trans &kp MINUS &kp HASH &kp AMPS &kp C_PLAY_PAUSE &kp UNDER &kp LBKT &kp RBKT &kp CARET &trans &kp LT
|
||||
&trans &trans &trans &trans &mo ADJ &trans &trans &trans
|
||||
>;
|
||||
sensor-bindings = <&rot_kpp>;
|
||||
};
|
||||
|
||||
raise_layer {
|
||||
bindings = <
|
||||
&trans &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS
|
||||
&trans &trans &trans &trans &trans &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &trans
|
||||
&trans &trans &trans &trans &trans &trans &kp C_MUTE &trans &trans &trans &kp INSERT &kp HOME &kp END
|
||||
&trans &trans &mo LWR &trans &trans &trans &trans &trans
|
||||
>;
|
||||
sensor-bindings = <&rot_kppp>;
|
||||
};
|
||||
|
||||
adjust_layer {
|
||||
bindings = <
|
||||
&none &none &none &none &none &none &none &none &none &none &none &none
|
||||
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12
|
||||
&bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_CLR &kp C_MUTE &none &none &none &none &none &none
|
||||
&trans &trans &trans &trans &trans &trans &to COLEMAK &trans
|
||||
>;
|
||||
};
|
||||
|
||||
num_layer {
|
||||
bindings = <
|
||||
&trans &trans &trans &trans &trans &trans &kp PLUS &kp N7 &kp N8 &kp N9 &kp FSLH &trans
|
||||
&trans &trans &trans &trans &trans &trans &kp EQUAL &kp N4 &kp N5 &kp N6 &kp ASTRK &trans
|
||||
&trans &trans &trans &trans &trans &trans &kp C_MUTE &kp MINUS &kp N1 &kp N2 &kp N3 &trans &trans
|
||||
&trans &trans &trans &trans &trans &trans &kp N0 &trans
|
||||
>;
|
||||
};
|
||||
};
|
||||
};
|
33
choctopus44.overlay
Normal file
33
choctopus44.overlay
Normal file
@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (c) 2021 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
// #include <dt-bindings/zmk/matrix_transform.h>
|
||||
#include "choctopus44.dtsi"
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zmk,kscan = &kscan0;
|
||||
};
|
||||
|
||||
kscan0: kscan_0 {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
diode-direction = "col2row";
|
||||
|
||||
col-gpios
|
||||
= <&pro_micro_d 4 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_d 5 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_d 6 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_d 7 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_d 8 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro_d 9 GPIO_ACTIVE_HIGH>
|
||||
;
|
||||
};
|
||||
};
|
||||
|
||||
&middle_encoder {
|
||||
status = "okay";
|
||||
};
|
Loading…
Reference in New Issue
Block a user