Skip to content

Commit

Permalink
Move bt controls to a separate layer
Browse files Browse the repository at this point in the history
  • Loading branch information
arkrost committed Dec 24, 2023
1 parent d1f8c01 commit 71c76fb
Showing 1 changed file with 99 additions and 44 deletions.
143 changes: 99 additions & 44 deletions config/corne.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,110 @@
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
* To use home rows - &hm LSHFT F
*/

#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/outputs.h>

#define QWERTY 0
#define NUMB 1
#define NAVI 2
#define ADJUST 3

/ {
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 | , | . | / | ESC |
// | GUI | LWR | SPC | | ENT | RSE | ALT |
bindings = <
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC
&kp LCTRL &kp A &kp S &kp D &kp 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 N &kp M &kp COMMA &kp DOT &kp FSLH &kp ESC
&kp LGUI &mo 1 &kp SPACE &kp RET &mo 2 &kp RALT
>;
};
lower_layer {
// -----------------------------------------------------------------------------------------
// | TAB | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BKSP |
// | BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 | | LFT | DWN | UP | RGT | | |
// | SHFT | | | | | | | | | | | | |
// | GUI | | SPC | | ENT | | ALT |
bindings = <
&kp TAB &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &trans
&kp LSHFT &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT
>;
};

raise_layer {
// -----------------------------------------------------------------------------------------
// | TAB | ! | @ | # | $ | % | | ^ | & | * | ( | ) | BKSP |
// | CTRL | | | | | | | - | = | [ | ] | \ | ` |
// | SHFT | | | | | | | _ | + | { | } | "|" | ~ |
// | GUI | | SPC | | ENT | | ALT |
bindings = <
&kp TAB &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp BSPC
&kp LCTRL &trans &trans &trans &trans &trans &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE
&kp LSHFT &trans &trans &trans &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE
&kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT
>;
};
behaviors {
hm: homerow_mods {
compatible = "zmk,behavior-hold-tap";
label = "HOMEROW_MODS";
#binding-cells = <2>;
tapping-term-ms = <150>;
quick_tap_ms = <0>;
flavor = "tap-preferred";
bindings = <&kp>, <&kp>;
};
};

keymap {
compatible = "zmk,keymap";

default_layer {
// .--------------------------------------------------------------. .-----------------------------------------------------------.
// | ESC | Q | W | E | R | T | | Y | U | I | O | P | \ |
// |--------------+---------+--------+--------+---------+---------| |-------+---------+---------+---------+----------+----------|
// | CTRL/Tab | A | S | D | F | G | | H | J | K | L | ; | ' |
// |--------------+---------+--------+--------+---------+---------| |-------+---------+---------+---------+----------+----------|
// | SHFT | Z | X | C | V | B | | N | M | , | . | / | ` | ALT |
// '---------------------------------+--------+---------+---------+ |-------+---------+---------+-------------------------------'
// | GUI | MO1 | ENT | | SPC | BKSP | CAPS |
// '--------+---------+---------' '-------+---------+---------'

bindings = <
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BACKSPACE
&kp RCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
&kp LEFT_SHIFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp ESCAPE
&kp LGUI &mo 1 &kp ENTER &kp SPACE &lt 2 BACKSPACE &kp LALT
>;
};

lower_layer {
// .--------------------------------------------------------------. .-----------------------------------------------------------.
// | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` |
// |--------------+---------+--------+--------+---------+---------| |-------+---------+---------+---------+----------+----------|
// | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | : |
// |--------------+---------+--------+--------+---------+---------| |-------+---------+---------+---------+----------+----------|
// | SHFT | | + | - | { | [ | | ] | } | = | _ | | |
// '---------------------------------+--------+---------+---------+ |-------+---------+---------+-------------------------------'
// | GUI | | MO3 | | , | . | ? |
// '--------+---------+---------' '-------+---------+---------'

bindings = <
&trans &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp PIPE
&trans &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp STAR &kp LPAR &kp COLON &kp BACKSLASH
&kp GRAVE &kp PLUS &kp MINUS &kp LEFT_PARENTHESIS &kp LEFT_BRACE &kp LEFT_BRACKET &kp RIGHT_BRACKET &kp RIGHT_BRACE &kp RIGHT_PARENTHESIS &kp UNDERSCORE &kp EQUAL &kp TILDE
&kp LGUI &trans &mo ADJUST &kp KP_N1 &kp KP_N2 &kp KP_N3
>;
};

raise_layer {
// .----------------------------------------------------------------. .-----------------------------------------------------------------.
// | CMD+SHIFT+4 | | PU | UP | PD | HOME | | HOME | PU | UP | PD | | CMD+SHIFT+4 |
// |----------------+-------+--------+--------+----------+----------| |---------+----------+---------+---------+----------+-------------|
// | | | LEFT | DOWN | RIGHT | END | | END | LEFT | DOWN | RIGHT | | |
// |----------------+-------+--------+--------+----------+----------| |---------+----------+---------+---------+----------+-------------|
// | OUT_TOG | | | |CTRL+LEFT |CTRL+RIGHT| |CTRL+LEFT|CTRL+RIGHT| | | | OUT_TOG |
// '---------------------------------+--------+----------+----------+ |---------+----------+---------+----------------------------------'
// | GUI | MO3 | | | | | |
// '--------+----------+----------' '---------+----------+---------'

bindings = <
&trans &trans &kp PAGE_UP &kp UP_ARROW &kp PAGE_DOWN &kp HOME &trans &trans &trans &trans &trans &trans
&trans &trans &kp LEFT_ARROW &kp DOWN_ARROW &kp RIGHT_ARROW &kp END &kp LEFT &kp DOWN_ARROW &kp UP_ARROW &kp RIGHT_ARROW &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &mo ADJUST &trans &trans &trans &trans
>;
};

adjust_layer {
// .--------------------------------------------------------. .--------------------------------------------------------------.
// | | | | | | | | VOL+ | | | | | |
// |---------+--------+--------+--------+---------+---------| |--------+--------+---------+---------+----------+-------------|
// | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | VOL- | | | | | |
// |---------+--------+--------+--------+---------+---------| |--------+--------+---------+---------+----------+-------------|
// | | | | | | | | | | | | | |
// '---------------------------+--------+---------+---------+ |--------+--------+---------+----------------------------------'
// | | | | | | | |
// '--------+---------+---------' '--------+--------+---------'

bindings = <
&reset &trans &trans &trans &trans &trans &kp C_VOLUME_UP &kp C_BRIGHTNESS_INC &trans &trans &trans &reset
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &kp C_VOLUME_DOWN &kp C_BRIGHTNESS_DEC &trans &trans &trans &trans
&out OUT_TOG &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans
>;
};
};
};

0 comments on commit 71c76fb

Please sign in to comment.