Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c5e94061c | ||
|
|
1426ffc0ee | ||
|
|
f544b60aaa | ||
|
|
7725d813c9 | ||
|
|
60a39f4f5d | ||
|
|
df57590ec6 | ||
|
|
b7fe24923e | ||
|
|
067a6f0174 | ||
|
|
189e0d5b98 | ||
|
|
56e5a83e68 | ||
|
|
34f3918244 | ||
|
|
f3a1629469 | ||
|
|
3d922e6257 |
No files matched your search
@@ -81,3 +81,20 @@ void encoder_update_user(uint8_t index, bool clockwise) {
|
|||||||
## Hardware
|
## Hardware
|
||||||
|
|
||||||
The A an B lines of the encoders should be wired directly to the MCU, and the C/common lines should be wired to ground.
|
The A an B lines of the encoders should be wired directly to the MCU, and the C/common lines should be wired to ground.
|
||||||
|
|
||||||
|
## Multiple Encoders
|
||||||
|
|
||||||
|
Multiple encoders may share pins so long as each encoder has a distinct pair of pins.
|
||||||
|
|
||||||
|
For example you can support two encoders using only 3 pins like this
|
||||||
|
```
|
||||||
|
#define ENCODERS_PAD_A { B1, B1 }
|
||||||
|
#define ENCODERS_PAD_B { B2, B3 }
|
||||||
|
```
|
||||||
|
|
||||||
|
You could even support three encoders using only three pins (one per encoder) however in this configuration, rotating two encoders which share pins simultaneously will often generate incorrect output. For example:
|
||||||
|
```
|
||||||
|
#define ENCODERS_PAD_A { B1, B1, B2 }
|
||||||
|
#define ENCODERS_PAD_B { B2, B3, B3 }
|
||||||
|
```
|
||||||
|
Here rotating Encoder 0 `B1 B2` and Encoder 1 `B1 B3` could be interpreted as rotating Encoder 2 `B2 B3` or `B3 B2` depending on the timing. This may still be a useful configuration depending on your use case
|
||||||
@@ -104,19 +104,13 @@ You can also try the `qmk-git` package from AUR:
|
|||||||
|
|
||||||
### ** FreeBSD **
|
### ** FreeBSD **
|
||||||
|
|
||||||
#### Prerequisites
|
|
||||||
|
|
||||||
You will need to install Git and Python. It's possible that you already have both, but if not, run the following commands to install them:
|
|
||||||
|
|
||||||
pkg install git python3
|
|
||||||
|
|
||||||
Make sure that `$HOME/.local/bin` is added to your `$PATH` so that locally installed Python packages are available.
|
|
||||||
|
|
||||||
#### Installation
|
#### Installation
|
||||||
|
|
||||||
Install the QMK CLI by running:
|
Install the FreeBSD package for QMK CLI by running:
|
||||||
|
|
||||||
python3 -m pip install --user qmk
|
pkg install -g "py*-qmk"
|
||||||
|
|
||||||
|
NOTE: remember to follow the instructions printed at the end of installation (use `pkg info -Dg "py*-qmk"` to show them again).
|
||||||
|
|
||||||
<!-- tabs:end -->
|
<!-- tabs:end -->
|
||||||
|
|
||||||
@@ -162,12 +156,6 @@ After installing QMK you can set it up with this command:
|
|||||||
|
|
||||||
In most situations you will want to answer `y` to all of the prompts.
|
In most situations you will want to answer `y` to all of the prompts.
|
||||||
|
|
||||||
?>**Note on FreeBSD**:
|
|
||||||
It is suggested to run `qmk setup` as a non-`root` user to start with, but this will likely identify packages that need to be installed to your
|
|
||||||
base system using `pkg`. However the installation will probably fail when run as an unprivileged user.
|
|
||||||
To manually install the base dependencies, run `./util/qmk_install.sh` either as `root`, or with `sudo`.
|
|
||||||
Once that completes, re-run `qmk setup` to complete the setup and checks.
|
|
||||||
|
|
||||||
<!-- tabs:end -->
|
<!-- tabs:end -->
|
||||||
|
|
||||||
?> The qmk home folder can be specified at setup with `qmk setup -H <path>`, and modified afterwards using the [cli configuration](cli_configuration.md?id=single-key-example) and the variable `user.qmk_home`. For all available options run `qmk setup --help`.
|
?> The qmk home folder can be specified at setup with `qmk setup -H <path>`, and modified afterwards using the [cli configuration](cli_configuration.md?id=single-key-example) and the variable `user.qmk_home`. For all available options run `qmk setup --help`.
|
||||||
|
|||||||
@@ -34,14 +34,14 @@
|
|||||||
typedef union {
|
typedef union {
|
||||||
uint32_t raw;
|
uint32_t raw;
|
||||||
struct {
|
struct {
|
||||||
bool enable : 1;
|
bool enable : 1;
|
||||||
uint8_t feedback : 2;
|
uint8_t feedback : 2;
|
||||||
uint8_t mode : 7;
|
uint8_t mode : 7;
|
||||||
bool buzz : 1;
|
bool buzz : 1;
|
||||||
uint8_t dwell : 7;
|
uint8_t dwell : 7;
|
||||||
bool cont : 1;
|
bool cont : 1;
|
||||||
uint8_t amplitude : 8;
|
uint8_t amplitude : 8;
|
||||||
uint16_t reserved : 7;
|
uint8_t reserved : 5;
|
||||||
};
|
};
|
||||||
} haptic_config_t;
|
} haptic_config_t;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
/* Copyright 2021 Stanrc85
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "stanrc85.h"
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_QWERTY] = LAYOUT(
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_PGUP,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN,
|
||||||
|
KC_CTLE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, MO(_FN2_60),
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
|
||||||
|
KC_LCTL, KC_LALT, LT_BPCF, KC_LGUI, LT_SPCF, TD_TWIN, KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
[_DEFAULT] = LAYOUT(
|
||||||
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PGUP,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGDN,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, MO(_FN2_60),
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
|
||||||
|
KC_LCTL, KC_LALT, KC_SPC, MO(_FN1_60), KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
[_FN1_60] = LAYOUT(
|
||||||
|
KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, _______,
|
||||||
|
_______, _______, CA_QUOT, _______, CA_SCLN, KC_VOLU, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PSCR, _______, _______, KC_INS, _______,
|
||||||
|
KC_CAPS, _______, _______, KC_LCTL, KC_LSFT, KC_VOLD, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______,
|
||||||
|
_______, KC_RDP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[_FN2_60] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MAKE, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, TG(_DEFAULT)
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
USER_NAME := stanrc85
|
||||||
@@ -711,7 +711,7 @@
|
|||||||
|
|
||||||
/* LAYOUT_64_ansi
|
/* LAYOUT_64_ansi
|
||||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
* │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0d │
|
* │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0e │
|
||||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
* │10 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │1d │1e │
|
* │10 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │1d │1e │
|
||||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
|
||||||
@@ -723,15 +723,15 @@
|
|||||||
* └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘
|
* └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘
|
||||||
*/
|
*/
|
||||||
#define LAYOUT_64_ansi( \
|
#define LAYOUT_64_ansi( \
|
||||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \
|
||||||
k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \
|
k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \
|
||||||
k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \
|
k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \
|
||||||
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \
|
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \
|
||||||
k40, k41, k43, k46, k4a, k4b, k4c, k4d, k4e \
|
k40, k41, k43, k46, k4a, k4b, k4c, k4d, k4e \
|
||||||
) { \
|
) { \
|
||||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, KC_NO }, \
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO, k0e }, \
|
||||||
{ k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \
|
{ k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \
|
||||||
{ k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \
|
{ k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \
|
||||||
{ k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e }, \
|
{ k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e }, \
|
||||||
{ k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4a, k4b, k4c, k4d, k4e } \
|
{ k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4a, k4b, k4c, k4d, k4e } \
|
||||||
}
|
}
|
||||||
@@ -17,6 +17,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
|
||||||
/* Use I2C or Serial, not both */
|
/* Use I2C or Serial, not both */
|
||||||
|
|
||||||
#define USE_SERIAL
|
#define USE_SERIAL
|
||||||
|
|||||||
@@ -16,8 +16,6 @@ enum custom_keycodes {
|
|||||||
CHUS,
|
CHUS,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define KC_ KC_TRNS
|
|
||||||
|
|
||||||
#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen
|
#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen
|
||||||
#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen
|
#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen
|
||||||
#define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen
|
#define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen
|
||||||
@@ -49,46 +47,47 @@ enum custom_keycodes {
|
|||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
[_QWERTY] = LAYOUT_kc(
|
[_QWERTY] = LAYOUT(
|
||||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
//,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------.
|
||||||
GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
|
KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_BSPC,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||||
TAB , Q , W , E , R , T , Y , U , I , O , P ,BSLS,
|
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_BSLS,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||||
ESC , A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
|
KC_ESC , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT,
|
||||||
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
//|-------+-------+-------+-------+-------+-------+-------. ,-------|-------+-------+-------+-------+-------+-------|
|
||||||
LSBR, Z , X , C , V , B ,TT_L, TT_R, N , M ,COMM,DOT ,SLSH,RSBR,
|
KC_LSBR, KC_Z , KC_X , KC_C , KC_V , KC_B ,KC_TT_L, KC_TT_R, KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_RSBR,
|
||||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
//`-------+-------+-------+---+---+-------+-------+-------/ \-------+-------+-------+---+---+-------+-------+-------'
|
||||||
LCTL,SMIN,LGUI, ENT ,SPC ,LALT
|
KC_LCTL,KC_SMIN,KC_LGUI, KC_ENT ,KC_SPC ,KC_LALT
|
||||||
// `----+----+----' `----+----+----'
|
// `-------+-------+-------' `-------+-------+-------'
|
||||||
),
|
),
|
||||||
|
|
||||||
[_LOWER] = LAYOUT_kc(
|
[_LOWER] = LAYOUT(
|
||||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
//,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------.
|
||||||
TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,MINS,EQL , ,
|
KC_TILD,KC_EXLM, KC_AT ,KC_HASH,KC_DLR ,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_MINS,KC_EQL ,_______,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||||
,SLOK, , UP , ,RGBT, P7 , P8 , P9 , E , F ,LPRN,
|
_______,KC_SLOK,_______, KC_UP ,_______,KC_RGBT, KC_P7 , KC_P8 , KC_P9 , KC_E , KC_F ,KC_LPRN,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||||
DEL , ,LEFT,DOWN,RGHT,GUSR, P4 , P5 , P6 , C , D ,RPRN,
|
KC_DEL ,_______,KC_LEFT,KC_DOWN,KC_RGHT,KC_GUSR, KC_P4 , KC_P5 , KC_P6 , KC_C , KC_D ,KC_RPRN,
|
||||||
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
//|-------+-------+-------+-------+-------+-------+-------. ,-------|-------+-------+-------+-------+-------+-------|
|
||||||
BL_S, , , ,HGRP,CHUS, , , P1 , P2 , P3 , A , B , ,
|
KC_BL_S,_______,_______,_______,KC_HGRP,KC_CHUS,_______, _______, KC_P1 , KC_P2 , KC_P3 , KC_A , KC_B ,_______,
|
||||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
//`-------+-------+-------+---+---+-------+-------+-------/ \-------+-------+-------+---+---+-------+-------+-------'
|
||||||
, , , DOT , P0 ,COLN
|
_______,_______,_______, KC_DOT , KC_P0 ,KC_COLN
|
||||||
// `----+----+----' `----+----+----'
|
// `-------+-------+-------' `-------+-------+-------'
|
||||||
),
|
),
|
||||||
|
|
||||||
[_RAISE] = LAYOUT_kc(
|
[_RAISE] = LAYOUT(
|
||||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
//,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------.
|
||||||
F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
|
KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 ,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||||
,RGBT,RGBM, , , , ,AMPR,MUTE, , , ,
|
_______,KC_RGBT,KC_RGBM,_______,_______,_______, _______,KC_AMPR,KC_MUTE,_______,_______,_______,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||||
,CAPW,CPYW,CAPP,CPYP,PGUP, EQL ,HOME,VOLU,MRWD,MFFD, ,
|
_______,KC_CAPW,KC_CPYW,KC_CAPP,KC_CPYP,KC_PGUP, KC_EQL ,KC_HOME,KC_VOLU,KC_MRWD,KC_MFFD,_______,
|
||||||
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
//|-------+-------+-------+-------+-------+-------+-------. ,-------|-------+-------+-------+-------+-------+-------|
|
||||||
, , , , ,PGDN, , ,PLUS,END ,VOLD,MPLY,MSTP, ,
|
_______,_______,_______,_______,_______,KC_PGDN,_______, _______,KC_PLUS,KC_END ,KC_VOLD,KC_MPLY,KC_MSTP,_______,
|
||||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
//`-------+-------+-------+---+---+-------+-------+-------/ \-------+-------+-------+---+---+-------+-------+-------'
|
||||||
, , , , ,
|
_______,_______,_______, _______,_______,_______
|
||||||
// `----+----+----' `----+----+----'
|
// `-------+-------+-------' `-------+-------+-------'
|
||||||
|
|
||||||
),
|
),
|
||||||
|
|
||||||
[_ADJUST] = LAYOUT(
|
[_ADJUST] = LAYOUT(
|
||||||
|
|||||||
@@ -30,32 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#undef RGBLED_NUM
|
#undef RGBLED_NUM
|
||||||
#define RGBLED_NUM 8
|
#define RGBLED_NUM 8
|
||||||
#define RGBLIGHT_ANIMATIONS
|
|
||||||
#define RGBLIGHT_SLEEP
|
|
||||||
#define RGBLIGHT_HUE_STEP 8
|
|
||||||
#define RGBLIGHT_SAT_STEP 8
|
|
||||||
#define RGBLIGHT_VAL_STEP 8
|
|
||||||
#undef RGBLED_SPLIT
|
#undef RGBLED_SPLIT
|
||||||
#define RGBLED_SPLIT { RGBLED_NUM, 0} // defined to sync animations
|
#define RGBLED_SPLIT { RGBLED_NUM, 0}
|
||||||
|
|
||||||
#define FORCE_NKRO // force NKRO on by default
|
|
||||||
|
|
||||||
#undef TAPPING_TERM
|
|
||||||
#define TAPPING_TERM 200
|
|
||||||
|
|
||||||
|
|
||||||
#if !defined(NO_DEBUG) && !defined(CONSOLE_ENABLE)
|
|
||||||
#define NO_DEBUG
|
|
||||||
#endif // !NO_DEBUG
|
|
||||||
#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE)
|
|
||||||
#define NO_PRINT
|
|
||||||
#endif // !NO_PRINT
|
|
||||||
|
|
||||||
#define NO_MUSIC_MODE
|
|
||||||
|
|
||||||
// Override caps lock indication from my userspace
|
|
||||||
//#undef NORMAL_MODE
|
|
||||||
//#define NORMAL_MODE 1
|
|
||||||
|
|
||||||
//#undef CAPS_LOCK_MODE
|
|
||||||
//#define CAPS_LOCK_MODE 28
|
|
||||||
@@ -1,26 +1,24 @@
|
|||||||
#include QMK_KEYBOARD_H
|
/* Copyright 2021 SethBarberee <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
#include "sethBarberee.h"
|
#include "sethBarberee.h"
|
||||||
|
|
||||||
extern backlight_config_t backlight_config;
|
extern backlight_config_t backlight_config;
|
||||||
|
|
||||||
enum layers {
|
|
||||||
_QWERTY,
|
|
||||||
_LOWER,
|
|
||||||
_RAISE,
|
|
||||||
_ADJUST
|
|
||||||
};
|
|
||||||
|
|
||||||
enum custom_keycodes {
|
|
||||||
QWERTY = SAFE_RANGE,
|
|
||||||
LOWER,
|
|
||||||
RAISE,
|
|
||||||
ADJUST,
|
|
||||||
};
|
|
||||||
|
|
||||||
#define KC_ KC_TRNS
|
#define KC_ KC_TRNS
|
||||||
|
|
||||||
#define KC_LOWR LOWER
|
|
||||||
#define KC_RASE RAISE
|
|
||||||
#define KC_RST RESET
|
#define KC_RST RESET
|
||||||
#define KC_BL_S BL_STEP
|
#define KC_BL_S BL_STEP
|
||||||
#define KC_RTOG RGB_TOG
|
#define KC_RTOG RGB_TOG
|
||||||
@@ -33,147 +31,54 @@ enum custom_keycodes {
|
|||||||
#define KC_RVAD RGB_VAD
|
#define KC_RVAD RGB_VAD
|
||||||
#define KC_VK VLK_TOG
|
#define KC_VK VLK_TOG
|
||||||
|
|
||||||
|
#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
[_QWERTY] = LAYOUT_kc(
|
[_QWERTY] = LAYOUT_wrapper(
|
||||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
KC_ECAP, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS,
|
||||||
ECAP, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,
|
KC_TAB , _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_DEL ,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
KC_LSFT, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
|
||||||
TAB , Q , W , E , R , T , Y , U , I , O , P ,DEL ,
|
KC_LCTL, _________________QWERTY_L3_________________, KC_SPC, KC_RASE, _________________QWERTY_R3_________________,KC_RSFT,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
KC_LGUI, KC_LOWR, KC_SPC, KC_BSPC , KC_ENT, KC_LALT
|
||||||
LSFT, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
|
|
||||||
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
|
||||||
LCTL, Z , X , C , V , B , SPC, RASE, N , M ,COMM,DOT ,SLSH,RSFT,
|
|
||||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
|
||||||
LGUI,LOWR, SPC, BSPC ,ENT,LALT
|
|
||||||
// `----+----+----' `----+----+----'
|
|
||||||
),
|
),
|
||||||
|
|
||||||
[_LOWER] = LAYOUT_kc(
|
[_LOWER] = LAYOUT(
|
||||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
KC_TILD,KC_EXLM, KC_AT ,KC_HASH,KC_DLR ,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_BSPC,
|
||||||
TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC,
|
KC_RST ,_______,_______, KC_UP ,_______,_______, KC_GRV , KC_P7 , KC_P8 , KC_P9 ,_______,_______,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
KC_DEL ,_______,KC_LEFT,KC_DOWN,KC_RGHT,KC_LBRC, KC_RBRC, KC_P4 , KC_P5 , KC_P6 ,KC_PLUS,KC_PIPE,
|
||||||
RST , , , UP , , , GRV , P7 , P8 , P9 , , ,
|
KC_BL_S,_______,_______,_______,_______,KC_LCBR,KC_LPRN, KC_RPRN,KC_RCBR, KC_P1 , KC_P2 , KC_P3 ,KC_MINS,_______,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
_______,_______,KC_LPRN, KC_DEL ,_______, KC_P0
|
||||||
DEL , ,LEFT,DOWN,RGHT,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE,
|
|
||||||
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
|
||||||
BL_S, , , , ,LCBR,LPRN, RPRN,RCBR, P1 , P2 , P3 ,MINS, ,
|
|
||||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
|
||||||
, ,LPRN , DEL , , P0
|
|
||||||
// `----+----+----' `----+----+----'
|
|
||||||
),
|
),
|
||||||
|
|
||||||
[_RAISE] = LAYOUT_kc(
|
[_RAISE] = LAYOUT(
|
||||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 ,
|
||||||
F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
|
_______,_______,_______,_______,_______,_______, _______, _______,_______,_______,_______,_______,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
_______,KC_MPRV,KC_MNXT,KC_VOLU,KC_PGUP,KC_UNDS, KC_EQL ,KC_HOME,_______,_______,_______,KC_BSLS,
|
||||||
, , , , , , , , , , , ,
|
KC_MUTE,KC_MSTP,KC_MPLY,KC_VOLD,KC_PGDN,KC_MINS,_______, _______,KC_PLUS,KC_END ,_______,_______,_______,_______,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
_______,_______,_______, _______,_______, _______
|
||||||
,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS,
|
|
||||||
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
|
||||||
MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , ,PLUS,END , , , , ,
|
|
||||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
|
||||||
, , , , ,
|
|
||||||
// `----+----+----' `----+----+----'
|
|
||||||
),
|
),
|
||||||
|
|
||||||
[_ADJUST] = LAYOUT_kc(
|
[_ADJUST] = LAYOUT(
|
||||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||||
, , , , , , , , , , , ,
|
_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
RTOG,RMOD,RHUI,RSAI,RVAI, , , , , , , ,
|
KC_RTOG,KC_RMOD,KC_RHUI,KC_RSAI,KC_RVAI,_______, _______,_______,_______,_______,_______,_______,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
VK, ,RHUD,RSAD,RVAD, , , , , , , ,
|
KC_VK, _______,KC_RHUD,KC_RSAD,KC_RVAD,_______, _______,_______,_______,_______,_______,_______,
|
||||||
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
||||||
BL_S,RST , , , , , , , , , , , , ,
|
KC_BL_S,KC_RST ,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______,
|
||||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||||
, , , , ,
|
_______,_______,_______, _______,_______, _______
|
||||||
// `----+----+----' `----+----+----'
|
// `----+----+----' `----+----+----'
|
||||||
)
|
)
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void keyboard_pre_init_user(void) {
|
void suspend_power_down_keymap(void){
|
||||||
// Make sure the red LEDs don't light
|
|
||||||
setPinOutput(D5);
|
|
||||||
writePinHigh(D5);
|
|
||||||
|
|
||||||
setPinOutput(B0);
|
|
||||||
writePinHigh(B0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void keyboard_post_init_user(void){
|
|
||||||
rgblight_enable_noeeprom(); // enable the RGBs
|
|
||||||
rgblight_sethsv_noeeprom_red(); // set to red
|
|
||||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); // set to breathing
|
|
||||||
}
|
|
||||||
|
|
||||||
void suspend_power_down_user(void){
|
|
||||||
backlight_config.enable = false; // disable LED backlight
|
backlight_config.enable = false; // disable LED backlight
|
||||||
}
|
}
|
||||||
|
|
||||||
void suspend_wakeup_init_user(void){
|
void suspend_wakeup_init_keymap(void){
|
||||||
backlight_config.enable = true; // enable LED backlight
|
backlight_config.enable = true; // enable LED backlight
|
||||||
}
|
}
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
||||||
switch (keycode) {
|
|
||||||
case QWERTY:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
set_single_persistent_default_layer(_QWERTY);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case LOWER:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
layer_on(_LOWER);
|
|
||||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
|
||||||
} else {
|
|
||||||
layer_off(_LOWER);
|
|
||||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case RAISE:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
layer_on(_RAISE);
|
|
||||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
|
||||||
} else {
|
|
||||||
layer_off(_RAISE);
|
|
||||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case ADJUST:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
layer_on(_ADJUST);
|
|
||||||
} else {
|
|
||||||
layer_off(_ADJUST);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t layer_state_set_user(uint32_t state){
|
|
||||||
switch(biton32(state)) {
|
|
||||||
case _QWERTY:
|
|
||||||
rgblight_sethsv_noeeprom(HSV_RED);
|
|
||||||
break;
|
|
||||||
case _LOWER:
|
|
||||||
rgblight_sethsv_noeeprom(HSV_GREEN);
|
|
||||||
break;
|
|
||||||
case _RAISE:
|
|
||||||
rgblight_sethsv_noeeprom(HSV_BLUE);
|
|
||||||
break;
|
|
||||||
case _ADJUST:
|
|
||||||
rgblight_sethsv_noeeprom(HSV_ORANGE);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_GRADIENT + 3);
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
return state;
|
|
||||||
}
|
|
||||||
@@ -1,9 +1,5 @@
|
|||||||
BOOTMAGIC_ENABLE = no
|
|
||||||
CONSOLE_ENABLE = no
|
CONSOLE_ENABLE = no
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
NKRO_ENABLE = yes
|
||||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
|
||||||
BACKLIGHT_ENABLE = yes # Enable my Red LEDS
|
|
||||||
RGBLIGHT_ENABLE = yes # Enable my RGBS
|
|
||||||
VELOCIKEY_ENABLE = yes # I like RGB
|
VELOCIKEY_ENABLE = yes # I like RGB
|
||||||
TAP_DANCE_ENABLE = yes # fancy fancy Caps
|
TAP_DANCE_ENABLE = yes # fancy fancy Caps
|
||||||
LTO_ENABLE = yes # Enable link time optimization
|
LTO_ENABLE = yes # Enable link time optimization
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 Danny Nguyen <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/* Use I2C or Serial, not both */
|
||||||
|
//
|
||||||
|
//#define USE_SERIAL
|
||||||
|
//#define USE_I2C
|
||||||
|
|
||||||
|
//#ifdef RGBLIGHT_ENABLE
|
||||||
|
//# ifdef NORMAL_MODE
|
||||||
|
//# undef NORMAL_MODE
|
||||||
|
//# define NORMAL_MODE RGBLIGHT_MODE_TWINKLE + 4
|
||||||
|
//# endif
|
||||||
|
//#endif
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
/* Copyright 2021 SethBarberee <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "sethBarberee.h"
|
||||||
|
|
||||||
|
#define LAYOUT_80_with_macro_wrapper(...) LAYOUT_80_with_macro(__VA_ARGS__)
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_QWERTY] = LAYOUT_80_with_macro_wrapper(
|
||||||
|
KC_MUTE, KC_ECAP, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, KC_F11, KC_F12, KC_DEL, KC_MUTE,
|
||||||
|
KC_F1, KC_F2, KC_GRV, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________,KC_MINS, KC_EQL, _______, KC_BSPC, KC_HOME,
|
||||||
|
KC_F3, KC_F4, KC_TAB, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_LBRC, KC_RBRC, KC_BSLS, KC_END,
|
||||||
|
KC_F5, KC_F6, KC_LSFT, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_ENT, KC_PGUP,
|
||||||
|
KC_F7, KC_F8, KC_LSFT, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, KC_RSFT, KC_UP, KC_PGDN,
|
||||||
|
KC_F9, KC_F10, KC_LCTL, KC_LALT, KC_LGUI, KC_LOWR, _______, KC_SPC, KC_RASE, KC_BSPC, KC_RALT, KC_RCTL, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
),
|
||||||
|
[_LOWER] = LAYOUT_80_with_macro_wrapper(
|
||||||
|
RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR,
|
||||||
|
RGB_HUI, RGB_HUD, KC_GESC, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, KC_F11, KC_F12, _______, _______, KC_MPRV,
|
||||||
|
RGB_SAI, RGB_SAD, RGB_TOG, _______, _______, _______, _______, KC_LPRN, KC_RPRN, _______, _______, _______, _______, _______, _______, _______, KC_MNXT,
|
||||||
|
RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, _______, _______, _______, _______, _______, _______, KC_VOLU,
|
||||||
|
RGB_MOD, RGB_RMOD, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, _______, KC_VOLD,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[_RAISE] = LAYOUT_80_with_macro_wrapper(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
RESET, KC_VRSN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[_ADJUST] = LAYOUT_80_with_macro_wrapper(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (index == 0) {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_PGDN);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_PGUP);
|
||||||
|
}
|
||||||
|
} else if (index == 1) {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_VOLU);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_VOLD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
BACKLIGHT_ENABLE=no
|
||||||
|
CONSOLE_ENABLE=no
|
||||||
|
TAP_DANCE_ENABLE=yes
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
/* Copyright 2021 Sean Johnson
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
#define STARTUP_SONG SONG(COLEMAK_SOUND)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Most tactile encoders have detents every 4 stages
|
||||||
|
#define ENCODER_RESOLUTION 4
|
||||||
@@ -0,0 +1,280 @@
|
|||||||
|
/* Copyright 2021 Sean Johnson
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "muse.h"
|
||||||
|
|
||||||
|
#define a KC_A
|
||||||
|
#define b KC_B
|
||||||
|
#define c KC_C
|
||||||
|
#define d KC_D
|
||||||
|
#define e KC_E
|
||||||
|
#define f KC_F
|
||||||
|
#define g KC_G
|
||||||
|
#define h KC_H
|
||||||
|
#define i KC_I
|
||||||
|
#define j KC_J
|
||||||
|
#define k KC_K
|
||||||
|
#define l KC_L
|
||||||
|
#define m KC_M
|
||||||
|
#define n KC_N
|
||||||
|
#define o KC_O
|
||||||
|
#define p KC_P
|
||||||
|
#define q KC_Q
|
||||||
|
#define r KC_R
|
||||||
|
#define s KC_S
|
||||||
|
#define t KC_T
|
||||||
|
#define u KC_U
|
||||||
|
#define v KC_V
|
||||||
|
#define w KC_W
|
||||||
|
#define x KC_X
|
||||||
|
#define y KC_Y
|
||||||
|
#define z KC_Z
|
||||||
|
|
||||||
|
#define lopt KC_LALT
|
||||||
|
#define lctl KC_LCTL
|
||||||
|
#define lsft KC_LSFT
|
||||||
|
#define ropt KC_RALT
|
||||||
|
#define rctl KC_RCTL
|
||||||
|
#define rsft KC_RSFT
|
||||||
|
|
||||||
|
#define n0 KC_0
|
||||||
|
#define n1 KC_1
|
||||||
|
#define n2 KC_2
|
||||||
|
#define n3 KC_3
|
||||||
|
#define n4 KC_4
|
||||||
|
#define n5 KC_5
|
||||||
|
#define n6 KC_6
|
||||||
|
#define n7 KC_7
|
||||||
|
#define n8 KC_8
|
||||||
|
#define n9 KC_9
|
||||||
|
|
||||||
|
#define bspc KC_BSPC
|
||||||
|
#define caps KC_CAPS
|
||||||
|
#define comm KC_COMM
|
||||||
|
#define dash A(KC_MINS)
|
||||||
|
#define scln KC_SCLN
|
||||||
|
#define slsh KC_SLSH
|
||||||
|
#define spc KC_SPC
|
||||||
|
#define tab KC_TAB
|
||||||
|
#define del KC_DEL
|
||||||
|
#define dot KC_DOT
|
||||||
|
#define ent KC_ENT
|
||||||
|
#define mins KC_MINS
|
||||||
|
#define quot KC_QUOT
|
||||||
|
#define esc KC_ESC
|
||||||
|
#define escg KC_GESC
|
||||||
|
|
||||||
|
#define down KC_DOWN
|
||||||
|
#define home G(KC_LEFT)
|
||||||
|
#define end G(KC_RGHT)
|
||||||
|
#define up KC_UP
|
||||||
|
#define pgdn KC_PGDN
|
||||||
|
#define pgup KC_PGUP
|
||||||
|
#define left KC_LEFT
|
||||||
|
#define rght KC_RGHT
|
||||||
|
|
||||||
|
#define tabl G(S(KC_LBRC))
|
||||||
|
#define tabr G(S(KC_RBRC))
|
||||||
|
#define fwd G(KC_RBRC)
|
||||||
|
#define back G(KC_LBRC)
|
||||||
|
#define dtl C(KC_LEFT)
|
||||||
|
#define dtr C(KC_RGHT)
|
||||||
|
#define slup S(A(KC_UP))
|
||||||
|
#define sldn S(A(KC_DOWN))
|
||||||
|
|
||||||
|
#define f1 KC_F1
|
||||||
|
#define f2 KC_F2
|
||||||
|
#define f3 KC_F3
|
||||||
|
#define f4 KC_F4
|
||||||
|
#define f5 KC_F5
|
||||||
|
#define f6 KC_F6
|
||||||
|
#define f7 KC_F7
|
||||||
|
#define f8 KC_F8
|
||||||
|
#define f9 KC_F9
|
||||||
|
#define f10 KC_F10
|
||||||
|
#define f11 KC_F11
|
||||||
|
#define f12 KC_F12
|
||||||
|
#define f13 KC_F13
|
||||||
|
#define f14 KC_F14
|
||||||
|
#define f15 KC_F15
|
||||||
|
#define f16 KC_F16
|
||||||
|
#define f17 KC_F17
|
||||||
|
#define f18 KC_F18
|
||||||
|
#define f19 KC_F19
|
||||||
|
#define f20 KC_F20
|
||||||
|
|
||||||
|
#define mute KC_MUTE
|
||||||
|
#define next KC_MNXT
|
||||||
|
#define play KC_MPLY
|
||||||
|
#define prev KC_MPRV
|
||||||
|
#define vold KC_VOLD
|
||||||
|
#define volu KC_VOLU
|
||||||
|
|
||||||
|
#define symb MO(SYMB)
|
||||||
|
#define move MO(MOVE)
|
||||||
|
#define func MO(FUNC)
|
||||||
|
|
||||||
|
#define rset RESET
|
||||||
|
#define powr KC_POWER
|
||||||
|
|
||||||
|
#define ____ KC_TRNS
|
||||||
|
#define xxxx KC_NO
|
||||||
|
|
||||||
|
#define emji LCMD(LCTL(KC_SPC))
|
||||||
|
#define hypr OSM(MOD_HYPR)
|
||||||
|
#define brup KC_BRMU
|
||||||
|
#define brdn KC_BRMD
|
||||||
|
#define escf LT(FUNC,KC_ESC)
|
||||||
|
|
||||||
|
enum planck_layers {
|
||||||
|
BASE,
|
||||||
|
SYMB,
|
||||||
|
MOVE,
|
||||||
|
FUNC,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum planck_keycodes {
|
||||||
|
ampr = SAFE_RANGE,
|
||||||
|
astr,
|
||||||
|
at,
|
||||||
|
bsls,
|
||||||
|
circ,
|
||||||
|
dlr,
|
||||||
|
eql,
|
||||||
|
exlm,
|
||||||
|
grv,
|
||||||
|
hash,
|
||||||
|
lbrc,
|
||||||
|
lcbr,
|
||||||
|
lprn,
|
||||||
|
perc,
|
||||||
|
pipe,
|
||||||
|
plus,
|
||||||
|
rbrc,
|
||||||
|
rcbr,
|
||||||
|
rprn,
|
||||||
|
tild,
|
||||||
|
cmd,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[BASE] = LAYOUT_planck_grid(
|
||||||
|
tab, q, w, f, p, g, j, l, u, y, scln, mins,
|
||||||
|
bspc, a, r, s, t, d, h, n, e, i, o, quot,
|
||||||
|
lsft, z, x, c, v, b, k, m, comm, dot, slsh, rsft,
|
||||||
|
hypr, lctl, lopt, cmd, move, ent, spc, symb, cmd, ropt, rctl, func
|
||||||
|
),
|
||||||
|
|
||||||
|
[SYMB] = LAYOUT_planck_grid(
|
||||||
|
esc, n7, n5, n3, n1, n9, n8, n0, n2, n4, n6, dash,
|
||||||
|
bspc, lbrc, lcbr, lprn, hash, pipe, astr, dlr, rprn, rcbr, rbrc, at,
|
||||||
|
____, grv, exlm, circ, tild, perc, ampr, plus, mins, eql, bsls, ____,
|
||||||
|
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____
|
||||||
|
),
|
||||||
|
|
||||||
|
[MOVE] = LAYOUT_planck_grid(
|
||||||
|
esc, xxxx, slup, dtl, dtr, xxxx, xxxx, home, up, end, xxxx, ____,
|
||||||
|
del, xxxx, sldn, tabl, tabr, xxxx, xxxx, left, down, rght, xxxx, ____,
|
||||||
|
____, xxxx, xxxx, back, fwd, xxxx, xxxx, pgdn, pgup, xxxx, xxxx, ____,
|
||||||
|
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____
|
||||||
|
),
|
||||||
|
|
||||||
|
[FUNC] = LAYOUT_planck_grid(
|
||||||
|
rset, f7, f5, f3, f1, f9, f8, f10, f2, f4, f6, volu,
|
||||||
|
powr, f17, f15, f13, f11, f19, f18, f20, f12, f14, f16, vold,
|
||||||
|
brup, ____, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, mute,
|
||||||
|
brdn, caps, ____, ____, ____, ____, ____, ____, prev, next, play, ____
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
bool send_string_if_keydown(keyrecord_t *record, const char *s) {
|
||||||
|
if (record->event.pressed) {
|
||||||
|
send_string(s);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
int cmd_keys_down = 0;
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
// Override the default auto shifted symbols to use SEND_STRING See
|
||||||
|
// https://github.com/qmk/qmk_firmware/issues/4072
|
||||||
|
case ampr:
|
||||||
|
return send_string_if_keydown(record, "&");
|
||||||
|
case astr:
|
||||||
|
return send_string_if_keydown(record, "*");
|
||||||
|
case at:
|
||||||
|
return send_string_if_keydown(record, "@");
|
||||||
|
case bsls:
|
||||||
|
return send_string_if_keydown(record, "\\");
|
||||||
|
case circ:
|
||||||
|
return send_string_if_keydown(record, "^");
|
||||||
|
case dlr:
|
||||||
|
return send_string_if_keydown(record, "$");
|
||||||
|
case eql:
|
||||||
|
return send_string_if_keydown(record, "=");
|
||||||
|
case exlm:
|
||||||
|
return send_string_if_keydown(record, "!");
|
||||||
|
case grv:
|
||||||
|
return send_string_if_keydown(record, "`");
|
||||||
|
case hash:
|
||||||
|
return send_string_if_keydown(record, "#");
|
||||||
|
case lbrc:
|
||||||
|
return send_string_if_keydown(record, "[");
|
||||||
|
case lcbr:
|
||||||
|
return send_string_if_keydown(record, "{");
|
||||||
|
case lprn:
|
||||||
|
return send_string_if_keydown(record, "(");
|
||||||
|
case perc:
|
||||||
|
return send_string_if_keydown(record, "%");
|
||||||
|
case pipe:
|
||||||
|
return send_string_if_keydown(record, "|");
|
||||||
|
case plus:
|
||||||
|
return send_string_if_keydown(record, "+");
|
||||||
|
case rbrc:
|
||||||
|
return send_string_if_keydown(record, "]");
|
||||||
|
case rcbr:
|
||||||
|
return send_string_if_keydown(record, "}");
|
||||||
|
case rprn:
|
||||||
|
return send_string_if_keydown(record, ")");
|
||||||
|
case tild:
|
||||||
|
return send_string_if_keydown(record, "~");
|
||||||
|
|
||||||
|
// cmd + cmd -> cmd + ctl
|
||||||
|
case cmd:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (cmd_keys_down == 0) {
|
||||||
|
register_code(KC_LCMD);
|
||||||
|
} else {
|
||||||
|
register_code(KC_LCTL);
|
||||||
|
}
|
||||||
|
cmd_keys_down++;
|
||||||
|
} else {
|
||||||
|
if (cmd_keys_down == 1) {
|
||||||
|
unregister_code(KC_LCMD);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_LCTL);
|
||||||
|
}
|
||||||
|
cmd_keys_down--;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# Sean's Planck Config
|
||||||
|
|
||||||
|
This is basically a copy of the `callum` layout with a few minor adjustments to better fit my style.
|
||||||
|
|
||||||
|
[Keyboard Layout Editor](http://www.keyboard-layout-editor.com/#/gists/7fef3554143712e2317b466c09a73a27)
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
# Make some noise
|
||||||
|
SRC += muse.c
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
/* Copyright 2021 Sean Johnson
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
#define STARTUP_SONG SONG(PREONIC_SOUND)
|
||||||
|
|
||||||
|
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||||
|
SONG(COLEMAK_SOUND), \
|
||||||
|
SONG(DVORAK_SOUND) \
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Most tactile encoders have detents every 4 stages
|
||||||
|
#define ENCODER_RESOLUTION 4
|
||||||
@@ -0,0 +1,283 @@
|
|||||||
|
/* Copyright 2021 Sean Johnson
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "muse.h"
|
||||||
|
|
||||||
|
#define a KC_A
|
||||||
|
#define b KC_B
|
||||||
|
#define c KC_C
|
||||||
|
#define d KC_D
|
||||||
|
#define e KC_E
|
||||||
|
#define f KC_F
|
||||||
|
#define g KC_G
|
||||||
|
#define h KC_H
|
||||||
|
#define i KC_I
|
||||||
|
#define j KC_J
|
||||||
|
#define k KC_K
|
||||||
|
#define l KC_L
|
||||||
|
#define m KC_M
|
||||||
|
#define n KC_N
|
||||||
|
#define o KC_O
|
||||||
|
#define p KC_P
|
||||||
|
#define q KC_Q
|
||||||
|
#define r KC_R
|
||||||
|
#define s KC_S
|
||||||
|
#define t KC_T
|
||||||
|
#define u KC_U
|
||||||
|
#define v KC_V
|
||||||
|
#define w KC_W
|
||||||
|
#define x KC_X
|
||||||
|
#define y KC_Y
|
||||||
|
#define z KC_Z
|
||||||
|
|
||||||
|
#define lopt KC_LALT
|
||||||
|
#define lctl KC_LCTL
|
||||||
|
#define lsft KC_LSFT
|
||||||
|
#define ropt KC_RALT
|
||||||
|
#define rctl KC_RCTL
|
||||||
|
#define rsft KC_RSFT
|
||||||
|
|
||||||
|
#define n0 KC_0
|
||||||
|
#define n1 KC_1
|
||||||
|
#define n2 KC_2
|
||||||
|
#define n3 KC_3
|
||||||
|
#define n4 KC_4
|
||||||
|
#define n5 KC_5
|
||||||
|
#define n6 KC_6
|
||||||
|
#define n7 KC_7
|
||||||
|
#define n8 KC_8
|
||||||
|
#define n9 KC_9
|
||||||
|
|
||||||
|
#define bspc KC_BSPC
|
||||||
|
#define caps KC_CAPS
|
||||||
|
#define comm KC_COMM
|
||||||
|
#define dash A(KC_MINS)
|
||||||
|
#define scln KC_SCLN
|
||||||
|
#define slsh KC_SLSH
|
||||||
|
#define spc KC_SPC
|
||||||
|
#define tab KC_TAB
|
||||||
|
#define del KC_DEL
|
||||||
|
#define dot KC_DOT
|
||||||
|
#define ent KC_ENT
|
||||||
|
#define mins KC_MINS
|
||||||
|
#define quot KC_QUOT
|
||||||
|
#define esc KC_ESC
|
||||||
|
|
||||||
|
#define down KC_DOWN
|
||||||
|
#define home G(KC_LEFT)
|
||||||
|
#define end G(KC_RGHT)
|
||||||
|
#define up KC_UP
|
||||||
|
#define pgdn KC_PGDN
|
||||||
|
#define pgup KC_PGUP
|
||||||
|
#define left KC_LEFT
|
||||||
|
#define rght KC_RGHT
|
||||||
|
|
||||||
|
#define tabl G(S(KC_LBRC))
|
||||||
|
#define tabr G(S(KC_RBRC))
|
||||||
|
#define fwd G(KC_RBRC)
|
||||||
|
#define back G(KC_LBRC)
|
||||||
|
#define dtl C(KC_LEFT)
|
||||||
|
#define dtr C(KC_RGHT)
|
||||||
|
#define slup S(A(KC_UP))
|
||||||
|
#define sldn S(A(KC_DOWN))
|
||||||
|
|
||||||
|
#define f1 KC_F1
|
||||||
|
#define f2 KC_F2
|
||||||
|
#define f3 KC_F3
|
||||||
|
#define f4 KC_F4
|
||||||
|
#define f5 KC_F5
|
||||||
|
#define f6 KC_F6
|
||||||
|
#define f7 KC_F7
|
||||||
|
#define f8 KC_F8
|
||||||
|
#define f9 KC_F9
|
||||||
|
#define f10 KC_F10
|
||||||
|
#define f11 KC_F11
|
||||||
|
#define f12 KC_F12
|
||||||
|
#define f13 KC_F13
|
||||||
|
#define f14 KC_F14
|
||||||
|
#define f15 KC_F15
|
||||||
|
#define f16 KC_F16
|
||||||
|
#define f17 KC_F17
|
||||||
|
#define f18 KC_F18
|
||||||
|
#define f19 KC_F19
|
||||||
|
#define f20 KC_F20
|
||||||
|
|
||||||
|
#define mute KC_MUTE
|
||||||
|
#define next KC_MNXT
|
||||||
|
#define play KC_MPLY
|
||||||
|
#define prev KC_MPRV
|
||||||
|
#define vold KC_VOLD
|
||||||
|
#define volu KC_VOLU
|
||||||
|
|
||||||
|
#define symb MO(SYMB)
|
||||||
|
#define move MO(MOVE)
|
||||||
|
#define func MO(FUNC)
|
||||||
|
|
||||||
|
#define rset RESET
|
||||||
|
#define powr KC_POWER
|
||||||
|
|
||||||
|
#define ____ KC_TRNS
|
||||||
|
#define xxxx KC_NO
|
||||||
|
|
||||||
|
#define emji LCMD(LCTL(KC_SPC))
|
||||||
|
#define hypr OSM(MOD_HYPR)
|
||||||
|
#define brup KC_BRMU
|
||||||
|
#define brdn KC_BRMD
|
||||||
|
#define escf LT(FUNC,KC_ESC)
|
||||||
|
|
||||||
|
enum preonic_layers {
|
||||||
|
BASE,
|
||||||
|
SYMB,
|
||||||
|
MOVE,
|
||||||
|
FUNC,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum preonic_keycodes {
|
||||||
|
ampr = SAFE_RANGE,
|
||||||
|
astr,
|
||||||
|
at,
|
||||||
|
bsls,
|
||||||
|
circ,
|
||||||
|
dlr,
|
||||||
|
eql,
|
||||||
|
exlm,
|
||||||
|
grv,
|
||||||
|
hash,
|
||||||
|
lbrc,
|
||||||
|
lcbr,
|
||||||
|
lprn,
|
||||||
|
perc,
|
||||||
|
pipe,
|
||||||
|
plus,
|
||||||
|
rbrc,
|
||||||
|
rcbr,
|
||||||
|
rprn,
|
||||||
|
tild,
|
||||||
|
cmd,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[BASE] = LAYOUT_preonic_grid(
|
||||||
|
tild, n7, n5, n3, n1, n9, n8, n0, n2, n4, n6, mins,
|
||||||
|
tab, q, w, f, p, g, j, l, u, y, scln, pipe,
|
||||||
|
bspc, a, r, s, t, d, h, n, e, i, o, quot,
|
||||||
|
lsft, z, x, c, v, b, k, m, comm, dot, slsh, rsft,
|
||||||
|
hypr, lctl, lopt, cmd, move, ent, spc, symb, cmd, ropt, rctl, escf
|
||||||
|
),
|
||||||
|
|
||||||
|
[SYMB] = LAYOUT_preonic_grid(
|
||||||
|
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
|
||||||
|
tild, n7, n5, n3, n1, n9, n8, n0, n2, n4, n6, dash,
|
||||||
|
bspc, lbrc, lcbr, lprn, hash, pipe, astr, dlr, rprn, rcbr, rbrc, at,
|
||||||
|
____, grv, exlm, circ, ampr, ____, ____, plus, mins, eql, bsls, perc,
|
||||||
|
caps, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____
|
||||||
|
),
|
||||||
|
|
||||||
|
[MOVE] = LAYOUT_preonic_grid(
|
||||||
|
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
|
||||||
|
____, xxxx, slup, dtl, dtr, xxxx, xxxx, home, up, end, xxxx, xxxx,
|
||||||
|
del, xxxx, sldn, tabl, tabr, xxxx, xxxx, left, down, rght, xxxx, xxxx,
|
||||||
|
____, xxxx, xxxx, back, fwd, xxxx, xxxx, pgdn, pgup, xxxx, xxxx, ____,
|
||||||
|
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____
|
||||||
|
),
|
||||||
|
|
||||||
|
[FUNC] = LAYOUT_preonic_grid(
|
||||||
|
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
|
||||||
|
rset, f7, f5, f3, f1, f9, f8, f10, f2, f4, f6, volu,
|
||||||
|
powr, f17, f15, f13, f11, f19, f18, f20, f12, f14, f16, vold,
|
||||||
|
brup, brdn, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, ____,
|
||||||
|
____, ____, ____, ____, ____, ____, ____, mute, play, prev, next, ____
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
bool send_string_if_keydown(keyrecord_t *record, const char *s) {
|
||||||
|
if (record->event.pressed) {
|
||||||
|
send_string(s);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
int cmd_keys_down = 0;
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
// Override the default auto shifted symbols to use SEND_STRING See
|
||||||
|
// https://github.com/qmk/qmk_firmware/issues/4072
|
||||||
|
case ampr:
|
||||||
|
return send_string_if_keydown(record, "&");
|
||||||
|
case astr:
|
||||||
|
return send_string_if_keydown(record, "*");
|
||||||
|
case at:
|
||||||
|
return send_string_if_keydown(record, "@");
|
||||||
|
case bsls:
|
||||||
|
return send_string_if_keydown(record, "\\");
|
||||||
|
case circ:
|
||||||
|
return send_string_if_keydown(record, "^");
|
||||||
|
case dlr:
|
||||||
|
return send_string_if_keydown(record, "$");
|
||||||
|
case eql:
|
||||||
|
return send_string_if_keydown(record, "=");
|
||||||
|
case exlm:
|
||||||
|
return send_string_if_keydown(record, "!");
|
||||||
|
case grv:
|
||||||
|
return send_string_if_keydown(record, "`");
|
||||||
|
case hash:
|
||||||
|
return send_string_if_keydown(record, "#");
|
||||||
|
case lbrc:
|
||||||
|
return send_string_if_keydown(record, "[");
|
||||||
|
case lcbr:
|
||||||
|
return send_string_if_keydown(record, "{");
|
||||||
|
case lprn:
|
||||||
|
return send_string_if_keydown(record, "(");
|
||||||
|
case perc:
|
||||||
|
return send_string_if_keydown(record, "%");
|
||||||
|
case pipe:
|
||||||
|
return send_string_if_keydown(record, "|");
|
||||||
|
case plus:
|
||||||
|
return send_string_if_keydown(record, "+");
|
||||||
|
case rbrc:
|
||||||
|
return send_string_if_keydown(record, "]");
|
||||||
|
case rcbr:
|
||||||
|
return send_string_if_keydown(record, "}");
|
||||||
|
case rprn:
|
||||||
|
return send_string_if_keydown(record, ")");
|
||||||
|
case tild:
|
||||||
|
return send_string_if_keydown(record, "~");
|
||||||
|
|
||||||
|
// cmd + cmd -> cmd + ctl
|
||||||
|
case cmd:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (cmd_keys_down == 0) {
|
||||||
|
register_code(KC_LCMD);
|
||||||
|
} else {
|
||||||
|
register_code(KC_LCTL);
|
||||||
|
}
|
||||||
|
cmd_keys_down++;
|
||||||
|
} else {
|
||||||
|
if (cmd_keys_down == 1) {
|
||||||
|
unregister_code(KC_LCMD);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_LCTL);
|
||||||
|
}
|
||||||
|
cmd_keys_down--;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# Sean's Preonic Config
|
||||||
|
|
||||||
|
This is basically a copy of the `callum` Planck layout adjusted to the Preonic layout with a few minor adjustments.
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# Make some noise
|
||||||
|
SRC += muse.c
|
||||||
@@ -1 +1,2 @@
|
|||||||
BOOTMAGIC_ENABLE = lite
|
BOOTMAGIC_ENABLE = lite
|
||||||
|
VIA_ENABLE = yes
|
||||||
@@ -24,6 +24,7 @@ from . import json2c
|
|||||||
from . import lint
|
from . import lint
|
||||||
from . import list
|
from . import list
|
||||||
from . import kle2json
|
from . import kle2json
|
||||||
|
from . import multibuild
|
||||||
from . import new
|
from . import new
|
||||||
from . import pyformat
|
from . import pyformat
|
||||||
from . import pytest
|
from . import pytest
|
||||||
|
|||||||
@@ -1,16 +1,12 @@
|
|||||||
"""Clean the QMK firmware folder of build artifacts.
|
"""Clean the QMK firmware folder of build artifacts.
|
||||||
"""
|
"""
|
||||||
from qmk.commands import run
|
from qmk.commands import run, create_make_target
|
||||||
from milc import cli
|
from milc import cli
|
||||||
|
|
||||||
import shutil
|
|
||||||
|
|
||||||
|
|
||||||
@cli.argument('-a', '--all', arg_only=True, action='store_true', help='Remove *.hex and *.bin files in the QMK root as well.')
|
@cli.argument('-a', '--all', arg_only=True, action='store_true', help='Remove *.hex and *.bin files in the QMK root as well.')
|
||||||
@cli.subcommand('Clean the QMK firmware folder of build artifacts.')
|
@cli.subcommand('Clean the QMK firmware folder of build artifacts.')
|
||||||
def clean(cli):
|
def clean(cli):
|
||||||
"""Runs `make clean` (or `make distclean` if --all is passed)
|
"""Runs `make clean` (or `make distclean` if --all is passed)
|
||||||
"""
|
"""
|
||||||
make_cmd = 'gmake' if shutil.which('gmake') else 'make'
|
run(create_make_target('distclean' if cli.args.all else 'clean'))
|
||||||
|
|
||||||
run([make_cmd, 'distclean' if cli.args.all else 'clean'])
|
|
||||||
@@ -2,20 +2,20 @@
|
|||||||
|
|
||||||
Compile an info.json for a particular keyboard and pretty-print it.
|
Compile an info.json for a particular keyboard and pretty-print it.
|
||||||
"""
|
"""
|
||||||
|
import sys
|
||||||
import json
|
import json
|
||||||
import platform
|
|
||||||
|
|
||||||
from milc import cli
|
from milc import cli
|
||||||
|
|
||||||
from qmk.json_encoders import InfoJSONEncoder
|
from qmk.json_encoders import InfoJSONEncoder
|
||||||
from qmk.constants import COL_LETTERS, ROW_LETTERS
|
from qmk.constants import COL_LETTERS, ROW_LETTERS
|
||||||
from qmk.decorators import automagic_keyboard, automagic_keymap
|
from qmk.decorators import automagic_keyboard, automagic_keymap
|
||||||
from qmk.keyboard import keyboard_completer, keyboard_folder, render_layouts, render_layout
|
from qmk.keyboard import keyboard_completer, keyboard_folder, render_layouts, render_layout, rules_mk
|
||||||
from qmk.keymap import locate_keymap
|
from qmk.keymap import locate_keymap
|
||||||
from qmk.info import info_json
|
from qmk.info import info_json
|
||||||
from qmk.path import is_keyboard
|
from qmk.path import is_keyboard
|
||||||
|
|
||||||
platform_id = platform.platform().lower()
|
UNICODE_SUPPORT = sys.stdout.encoding.lower().startswith('utf')
|
||||||
|
|
||||||
|
|
||||||
def show_keymap(kb_info_json, title_caps=True):
|
def show_keymap(kb_info_json, title_caps=True):
|
||||||
@@ -124,12 +124,20 @@ def print_text_output(kb_info_json):
|
|||||||
show_keymap(kb_info_json, False)
|
show_keymap(kb_info_json, False)
|
||||||
|
|
||||||
|
|
||||||
|
def print_parsed_rules_mk(keyboard_name):
|
||||||
|
rules = rules_mk(keyboard_name)
|
||||||
|
for k in sorted(rules.keys()):
|
||||||
|
print('%s = %s' % (k, rules[k]))
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
@cli.argument('-kb', '--keyboard', type=keyboard_folder, completer=keyboard_completer, help='Keyboard to show info for.')
|
@cli.argument('-kb', '--keyboard', type=keyboard_folder, completer=keyboard_completer, help='Keyboard to show info for.')
|
||||||
@cli.argument('-km', '--keymap', help='Show the layers for a JSON keymap too.')
|
@cli.argument('-km', '--keymap', help='Show the layers for a JSON keymap too.')
|
||||||
@cli.argument('-l', '--layouts', action='store_true', help='Render the layouts.')
|
@cli.argument('-l', '--layouts', action='store_true', help='Render the layouts.')
|
||||||
@cli.argument('-m', '--matrix', action='store_true', help='Render the layouts with matrix information.')
|
@cli.argument('-m', '--matrix', action='store_true', help='Render the layouts with matrix information.')
|
||||||
@cli.argument('-f', '--format', default='friendly', arg_only=True, help='Format to display the data in (friendly, text, json) (Default: friendly).')
|
@cli.argument('-f', '--format', default='friendly', arg_only=True, help='Format to display the data in (friendly, text, json) (Default: friendly).')
|
||||||
@cli.argument('--ascii', action='store_true', default='windows' in platform_id, help='Render layout box drawings in ASCII only.')
|
@cli.argument('--ascii', action='store_true', default=not UNICODE_SUPPORT, help='Render layout box drawings in ASCII only.')
|
||||||
|
@cli.argument('-r', '--rules-mk', action='store_true', help='Render the parsed values of the keyboard\'s rules.mk file.')
|
||||||
@cli.subcommand('Keyboard information.')
|
@cli.subcommand('Keyboard information.')
|
||||||
@automagic_keyboard
|
@automagic_keyboard
|
||||||
@automagic_keymap
|
@automagic_keymap
|
||||||
@@ -146,6 +154,10 @@ def info(cli):
|
|||||||
cli.log.error('Invalid keyboard: "%s"', cli.config.info.keyboard)
|
cli.log.error('Invalid keyboard: "%s"', cli.config.info.keyboard)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
if bool(cli.args.rules_mk):
|
||||||
|
print_parsed_rules_mk(cli.config.info.keyboard)
|
||||||
|
return False
|
||||||
|
|
||||||
# Build the info.json file
|
# Build the info.json file
|
||||||
kb_info_json = info_json(cli.config.info.keyboard)
|
kb_info_json = info_json(cli.config.info.keyboard)
|
||||||
|
|
||||||
|
|||||||
Executable
+78
@@ -0,0 +1,78 @@
|
|||||||
|
"""Compile all keyboards.
|
||||||
|
|
||||||
|
This will compile everything in parallel, for testing purposes.
|
||||||
|
"""
|
||||||
|
import re
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
from milc import cli
|
||||||
|
|
||||||
|
from qmk.constants import QMK_FIRMWARE
|
||||||
|
from qmk.commands import _find_make
|
||||||
|
import qmk.keyboard
|
||||||
|
|
||||||
|
|
||||||
|
def _make_rules_mk_filter(key, value):
|
||||||
|
def _rules_mk_filter(keyboard_name):
|
||||||
|
rules_mk = qmk.keyboard.rules_mk(keyboard_name)
|
||||||
|
return True if key in rules_mk and rules_mk[key].lower() == str(value).lower() else False
|
||||||
|
|
||||||
|
return _rules_mk_filter
|
||||||
|
|
||||||
|
|
||||||
|
def _is_split(keyboard_name):
|
||||||
|
rules_mk = qmk.keyboard.rules_mk(keyboard_name)
|
||||||
|
return True if 'SPLIT_KEYBOARD' in rules_mk and rules_mk['SPLIT_KEYBOARD'].lower() == 'yes' else False
|
||||||
|
|
||||||
|
|
||||||
|
@cli.argument('-j', '--parallel', type=int, default=1, help="Set the number of parallel make jobs to run.")
|
||||||
|
@cli.argument('-c', '--clean', arg_only=True, action='store_true', help="Remove object files before compiling.")
|
||||||
|
@cli.argument('-f', '--filter', arg_only=True, action='append', default=[], help="Filter the list of keyboards based on the supplied value in rules.mk. Supported format is 'SPLIT_KEYBOARD=yes'. May be passed multiple times.")
|
||||||
|
@cli.subcommand('Compile QMK Firmware for all keyboards.', hidden=False if cli.config.user.developer else True)
|
||||||
|
def multibuild(cli):
|
||||||
|
"""Compile QMK Firmware against all keyboards.
|
||||||
|
"""
|
||||||
|
|
||||||
|
make_cmd = _find_make()
|
||||||
|
if cli.args.clean:
|
||||||
|
cli.run([make_cmd, 'clean'], capture_output=False, text=False)
|
||||||
|
|
||||||
|
builddir = Path(QMK_FIRMWARE) / '.build'
|
||||||
|
makefile = builddir / 'parallel_kb_builds.mk'
|
||||||
|
|
||||||
|
keyboard_list = qmk.keyboard.list_keyboards()
|
||||||
|
|
||||||
|
filter_re = re.compile(r'^(?P<key>[A-Z0-9_]+)\s*=\s*(?P<value>[^#]+)$')
|
||||||
|
for filter_txt in cli.args.filter:
|
||||||
|
f = filter_re.match(filter_txt)
|
||||||
|
if f is not None:
|
||||||
|
keyboard_list = filter(_make_rules_mk_filter(f.group('key'), f.group('value')), keyboard_list)
|
||||||
|
|
||||||
|
keyboard_list = list(sorted(keyboard_list))
|
||||||
|
|
||||||
|
if len(keyboard_list) == 0:
|
||||||
|
return
|
||||||
|
|
||||||
|
builddir.mkdir(parents=True, exist_ok=True)
|
||||||
|
with open(makefile, "w") as f:
|
||||||
|
for keyboard_name in keyboard_list:
|
||||||
|
keyboard_safe = keyboard_name.replace('/', '_')
|
||||||
|
f.write(
|
||||||
|
f"""\
|
||||||
|
all: {keyboard_safe}_binary
|
||||||
|
{keyboard_safe}_binary:
|
||||||
|
@rm -f "{QMK_FIRMWARE}/.build/failed.log.{keyboard_safe}" || true
|
||||||
|
+@$(MAKE) -C "{QMK_FIRMWARE}" -f "{QMK_FIRMWARE}/build_keyboard.mk" KEYBOARD="{keyboard_name}" KEYMAP="default" REQUIRE_PLATFORM_KEY= COLOR=true SILENT=false \\
|
||||||
|
>>"{QMK_FIRMWARE}/.build/build.log.{keyboard_safe}" 2>&1 \\
|
||||||
|
|| cp "{QMK_FIRMWARE}/.build/build.log.{keyboard_safe}" "{QMK_FIRMWARE}/.build/failed.log.{keyboard_safe}"
|
||||||
|
@{{ grep '\[ERRORS\]' "{QMK_FIRMWARE}/.build/build.log.{keyboard_safe}" >/dev/null 2>&1 && printf "Build %-64s \e[1;31m[ERRORS]\e[0m\\n" "{keyboard_name}:default" ; }} \\
|
||||||
|
|| {{ grep '\[WARNINGS\]' "{QMK_FIRMWARE}/.build/build.log.{keyboard_safe}" >/dev/null 2>&1 && printf "Build %-64s \e[1;33m[WARNINGS]\e[0m\\n" "{keyboard_name}:default" ; }} \\
|
||||||
|
|| printf "Build %-64s \e[1;32m[OK]\e[0m\\n" "{keyboard_name}:default"
|
||||||
|
@rm -f "{QMK_FIRMWARE}/.build/build.log.{keyboard_safe}" || true
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
# noqa: yapf should not care about the formatting of the Makefile
|
||||||
|
)
|
||||||
|
|
||||||
|
cli.run([make_cmd, '-j', str(cli.args.parallel), '-f', makefile, 'all'], capture_output=False, text=False)
|
||||||
@@ -29,6 +29,33 @@ def _find_make():
|
|||||||
return make_cmd
|
return make_cmd
|
||||||
|
|
||||||
|
|
||||||
|
def create_make_target(target, parallel=1, **env_vars):
|
||||||
|
"""Create a make command
|
||||||
|
|
||||||
|
Args:
|
||||||
|
|
||||||
|
target
|
||||||
|
Usually a make rule, such as 'clean' or 'all'.
|
||||||
|
|
||||||
|
parallel
|
||||||
|
The number of make jobs to run in parallel
|
||||||
|
|
||||||
|
**env_vars
|
||||||
|
Environment variables to be passed to make.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
A command that can be run to make the specified keyboard and keymap
|
||||||
|
"""
|
||||||
|
env = []
|
||||||
|
make_cmd = _find_make()
|
||||||
|
|
||||||
|
for key, value in env_vars.items():
|
||||||
|
env.append(f'{key}={value}')
|
||||||
|
|
||||||
|
return [make_cmd, '-j', str(parallel), *env, target]
|
||||||
|
|
||||||
|
|
||||||
def create_make_command(keyboard, keymap, target=None, parallel=1, **env_vars):
|
def create_make_command(keyboard, keymap, target=None, parallel=1, **env_vars):
|
||||||
"""Create a make compile command
|
"""Create a make compile command
|
||||||
|
|
||||||
@@ -53,17 +80,12 @@ def create_make_command(keyboard, keymap, target=None, parallel=1, **env_vars):
|
|||||||
|
|
||||||
A command that can be run to make the specified keyboard and keymap
|
A command that can be run to make the specified keyboard and keymap
|
||||||
"""
|
"""
|
||||||
env = []
|
|
||||||
make_args = [keyboard, keymap]
|
make_args = [keyboard, keymap]
|
||||||
make_cmd = _find_make()
|
|
||||||
|
|
||||||
if target:
|
if target:
|
||||||
make_args.append(target)
|
make_args.append(target)
|
||||||
|
|
||||||
for key, value in env_vars.items():
|
return create_make_target(':'.join(make_args), parallel, **env_vars)
|
||||||
env.append(f'{key}={value}')
|
|
||||||
|
|
||||||
return [make_cmd, '-j', str(parallel), *env, ':'.join(make_args)]
|
|
||||||
|
|
||||||
|
|
||||||
def get_git_version(repo_dir='.', check_dir='.'):
|
def get_git_version(repo_dir='.', check_dir='.'):
|
||||||
|
|||||||
@@ -80,7 +80,21 @@ enum consumer_usages {
|
|||||||
AL_ASSISTANT = 0x1CB,
|
AL_ASSISTANT = 0x1CB,
|
||||||
AL_KEYBOARD_LAYOUT = 0x1AE,
|
AL_KEYBOARD_LAYOUT = 0x1AE,
|
||||||
// 15.16 Generic GUI Application Controls
|
// 15.16 Generic GUI Application Controls
|
||||||
|
AC_NEW = 0x201,
|
||||||
|
AC_OPEN = 0x202,
|
||||||
|
AC_CLOSE = 0x203,
|
||||||
|
AC_EXIT = 0x204,
|
||||||
|
AC_MAXIMIZE = 0x205,
|
||||||
AC_MINIMIZE = 0x206,
|
AC_MINIMIZE = 0x206,
|
||||||
|
AC_SAVE = 0x207,
|
||||||
|
AC_PRINT = 0x208,
|
||||||
|
AC_PROPERTIES = 0x209,
|
||||||
|
AC_UNDO = 0x21A,
|
||||||
|
AC_COPY = 0x21B,
|
||||||
|
AC_CUT = 0x21C,
|
||||||
|
AC_PASTE = 0x21D,
|
||||||
|
AC_SELECT_ALL = 0x21E,
|
||||||
|
AC_FIND = 0x21F,
|
||||||
AC_SEARCH = 0x221,
|
AC_SEARCH = 0x221,
|
||||||
AC_HOME = 0x223,
|
AC_HOME = 0x223,
|
||||||
AC_BACK = 0x224,
|
AC_BACK = 0x224,
|
||||||
@@ -96,9 +110,12 @@ enum consumer_usages {
|
|||||||
*/
|
*/
|
||||||
enum desktop_usages {
|
enum desktop_usages {
|
||||||
// 4.5.1 System Controls - Power Controls
|
// 4.5.1 System Controls - Power Controls
|
||||||
SYSTEM_POWER_DOWN = 0x81,
|
SYSTEM_POWER_DOWN = 0x81,
|
||||||
SYSTEM_SLEEP = 0x82,
|
SYSTEM_SLEEP = 0x82,
|
||||||
SYSTEM_WAKE_UP = 0x83
|
SYSTEM_WAKE_UP = 0x83,
|
||||||
|
SYSTEM_RESTART = 0x8F,
|
||||||
|
// 4.10 System Display Controls
|
||||||
|
SYSTEM_DISPLAY_TOGGLE_INT_EXT = 0xB5
|
||||||
};
|
};
|
||||||
|
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|||||||
@@ -1,8 +1,69 @@
|
|||||||
|
/* Copyright 2021 SethBarberee <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
# define RGBLIGHT_SLEEP
|
||||||
|
# ifndef RGBLIGHT_HUE_STEP
|
||||||
|
# define RGBLIGHT_HUE_STEP 8
|
||||||
|
#endif
|
||||||
|
# ifndef RGBLIGHT_SAT_STEPT
|
||||||
|
# define RGBLIGHT_SAT_STEP 8
|
||||||
|
#endif
|
||||||
|
# ifndef RGBLIGHT_VAL_STEP
|
||||||
|
# define RGBLIGHT_VAL_STEP 8
|
||||||
|
#endif
|
||||||
|
// Trim animations I don't use/like
|
||||||
|
# ifdef RGBLIGHT_ANIMATIONS
|
||||||
|
# undef RGBLIGHT_ANIMATIONS
|
||||||
|
# endif
|
||||||
|
# define RGBLIGHT_EFFECT_BREATHING
|
||||||
|
# define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||||
|
# define RGBLIGHT_EFFECT_TWINKLE
|
||||||
# ifndef CAPS_LOCK_MODE
|
# ifndef CAPS_LOCK_MODE
|
||||||
# define CAPS_LOCK_MODE 1
|
# define CAPS_LOCK_MODE RGBLIGHT_MODE_STATIC_LIGHT
|
||||||
# endif
|
|
||||||
# ifndef NORMAL_MODE
|
|
||||||
# define NORMAL_MODE 4
|
|
||||||
# endif
|
# endif
|
||||||
|
#endif // RGBLIGHT_ENABLE
|
||||||
|
|
||||||
|
#ifndef AUDIO_ENABLE
|
||||||
|
# define NO_MUSIC_MODE
|
||||||
|
#endif // AUDIO_ENABLE
|
||||||
|
|
||||||
|
#define FORCE_NKRO // Force NKRO on by default
|
||||||
|
|
||||||
|
// Totally taken from @drashna's userspace
|
||||||
|
#ifdef TAPPING_TERM
|
||||||
|
# undef TAPPING_TERM
|
||||||
|
#endif // TAPPING_TERM
|
||||||
|
//
|
||||||
|
// Keeping these commented for examples when I want to tweak per keyboard
|
||||||
|
// but setting a default across my boards for now
|
||||||
|
//
|
||||||
|
//#if defined(KEYBOARD_ergodox_ez)
|
||||||
|
//# define TAPPING_TERM 185
|
||||||
|
#if defined(KEYBOARD_crkbd)
|
||||||
|
# define TAPPING_TERM 185
|
||||||
|
#else
|
||||||
|
# define TAPPING_TERM 200
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Disable unused and unneeded features to reduce on firmware size */
|
||||||
|
#ifdef LOCKING_SUPPORT_ENABLE
|
||||||
|
# undef LOCKING_SUPPORT_ENABLE
|
||||||
|
#endif
|
||||||
|
#ifdef LOCKING_RESYNC_ENABLE
|
||||||
|
# undef LOCKING_RESYNC_ENABLE
|
||||||
#endif
|
#endif
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
/* Copyright 2021 SethBarberee <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "rgb_light.h"
|
||||||
|
|
||||||
|
#if defined(RGBLIGHT_ENABLE)
|
||||||
|
layer_state_t layer_state_set_rgb_light(layer_state_t state){
|
||||||
|
switch(get_highest_layer(state)) {
|
||||||
|
case _QWERTY:
|
||||||
|
rgblight_set_hsv_and_mode(HSV_RED, RGBLIGHT_MODE_BREATHING + 3);
|
||||||
|
break;
|
||||||
|
case _LOWER:
|
||||||
|
rgblight_set_hsv_and_mode(HSV_GREEN, RGBLIGHT_MODE_BREATHING + 3);
|
||||||
|
break;
|
||||||
|
case _RAISE:
|
||||||
|
rgblight_set_hsv_and_mode(HSV_BLUE, RGBLIGHT_MODE_BREATHING + 3);
|
||||||
|
break;
|
||||||
|
case _ADJUST:
|
||||||
|
rgblight_set_hsv_and_mode(HSV_GOLDENROD, RGBLIGHT_MODE_BREATHING + 3);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
rgblight_set_hsv_and_mode(HSV_PINK, RGBLIGHT_MODE_TWINKLE + 3);
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
void rgblight_set_hsv_and_mode(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode) {
|
||||||
|
rgblight_sethsv_noeeprom(hue, sat, val);
|
||||||
|
// wait_us(175); // Add a slight delay between color and mode to ensure it's processed correctly
|
||||||
|
rgblight_mode_noeeprom(mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
void keyboard_post_init_rgb_light(void)
|
||||||
|
{
|
||||||
|
layer_state_set_rgb_light(layer_state);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
/* Copyright 2021 SethBarberee <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
#include "sethBarberee.h"
|
||||||
|
|
||||||
|
layer_state_t layer_state_set_rgb_light(layer_state_t state);
|
||||||
|
void keyboard_post_init_rgb_light(void);
|
||||||
|
void rgblight_set_hsv_and_mode(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode);
|
||||||
@@ -1 +1,10 @@
|
|||||||
SRC += sethBarberee.c
|
SRC += sethBarberee.c
|
||||||
|
|
||||||
|
# Add in custom tap dances when tap dance is enabled
|
||||||
|
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
|
||||||
|
SRC += tap_dance.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
||||||
|
SRC += rgb_light.c
|
||||||
|
endif
|
||||||
@@ -1,45 +1,85 @@
|
|||||||
|
/* Copyright 2021 SethBarberee <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
#include "sethBarberee.h"
|
#include "sethBarberee.h"
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#include "version.h"
|
||||||
#ifdef TAP_DANCE_ENABLE
|
|
||||||
|
|
||||||
// Initialize it now
|
__attribute__ ((weak)) void keyboard_pre_init_keymap(void) {}
|
||||||
tap caps_status = {
|
|
||||||
.toggled = false,
|
|
||||||
.toggle_mode = CAPS_LOCK_MODE,
|
|
||||||
.normal_mode = NORMAL_MODE
|
|
||||||
};
|
|
||||||
|
|
||||||
void dance_ecap_finished (qk_tap_dance_state_t *state, void *user_data){
|
void keyboard_pre_init_user(void){
|
||||||
if(state->count == 1){
|
#if defined(BOOTLOADER_CATERINA)
|
||||||
register_code(KC_ESC);
|
// Make sure the red LEDs don't light
|
||||||
} else {
|
setPinOutput(D5);
|
||||||
register_code(KC_CAPS);
|
writePinHigh(D5);
|
||||||
if(!caps_status.toggled){
|
|
||||||
// Toggling caps so indicate
|
setPinOutput(B0);
|
||||||
caps_status.toggled = true;
|
writePinHigh(B0);
|
||||||
rgblight_mode_noeeprom(caps_status.toggle_mode);
|
#endif
|
||||||
} else {
|
keyboard_pre_init_keymap();
|
||||||
// Turning off so return to normal mode
|
}
|
||||||
caps_status.toggled = false;
|
|
||||||
rgblight_mode_noeeprom(caps_status.normal_mode);
|
__attribute__ ((weak)) layer_state_t layer_state_set_keymap (layer_state_t state) { return state; }
|
||||||
|
|
||||||
|
layer_state_t layer_state_set_user(layer_state_t state){
|
||||||
|
|
||||||
|
if (!is_keyboard_master()) {
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
|
||||||
|
#if defined(RGBLIGHT_ENABLE)
|
||||||
|
state = layer_state_set_rgb_light(state);
|
||||||
|
#endif
|
||||||
|
return layer_state_set_keymap(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak)) void keyboard_post_init_keymap(void) {}
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void)
|
||||||
|
{
|
||||||
|
#if defined(RGBLIGHT_ENABLE)
|
||||||
|
keyboard_post_init_rgb_light();
|
||||||
|
#endif
|
||||||
|
keyboard_post_init_keymap();
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__((weak)) void suspend_power_down_keymap(void) {}
|
||||||
|
|
||||||
|
void suspend_power_down_user(void) {
|
||||||
|
#ifdef OLED_DRIVER_ENABLE
|
||||||
|
oled_off();
|
||||||
|
#endif
|
||||||
|
suspend_power_down_keymap();
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__((weak)) void suspend_wakeup_init_keymap(void) {}
|
||||||
|
|
||||||
|
void suspend_wakeup_init_user(void) { suspend_wakeup_init_keymap(); }
|
||||||
|
|
||||||
|
__attribute__ ((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true;}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
if (process_record_keymap(keycode, record))
|
||||||
|
{
|
||||||
|
switch (keycode) {
|
||||||
|
case KC_VRSN: // Prints firmware version
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE);
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void dance_ecap_reset (qk_tap_dance_state_t *state, void *user_data){
|
|
||||||
if(state->count == 1){
|
|
||||||
unregister_code(KC_ESC);
|
|
||||||
} else {
|
|
||||||
unregister_code(KC_CAPS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Tap Dance Definitions
|
|
||||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
|
||||||
//Tap once for Esc, twice for Caps Lock
|
|
||||||
[TD_ECAP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_ecap_finished, dance_ecap_reset),
|
|
||||||
// Other declarations would go here, separated by commas, if you have them
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
@@ -1,20 +1,50 @@
|
|||||||
#ifndef USERSPACE
|
/* Copyright 2021 SethBarberee <[email protected]>
|
||||||
#define USERSPACE
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#include "quantum.h"
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
#ifdef TAP_DANCE_ENABLE // only enable for tap dances
|
#include "wrappers.h"
|
||||||
enum {
|
|
||||||
TD_ECAP = 0,
|
|
||||||
};
|
|
||||||
|
|
||||||
#define KC_ECAP TD(TD_ECAP)
|
enum layers {
|
||||||
|
_QWERTY,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_ADJUST
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct {
|
enum userspace_keycodes {
|
||||||
bool toggled; // store whether we have toggled caps lock
|
KC_VRSN = SAFE_RANGE,
|
||||||
int toggle_mode; // idk why but maybe do something with this..
|
NEW_SAFE_RANGE
|
||||||
int normal_mode;
|
};
|
||||||
} tap;
|
|
||||||
|
#define KC_LOWR MO(_LOWER)
|
||||||
|
#define KC_RASE MO(_RAISE)
|
||||||
|
|
||||||
|
#ifdef TAP_DANCE_ENABLE
|
||||||
|
# include "tap_dance.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
# include "rgb_light.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void keyboard_pre_init_keymap(void);
|
||||||
|
void keyboard_post_init_keymap(void);
|
||||||
|
void suspend_power_down_keymap(void);
|
||||||
|
void suspend_wakeup_init_keymap(void);
|
||||||
|
layer_state_t layer_state_set_keymap (layer_state_t state);
|
||||||
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
/* Copyright 2021 SethBarberee <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "tap_dance.h"
|
||||||
|
|
||||||
|
// Shamelessly stolen from QMK Docs
|
||||||
|
int cur_dance (qk_tap_dance_state_t *state) {
|
||||||
|
if (state->count == 1) {
|
||||||
|
if (state->interrupted || !state->pressed) {
|
||||||
|
return SINGLE_TAP;
|
||||||
|
} else {
|
||||||
|
return SINGLE_HOLD;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (state->count == 2) {
|
||||||
|
if (state->interrupted) return DOUBLE_SINGLE_TAP;
|
||||||
|
else if (state->pressed) return DOUBLE_HOLD;
|
||||||
|
else return DOUBLE_TAP;
|
||||||
|
}
|
||||||
|
if (state->count == 3) {
|
||||||
|
if (state->interrupted || !state->pressed) return TRIPLE_TAP;
|
||||||
|
else return TRIPLE_HOLD;
|
||||||
|
}
|
||||||
|
else return 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Initialize it now
|
||||||
|
tap caps_status = {
|
||||||
|
.toggled = false,
|
||||||
|
.state = 0
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void dance_ecap_finished (qk_tap_dance_state_t *state, void *user_data){
|
||||||
|
caps_status.state = cur_dance(state);
|
||||||
|
switch(caps_status.state){
|
||||||
|
case SINGLE_TAP:
|
||||||
|
tap_code(KC_ESC);
|
||||||
|
break;
|
||||||
|
case SINGLE_HOLD:
|
||||||
|
register_code(KC_LCTRL);
|
||||||
|
break;
|
||||||
|
case DOUBLE_TAP:
|
||||||
|
tap_code(KC_CAPS);
|
||||||
|
if(!caps_status.toggled){
|
||||||
|
// Toggling caps so indicate
|
||||||
|
caps_status.toggled = true;
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
// Save mode we can from
|
||||||
|
caps_status.normal_mode = rgblight_get_mode();
|
||||||
|
rgblight_mode_noeeprom(CAPS_LOCK_MODE);
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
// Turning off so return to normal mode
|
||||||
|
caps_status.toggled = false;
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
rgblight_mode_noeeprom(caps_status.normal_mode);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void dance_ecap_reset (qk_tap_dance_state_t *state, void *user_data){
|
||||||
|
if(caps_status.state == SINGLE_HOLD){
|
||||||
|
unregister_code(KC_LCTRL);
|
||||||
|
}
|
||||||
|
caps_status.state = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Tap Dance Definitions
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
//Tap once for Esc, twice for Caps Lock
|
||||||
|
[TD_ECAP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_ecap_finished, dance_ecap_reset),
|
||||||
|
// Other declarations would go here, separated by commas, if you have them
|
||||||
|
};
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
/* Copyright 2021 SethBarberee <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
#include "sethBarberee.h"
|
||||||
|
|
||||||
|
//Define a type for as many tap dance states as you need
|
||||||
|
enum {
|
||||||
|
SINGLE_TAP = 1,
|
||||||
|
SINGLE_HOLD = 2,
|
||||||
|
DOUBLE_TAP = 3,
|
||||||
|
DOUBLE_HOLD = 4,
|
||||||
|
DOUBLE_SINGLE_TAP = 5, //send two single taps
|
||||||
|
TRIPLE_TAP = 6,
|
||||||
|
TRIPLE_HOLD = 7
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
enum {
|
||||||
|
TD_ECAP = 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
#define KC_ECAP TD(TD_ECAP)
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
bool toggled; // store whether we have toggled caps lock
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
int normal_mode;
|
||||||
|
#endif // RGBLIGHT_ENABLE
|
||||||
|
int state;
|
||||||
|
} tap;
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
/* Copyright 2021 SethBarberee <[email protected]>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "sethBarberee.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
Since our quirky block definitions are basically a list of comma separated
|
||||||
|
arguments, we need a wrapper in order for these definitions to be
|
||||||
|
expanded before being used as arguments to the LAYOUT_xxx macro.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Blocks for each of the four major keyboard layouts
|
||||||
|
Organized so we can quickly adapt and modify all of them
|
||||||
|
at once, rather than for each keyboard, one at a time.
|
||||||
|
And this allows for much cleaner blocks in the keymaps.
|
||||||
|
For instance Tap/Hold for Control on all of the layouts
|
||||||
|
|
||||||
|
NOTE: These are all the same length. If you do a search/replace
|
||||||
|
then you need to add/remove underscores to keep the
|
||||||
|
lengths consistent.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
#define _________________QWERTY_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T
|
||||||
|
#define _________________QWERTY_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G
|
||||||
|
#define _________________QWERTY_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B
|
||||||
|
|
||||||
|
#define _________________QWERTY_R1_________________ KC_Y, KC_U, KC_I, KC_O, KC_P
|
||||||
|
#define _________________QWERTY_R2_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT
|
||||||
|
#define _________________QWERTY_R3_________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH
|
||||||
|
|
||||||
|
#define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5
|
||||||
|
#define ________________NUMBER_RIGHT_______________ KC_6, KC_7, KC_8, KC_9, KC_0
|
||||||
|
#define _________________FUNC_LEFT_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5
|
||||||
|
#define _________________FUNC_RIGHT________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10
|
||||||
|
|
||||||
|
#define ___________________BLANK___________________ _______, _______, _______, _______, _______
|
||||||
|
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
Reference in new issue
Block a user