forked from kofal.net/zmk
refactor(shields): MurphPad
* Added matrix transforms and physical layouts for three typical configurations. * Tweaked default keymap to be more immediately useful for ZMK and more closely resemble the default keymaps of non-ZMK firmware. * Board-specific Kconfig settings migrated to main shield file, so they will be exposed to end-users through the setup script. * Tidied formatting and shortened overlong layer labels. * Aligned encoder configuration with current standards. * Corrected default number of RGB LEDs. * Enabled OLED by default in a less authoritarian way.
This commit is contained in:
@@ -7,16 +7,16 @@
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <dt-bindings/zmk/bt.h>
|
||||
#include <dt-bindings/zmk/outputs.h>
|
||||
#include <dt-bindings/zmk/rgb.h>
|
||||
|
||||
|
||||
#define TIMEOUT 300
|
||||
|
||||
&encoder_1 {
|
||||
&middle_left_encoder {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&encoder_2 {
|
||||
&top_right_encoder {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -25,62 +25,59 @@
|
||||
compatible = "zmk,combos";
|
||||
combo_btclr {
|
||||
timeout-ms = <TIMEOUT>;
|
||||
key-positions = <1 6>;
|
||||
key-positions = <0 4>;
|
||||
bindings = <&bt BT_CLR>;
|
||||
};
|
||||
combo_reset {
|
||||
timeout-ms = <TIMEOUT>;
|
||||
key-positions = <1 3>;
|
||||
key-positions = <0 2>;
|
||||
bindings = <&sys_reset>;
|
||||
};
|
||||
combo_bootloader {
|
||||
timeout-ms = <TIMEOUT>;
|
||||
key-positions = <1 2>;
|
||||
key-positions = <0 1>;
|
||||
bindings = <&bootloader>;
|
||||
};
|
||||
combo_bt_nxt {
|
||||
timeout-ms = <TIMEOUT>;
|
||||
key-positions = <1 4>;
|
||||
key-positions = <0 3>;
|
||||
bindings = <&bt BT_NXT>;
|
||||
};
|
||||
};
|
||||
|
||||
sensors: sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&encoder_1 &encoder_2>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
|
||||
|
||||
keymap0: keymap {
|
||||
keymap: keymap {
|
||||
compatible = "zmk,keymap";
|
||||
|
||||
default_layer {
|
||||
display-name = "default layer";
|
||||
display-name = "default";
|
||||
bindings = <
|
||||
&bt BT_CLR &kp TAB &kp F5 &kp LC(LA(C)) &kp LG(D)
|
||||
&rgb_ug RGB_TOG &kp ESC &kp KP_DIVIDE &kp KP_MULTIPLY &kp KP_MINUS
|
||||
&rgb_ug RGB_EFF &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_PLUS
|
||||
&kp C_MUTE &kp KP_N4 &kp KP_N5 &kp KP_N6 &trans
|
||||
&mo 1 &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_ENTER
|
||||
&kp BSPC &kp KP_N0 &trans &kp KP_DOT &trans
|
||||
&kp F1 &kp F2 &kp F3 &kp F4
|
||||
&kp KP_NUM &kp KP_DIVIDE &kp KP_MULTIPLY &kp KP_MINUS
|
||||
&kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_PLUS
|
||||
&kp C_MUTE &kp KP_N4 &kp KP_N5 &kp KP_N6 &trans
|
||||
&mo 1 &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_ENTER
|
||||
&kp BSPC &kp KP_N0 &trans &kp KP_DOT &trans
|
||||
|
||||
&bt BT_CLR &rgb_ug RGB_TOG &rgb_ug RGB_EFF
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
|
||||
|
||||
};
|
||||
|
||||
fn_layer {
|
||||
display-name = "fn layer";
|
||||
display-name = "fn";
|
||||
bindings = <
|
||||
&trans &trans &trans &trans &trans
|
||||
&trans &kp KP_NUM &trans &trans &trans
|
||||
&trans &trans &trans &trans &trans
|
||||
&bt BT_CLR &trans &trans &trans &trans
|
||||
&trans &trans &trans &trans &trans
|
||||
&kp DEL &trans &trans &trans &trans
|
||||
&out OUT_TOG &bt BT_PRV &bt BT_NXT &trans
|
||||
&trans &trans &trans &trans
|
||||
&rgb_ug RGB_HUD &rgb_ug RGB_SPI &rgb_ug RGB_HUI &trans
|
||||
&bt BT_CLR &rgb_ug RGB_EFR &rgb_ug RGB_TOG &rgb_ug RGB_EFF &trans
|
||||
&trans &rgb_ug RGB_BRD &rgb_ug RGB_SPD &rgb_ug RGB_BRI &trans
|
||||
&kp DEL &rgb_ug RGB_SAD &trans &rgb_ug RGB_SAI &trans
|
||||
|
||||
&trans &trans &trans
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp PG_UP PG_DN &inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user