reviung41-zmk-config/config/reviung41.keymap
2023-01-13 19:47:48 -05:00

91 lines
3.9 KiB
Plaintext

/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
/*
* Temporarily here because nice nano v2 spi is not defined on ZMk Yet
* Source: https://github.com/zmkfirmware/zmk/blob/main/app/boards/shields/reviung41/boards/nice_nano.overlay
* GitHub Issue: https://github.com/zmkfirmware/zmk/issues/885
*/
#include <dt-bindings/led/led.h>
&spi1 {
compatible = "nordic,nrf-spim";
status = "okay";
mosi-pin = <6>;
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
sck-pin = <5>;
miso-pin = <7>;
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
label = "WS2812";
/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <4000000>;
/* WS2812 */
chain-length = <11>; /* arbitrary; change at will */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
};
};
/ {
chosen {
zmk,underglow = &led_strip;
};
};
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/rgb.h>
/ {
keymap {
compatible = "zmk,keymap";
default_layer {/
// -------------------------------------------------------------------------------------
// | TAB | Q | W | E | R | T | | Y | U | I | O | P | BKSP |
// | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' |
// | SHFT | Z | X | C | V | B | | N | M | , | . | / | SHFT(RET) |
// | ALT | LWR | SPC | RSE | ALT |
bindings = <
&none &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC
&kp COLON &mt LCTRL A &mt LSHFT S &mt LALT D &mt LCMD F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
&nonw &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &mt RSHFT RET
&mo 2 &kp ESC &kp SPACE &mo 1 &mo 2
>;
};
symbols {
bindings = <
&none &kp EXCL &kp AT &kp LBRC &kp RBRC &kp PIPE &kp PLUS &kp STAR &kp PRCNT &none &none &none
&none &kp CARET &kp DLLR &kp LPAR &kp RPAR &kp GRAVE &kp UNDER &kp LBRC &kp RBRC &kp DQT &kp SQT &none
&none &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp TILDE &kp AMPS &kp LT &kp GT &kp HASH &kp BSLH &none
&kp LALT &mo 1 &kp SPACE &mo 2 &kp RALT
>;
};
adjust_layer {
// -----------------------------------------------------------------------------------------
// | RGB BRI+ | RGB SAT+ | RGB HUE+ | RGB ANI+ | | RGB TOG | | BT1 | BT2 | BT3 | BT4 | BT5 | BT CLR |
// | RGB BRI- | RGB SAT- | RGB HUE- | RGB ANI- | | | | | | | | | |
// | | | | | | | | RESET | | | | | |
// | | | | | |
bindings = <
&rgb_ug RGB_BRI &rgb_ug RGB_SAI &rgb_ug RGB_HUI &rgb_ug RGB_EFF &none &rgb_ug RGB_TOG &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_CLR
&rgb_ug RGB_BRD &rgb_ug RGB_SAD &rgb_ug RGB_HUD &rgb_ug RGB_EFR &none &none &none &none &none &none &none &none
&none &none &none &none &none &none &reset &none &none &none &none &none
&none &none &none &none &none
>;
};
};
};