QMK Configurator Support for JD45 and JD40 (#2851)

* Added JD45 Config

* Added JD40 Config

* Changed KEYMAP to LAYOUT for JD40 and JD45
This commit is contained in:
Eric 2018-04-30 23:22:02 +08:00 committed by Drashna Jaelre
parent 43e589aa02
commit 187d76476e
15 changed files with 962 additions and 784 deletions

57
keyboards/jd40/info.json Normal file
View File

@ -0,0 +1,57 @@
{
"keyboard_name": "jd40",
"url": "",
"maintainer": "qmk",
"width": 12,
"height": 4,
"layouts": {
"LAYOUT": {
"layout": [
{ "label": "Esc", "x": 0, "y": 0 },
{ "label": "Q", "x": 1, "y": 0 },
{ "label": "W", "x": 2, "y": 0 },
{ "label": "E", "x": 3, "y": 0 },
{ "label": "R", "x": 4, "y": 0 },
{ "label": "T", "x": 5, "y": 0 },
{ "label": "Y", "x": 6, "y": 0 },
{ "label": "U", "x": 7, "y": 0 },
{ "label": "I", "x": 8, "y": 0 },
{ "label": "O", "x": 9, "y": 0 },
{ "label": "P", "x": 10, "y": 0 },
{ "label": "Back<br>Space", "x": 11, "y": 0 },
{ "label": "Tab", "x": 0, "y": 1, "w": 1.25 },
{ "label": "A", "x": 1.25, "y": 1 },
{ "label": "S", "x": 2.25, "y": 1 },
{ "label": "D", "x": 3.25, "y": 1 },
{ "label": "F", "x": 4.25, "y": 1 },
{ "label": "G", "x": 5.25, "y": 1 },
{ "label": "H", "x": 6.25, "y": 1 },
{ "label": "J", "x": 7.25, "y": 1 },
{ "label": "K", "x": 8.25, "y": 1 },
{ "label": "L", "x": 9.25, "y": 1 },
{ "label": "Enter", "x": 10.25, "y": 1, "w": 1.75 },
{ "label": "Shift", "x": 0, "y": 2, "w": 1.75 },
{ "label": "Z", "x": 1.75, "y": 2 },
{ "label": "X", "x": 2.75, "y": 2 },
{ "label": "C", "x": 3.75, "y": 2 },
{ "label": "V", "x": 4.75, "y": 2 },
{ "label": "B", "x": 5.75, "y": 2 },
{ "label": "N", "x": 6.75, "y": 2 },
{ "label": "M", "x": 7.75, "y": 2 },
{ "label": "<", "x": 8.75, "y": 2 },
{ "label": "Shift", "x": 9.75, "y": 2, "w": 1.25 },
{ "label": ">", "x": 11, "y": 2 },
{ "label": "Ctrl", "x": 0, "y": 3 },
{ "label": "Fn", "x": 1, "y": 3 },
{ "label": "Alt", "x": 2, "y": 3 },
{ "label": "Super", "x": 3, "y": 3, "w": 1.25 },
{ "x": 4.25, "y": 3, "w": 1.75 },
{ "x": 6, "y": 3, "w": 1.75 },
{ "label": "Menu", "x": 7.75, "y": 3, "w": 1.25 },
{ "label": "Alt", "x": 9, "y": 3 },
{ "label": "Fn2", "x": 10, "y": 3 },
{ "label": "Ctrl", "x": 11, "y": 3 }
]
}
}
}

View File

@ -30,7 +30,7 @@ inline void gh60_wasd_leds_off(void) { DDRF &= ~(1<<7); PORTF &= ~(1<<7); }
/* JD40 MKII keymap definition macro
*/
#define KEYMAP( \
#define LAYOUT( \
K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, \
K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, \
K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, \

View File

@ -1,4 +1,4 @@
#include "jd40.h"
#include QMK_KEYBOARD_H
#include "action_layer.h"
#define _BL 0
@ -7,32 +7,33 @@
#define _UL 3
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BL] = KEYMAP(
[_BL] = LAYOUT(
F12, Q, W, E, R, T, Y, U, I, O, P, BSPC,
TAB, A, S, D, F, G, H, J, K, L, ENT,
LSFT, Z, X, C, V, B, N, M, COMM, UP, DOT,
LCTL, LGUI, LALT, FN0, SPC, SPC, FN0, LEFT, DOWN, RIGHT ),
LCTL, LGUI, LALT, FN0, SPC, SPC, FN0, LEFT, DOWN, RIGHT),
[_AL] = KEYMAP(
[_AL] = LAYOUT(
GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, DEL,
CAPS, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, SCLN, PGUP, QUOT,
TRNS, TRNS, TRNS, TRNS, FN3, FN3, TRNS, HOME, PGDN, END ),
TRNS, TRNS, TRNS, TRNS, FN3, FN3, TRNS, HOME, PGDN, END),
[_FL] = KEYMAP(
[_FL] = LAYOUT(
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS ),
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS),
[_UL] = KEYMAP(
[_UL] = LAYOUT(
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, FN4, FN5, FN11, FN10, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS ),
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS),
};
enum function_id {
enum function_id
{
RGBLED_TOGGLE,
RGBLED_STEP_MODE,
RGBLED_INCREASE_HUE,
@ -63,11 +64,15 @@ const uint16_t PROGMEM fn_actions[] = {
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch(id) {
switch (id)
{
case 0:
if (record->event.pressed) {
if (record->event.pressed)
{
register_code(KC_RSFT);
} else {
}
else
{
unregister_code(KC_RSFT);
}
break;
@ -75,86 +80,112 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
return MACRO_NONE;
};
void matrix_scan_user(void) {
void matrix_scan_user(void)
{
// Layer LED indicators
// ESC led on when in function layer, WASD cluster leds enabled when on arrow cluster
// Layer LED indicators
// ESC led on when in function layer, WASD cluster leds enabled when on arrow cluster
uint32_t layer = layer_state;
if (layer & (1<<1)) {
if (layer & (1 << 1))
{
//gh60_wasd_leds_on();
} else {
}
else
{
//gh60_wasd_leds_off();
}
if (layer & (1<<2)) {
if (layer & (1 << 2))
{
//gh60_esc_led_on();
} else {
}
else
{
//gh60_esc_led_off();
}
};
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
switch (id) {
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt)
{
switch (id)
{
case RGBLED_TOGGLE:
//led operations
if (record->event.pressed) {
if (record->event.pressed)
{
rgblight_toggle();
}
break;
case RGBLED_INCREASE_HUE:
if (record->event.pressed) {
if (record->event.pressed)
{
rgblight_increase_hue();
}
break;
case RGBLED_DECREASE_HUE:
if (record->event.pressed) {
if (record->event.pressed)
{
rgblight_decrease_hue();
}
break;
case RGBLED_INCREASE_SAT:
if (record->event.pressed) {
if (record->event.pressed)
{
rgblight_increase_sat();
}
break;
case RGBLED_DECREASE_SAT:
if (record->event.pressed) {
if (record->event.pressed)
{
rgblight_decrease_sat();
}
break;
case RGBLED_INCREASE_VAL:
if (record->event.pressed) {
if (record->event.pressed)
{
rgblight_increase_val();
}
break;
case RGBLED_DECREASE_VAL:
if (record->event.pressed) {
if (record->event.pressed)
{
rgblight_decrease_val();
}
break;
case RGBLED_STEP_MODE:
if (record->event.pressed) {
if (record->event.pressed)
{
rgblight_step();
}
break;
static uint8_t shift_esc_shift_mask;
// Shift + ESC = ~
case SHIFT_ESC:
shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
if (record->event.pressed) {
if (shift_esc_shift_mask) {
shift_esc_shift_mask = get_mods() & MODS_CTRL_MASK;
if (record->event.pressed)
{
if (shift_esc_shift_mask)
{
add_key(KC_GRV);
send_keyboard_report();
} else {
}
else
{
add_key(KC_ESC);
send_keyboard_report();
}
} else {
if (shift_esc_shift_mask) {
}
else
{
if (shift_esc_shift_mask)
{
del_key(KC_GRV);
send_keyboard_report();
} else {
}
else
{
del_key(KC_ESC);
send_keyboard_report();
}

View File

@ -1,6 +1,6 @@
#include "../../config.h"
#define KEYMAP_VANAGON(\
#define LAYOUT_VANAGON(\
K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, \
K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, \
K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, \

View File

@ -1,29 +1,26 @@
#include "jd40.h"
#include QMK_KEYBOARD_H
#include "action_layer.h"
enum {
enum
{
_BL = 0,
_AL1,
_AL2,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BL] = KEYMAP_VANAGON(
[_BL] = LAYOUT_VANAGON(
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
MO(_AL1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MO(_AL1),
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
MO(_AL2), KC_LCTL, KC_LALT, KC_LGUI, KC_ENT, KC_SPC, KC_RGUI, KC_RALT, KC_RSPC, MO(_AL2)
),
[_AL1] = KEYMAP_VANAGON(
MO(_AL2), KC_LCTL, KC_LALT, KC_LGUI, KC_ENT, KC_SPC, KC_RGUI, KC_RALT, KC_RSPC, MO(_AL2)),
[_AL1] = LAYOUT_VANAGON(
KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LBRC, KC_RBRC, KC_TRNS,
KC_TRNS, KC_BSLS, KC_QUOT, KC_MINS, KC_EQL, KC_COLN, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_TRNS,
KC_TRNS, KC_ESC, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
[_AL2] = KEYMAP_VANAGON(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[_AL2] = LAYOUT_VANAGON(
KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
KC_TRNS, KC_PIPE, KC_DQT, KC_UNDS, KC_PLUS, KC_SCLN, KC_TRNS, KC_4, KC_5, KC_6, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_1, KC_2, KC_3, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
)
};
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)};

60
keyboards/jd45/info.json Normal file
View File

@ -0,0 +1,60 @@
{
"keyboard_name": "jd45",
"url": "",
"maintainer": "qmk",
"width": 13,
"height": 4,
"layouts": {
"LAYOUT": {
"layout": [
{ "label": "Tab", "x": 0, "y": 0 },
{ "label": "Q", "x": 1, "y": 0 },
{ "label": "W", "x": 2, "y": 0 },
{ "label": "E", "x": 3, "y": 0 },
{ "label": "R", "x": 4, "y": 0 },
{ "label": "T", "x": 5, "y": 0 },
{ "label": "Y", "x": 6, "y": 0 },
{ "label": "U", "x": 7, "y": 0 },
{ "label": "I", "x": 8, "y": 0 },
{ "label": "O", "x": 9, "y": 0 },
{ "label": "P", "x": 10, "y": 0 },
{ "label": "Back<br>Space", "x": 11, "y": 0 },
{ "x": 12, "y": 0 },
{ "label": "Caps", "x": 0, "y": 1, "w": 1.25 },
{ "label": "A", "x": 1.25, "y": 1 },
{ "label": "S", "x": 2.25, "y": 1 },
{ "label": "D", "x": 3.25, "y": 1 },
{ "label": "F", "x": 4.25, "y": 1 },
{ "label": "G", "x": 5.25, "y": 1 },
{ "label": "H", "x": 6.25, "y": 1 },
{ "label": "J", "x": 7.25, "y": 1 },
{ "label": "K", "x": 8.25, "y": 1 },
{ "label": "L", "x": 9.25, "y": 1 },
{ "label": ":", "x": 10.25, "y": 1 },
{ "label": "Enter", "x": 11.25, "y": 1, "w": 1.75 },
{ "label": "Shift", "x": 0, "y": 2, "w": 1.75 },
{ "label": "Z", "x": 1.75, "y": 2 },
{ "label": "X", "x": 2.75, "y": 2 },
{ "label": "C", "x": 3.75, "y": 2 },
{ "label": "V", "x": 4.75, "y": 2 },
{ "label": "B", "x": 5.75, "y": 2 },
{ "label": "N", "x": 6.75, "y": 2 },
{ "label": "M", "x": 7.75, "y": 2 },
{ "label": "<", "x": 8.75, "y": 2 },
{ "label": ">", "x": 9.75, "y": 2 },
{ "label": "?", "x": 10.75, "y": 2 },
{ "label": "Shift", "x": 11.75, "y": 2, "w": 1.25 },
{ "label": "Hyper", "x": 0, "y": 3, "w": 1.25 },
{ "label": "Super", "x": 1.25, "y": 3 },
{ "label": "Meta", "x": 2.25, "y": 3, "w": 1.25 },
{ "label": "Alt", "x": 3.5, "y": 3, "w": 1.25 },
{ "x": 4.75, "y": 3, "w": 1.75 },
{ "x": 6.5, "y": 3, "w": 1.75 },
{ "label": "Meta", "x": 8.25, "y": 3, "w": 1.25 },
{ "label": "Super", "x": 9.5, "y": 3, "w": 1.25 },
{ "label": "Fn2", "x": 10.75, "y": 3 },
{ "label": "Ctrl", "x": 11.75, "y": 3, "w": 1.25 }
]
}
}
}

View File

@ -5,7 +5,7 @@
/* JD45 keymap definition macro
*/
#define KEYMAP( \
#define LAYOUT( \
K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, \
K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, \
K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, K37, \

View File

@ -3,7 +3,7 @@
/**
*JD45 keymap definition macro
*/
#define KEYMAP_JD45( \
#define LAYOUT_JD45( \
K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, \
K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, \
K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, K37, \

View File

@ -1,4 +1,4 @@
#include "jd45.h"
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@ -19,13 +19,15 @@ extern keymap_config_t keymap_config;
// TODO: (bdietz) - make a symbol layer for greek symbols
// Keycodes
enum planck_keycodes {
enum planck_keycodes
{
QWERTY = SAFE_RANGE,
LOWER,
RAISE,
};
enum macro_keycodes {
enum macro_keycodes
{
KC_ALT_TAB,
KC_CMD_TAB,
KC_CTL_TAB,
@ -99,19 +101,19 @@ enum macro_keycodes {
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
*/
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = KEYMAP_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
[_QWERTY] = LAYOUT_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, ALL_T(KC_NO),
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
HPR_ESC , KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(_MEDIA, KC_SCLN), HPR_QUO,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
KC_LSFT, CTL_Z, ALT_X, GUI_C, KC_V, KC_B, KC_N, KC_M,GUI_COMM, ALT_DOT, CTL_SLSH, KC_RSFT ,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
_______ , _______ , _______ , LOWER , TGL_VIM , TGL_MOUSE , RAISE , _______ , _______ , _______),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
HPR_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(_MEDIA, KC_SCLN), HPR_QUO,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
KC_LSFT, CTL_Z, ALT_X, GUI_C, KC_V, KC_B, KC_N, KC_M, GUI_COMM, ALT_DOT, CTL_SLSH, KC_RSFT,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
_______, _______, _______, LOWER, TGL_VIM, TGL_MOUSE, RAISE, _______, _______, _______),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
// TODO: (bdietz) - update the keymap documentation to include the modifier keys on the third row
/* Lower
// TODO: (bdietz) - update the keymap documentation to include the modifier keys on the third row
/* Lower
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
* | ` | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | Bksp |
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
@ -122,18 +124,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Prev | Next | Mute |
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
*/
[_LOWER] = KEYMAP_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
KC_GRV,KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, KC_BSPC,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
KC_LBRC , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE ,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
KC_RBRC , CTL_T(KC_F7), ALT_T(KC_F8),GUI_T(KC_F9), KC_F10, KC_F11, KC_F12, KC_MINS, GUI_T(KC_EQL) , ALT_T(KC_LBRC), CTL_T(KC_RBRC), KC_BSLS ,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
_______ , _______, _______, _______, _______ , _______ , _______, KC_MPRV, KC_MNXT, KC_MUTE),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
[_LOWER] = LAYOUT_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, KC_BSPC,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
KC_LBRC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
KC_RBRC, CTL_T(KC_F7), ALT_T(KC_F8), GUI_T(KC_F9), KC_F10, KC_F11, KC_F12, KC_MINS, GUI_T(KC_EQL), ALT_T(KC_LBRC), CTL_T(KC_RBRC), KC_BSLS,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_MUTE),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
/* Raise
/* Raise
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
* | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | Bksp |
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
@ -144,18 +146,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Prev | Next | Mute |
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
*/
[_RAISE] = KEYMAP_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
[_RAISE] = LAYOUT_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_BSPC,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
KC_DLR , KC_4, KC_5, KC_6, KC_DOT, KC_PLUS, KC_DOT, KC_4, KC_5, KC_6, KC_ASTR, KC_PIPE ,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
KC_EQL , CTL_T(KC_7), ALT_T(KC_8), GUI_T(KC_9), KC_0, KC_MINS, KC_DOT, KC_1 ,GUI_T(KC_2), ALT_T(KC_3), CTL_T(KC_SLSH), KC_BSLS ,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
_______ , _______, _______, _______, _______ , _______ , _______, KC_MPRV, KC_MNXT, KC_MUTE),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
KC_DLR, KC_4, KC_5, KC_6, KC_DOT, KC_PLUS, KC_DOT, KC_4, KC_5, KC_6, KC_ASTR, KC_PIPE,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
KC_EQL, CTL_T(KC_7), ALT_T(KC_8), GUI_T(KC_9), KC_0, KC_MINS, KC_DOT, KC_1, GUI_T(KC_2), ALT_T(KC_3), CTL_T(KC_SLSH), KC_BSLS,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_MUTE),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
/* Mouse Layer
/* Mouse Layer
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
* | | |ACCL0 | | | | |WHL_L | Up |WHL_R | BTN2 | | |
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
@ -167,18 +169,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
*/
[_MOUSECURSOR] = KEYMAP_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
_______,_______, _______, KC_MS_U, _______, _______, _______, KC_ACL2, KC_ACL1, KC_ACL0, _______, _______, _______,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
_______ ,_______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN2, _______, _______, _______ ,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
_______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
_______ , _______, _______, _______, _______, _______, _______, _______, _______, _______),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
[_MOUSECURSOR] = LAYOUT_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
_______, _______, _______, KC_MS_U, _______, _______, _______, KC_ACL2, KC_ACL1, KC_ACL0, _______, _______, _______,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN2, _______, _______, _______,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
/* Adjust (Lower + Raise)
/* Adjust (Lower + Raise)
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
* | | | | | | | | | | | | | Del |
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
@ -189,19 +191,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | Reset |
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
*/
[_ADJUST] = KEYMAP_JD45(
[_ADJUST] = LAYOUT_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
_______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL ,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
_______ ,_______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______ ,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
_______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
_______ , _______, _______, _______, _______ , _______ , _______, _______, _______, RESET),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
_______, _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
_______, _______, _______, _______, _______, _______, _______, _______, _______, RESET),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
/* VIM
/* VIM
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
* | | | | | | | | | | | | | |
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
@ -212,18 +214,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | |
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
*/
[_VIM] = KEYMAP_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
_______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
_______ ,_______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______ ,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
_______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
_______ , _______, _______, _______, _______ , _______ , _______, _______, _______,_______),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
[_VIM] = LAYOUT_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
/* Media
/* Media
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
* | | | | | | | | | | | | | |
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
@ -234,46 +236,56 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | |
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
*/
[_MEDIA] = KEYMAP_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
_______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
_______ ,_______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_MUTE, _______, KC_MPLY ,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
_______ ,_______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, _______, _______, _______ ,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
_______ , _______, _______, _______, _______ , _______ , _______, _______, _______, _______)
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
[_MEDIA] = LAYOUT_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_MUTE, _______, KC_MPLY,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
_______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, _______, _______, _______,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______)
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
};
void persistant_default_layer_set(uint16_t default_layer) {
void persistant_default_layer_set(uint16_t default_layer)
{
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
bool process_record_user(uint16_t keycode, keyrecord_t *record)
{
switch (keycode)
{
case QWERTY:
if (record->event.pressed) {
default_layer_set(1UL<<_QWERTY);
if (record->event.pressed)
{
default_layer_set(1UL << _QWERTY);
}
return false;
break;
case LOWER:
if (record->event.pressed) {
if (record->event.pressed)
{
layer_on(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
}
else
{
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
break;
case RAISE:
if (record->event.pressed) {
if (record->event.pressed)
{
layer_on(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
}
else
{
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
@ -288,54 +300,69 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
*/
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
if (!eeconfig_is_enabled()) {
if (!eeconfig_is_enabled())
{
eeconfig_init();
}
bool use_cmd = true; // Use, for example, Cmd-Tab, Cmd-C, Cmd-V, etc.
// Compare to MAGIC_SWAP_ALT_GUI and MAGIC_UNSWAP_ALT_GUI configs, set in:
// quantum/quantum.c
if(keymap_config.swap_lalt_lgui == 1 && keymap_config.swap_ralt_rgui == 1) {
if (keymap_config.swap_lalt_lgui == 1 && keymap_config.swap_ralt_rgui == 1)
{
use_cmd = false; // ... or, Alt-Tab, Ctrl-C, Ctrl-V, etc.
}
switch (id) {
switch (id)
{
case KC_ALT_TAB:
if(use_cmd) { return (record->event.pressed ? MACRO( D(LALT), D(TAB), END ) : MACRO( U(TAB), END )); }
else { return (record->event.pressed ? MACRO( D(LGUI), D(TAB), END ) : MACRO( U(TAB), END )); }
if (use_cmd)
{
return (record->event.pressed ? MACRO(D(LALT), D(TAB), END) : MACRO(U(TAB), END));
}
else
{
return (record->event.pressed ? MACRO(D(LGUI), D(TAB), END) : MACRO(U(TAB), END));
}
case KC_CMD_TAB:
if(use_cmd) { return (record->event.pressed ? MACRO( D(LGUI), D(TAB), END ) : MACRO( U(TAB), END )); }
else { return (record->event.pressed ? MACRO( D(LALT), D(TAB), END ) : MACRO( U(TAB), END )); }
if (use_cmd)
{
return (record->event.pressed ? MACRO(D(LGUI), D(TAB), END) : MACRO(U(TAB), END));
}
else
{
return (record->event.pressed ? MACRO(D(LALT), D(TAB), END) : MACRO(U(TAB), END));
}
case KC_CTL_TAB:
return (record->event.pressed ? MACRO( D(LCTRL), D(TAB), END ) : MACRO( U(TAB), END ));
return (record->event.pressed ? MACRO(D(LCTRL), D(TAB), END) : MACRO(U(TAB), END));
case KC_CMD_SLSH:
return (record->event.pressed ? MACRO( D(LGUI), D(SLSH),END ) : MACRO( U(SLSH),END ));
return (record->event.pressed ? MACRO(D(LGUI), D(SLSH), END) : MACRO(U(SLSH), END));
case KC_AG_FIND:
return use_cmd ? MACRODOWN( D(LGUI), T(F), END ) : MACRODOWN( D(LCTRL), T(F), END );
return use_cmd ? MACRODOWN(D(LGUI), T(F), END) : MACRODOWN(D(LCTRL), T(F), END);
case KC_AG_AGAIN:
return use_cmd ? MACRODOWN( D(LGUI), T(G), END ) : MACRODOWN( D(LCTRL), T(G), END );
return use_cmd ? MACRODOWN(D(LGUI), T(G), END) : MACRODOWN(D(LCTRL), T(G), END);
case KC_AG_UNDO:
return use_cmd ? MACRODOWN( D(LGUI), T(Z), END ) : MACRODOWN( D(LCTRL), T(Z), END );
return use_cmd ? MACRODOWN(D(LGUI), T(Z), END) : MACRODOWN(D(LCTRL), T(Z), END);
case KC_AG_CUT:
return use_cmd ? MACRODOWN( D(LGUI), T(X), END ) : MACRODOWN( D(LCTRL), T(X), END );
return use_cmd ? MACRODOWN(D(LGUI), T(X), END) : MACRODOWN(D(LCTRL), T(X), END);
case KC_AG_COPY:
return use_cmd ? MACRODOWN( D(LGUI), T(C), END ) : MACRODOWN( D(LCTRL), T(C), END );
return use_cmd ? MACRODOWN(D(LGUI), T(C), END) : MACRODOWN(D(LCTRL), T(C), END);
case KC_AG_PASTE:
return use_cmd ? MACRODOWN( D(LGUI), T(V), END ) : MACRODOWN( D(LCTRL), T(V), END );
return use_cmd ? MACRODOWN(D(LGUI), T(V), END) : MACRODOWN(D(LCTRL), T(V), END);
case KC_AG_DESK_L:
return use_cmd ? MACRODOWN( D(LGUI), D(LCTRL), T(SCLN), END ) : MACRODOWN( D(LALT), D(LCTRL), T(SCLN), END );
return use_cmd ? MACRODOWN(D(LGUI), D(LCTRL), T(SCLN), END) : MACRODOWN(D(LALT), D(LCTRL), T(SCLN), END);
case KC_AG_DESK_R:
return use_cmd ? MACRODOWN( D(LGUI), D(LCTRL), T(QUOT), END ) : MACRODOWN( D(LALT), D(LCTRL), T(QUOT), END );
return use_cmd ? MACRODOWN(D(LGUI), D(LCTRL), T(QUOT), END) : MACRODOWN(D(LALT), D(LCTRL), T(QUOT), END);
case KC_AG_TAB_C:
return use_cmd ? MACRODOWN( D(LGUI), T(W), END ) : MACRODOWN( D(LCTRL), T(W), END );
return use_cmd ? MACRODOWN(D(LGUI), T(W), END) : MACRODOWN(D(LCTRL), T(W), END);
case KC_AG_TAB_N:
return use_cmd ? MACRODOWN( D(LGUI), T(T), END ) : MACRODOWN( D(LCTRL), T(T), END );
return use_cmd ? MACRODOWN(D(LGUI), T(T), END) : MACRODOWN(D(LCTRL), T(T), END);
case KC_AG_TAB_R:
return use_cmd ? MACRODOWN( D(LGUI), D(LSHIFT), T(T), END ) : MACRODOWN( D(LCTRL), D(LSHIFT), T(T), END );
return use_cmd ? MACRODOWN(D(LGUI), D(LSHIFT), T(T), END) : MACRODOWN(D(LCTRL), D(LSHIFT), T(T), END);
}
return MACRO_NONE;

View File

@ -1,15 +1,15 @@
#include "jd45.h"
#include QMK_KEYBOARD_H
/* this keymap is to provide a basic keyboard layout for testing the matrix
* for more practical and complicated keymap refer to other keymaps in the same folder
*/
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = KEYMAP(
[0] = LAYOUT(
ESC, Q, W, E, R, T, Y, U, I, O, P, QUOT, BSPC,
TAB, A, S, D, F, G, H, J, K, L, SCLN, ENT,
LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT,
PAUSE, LCTL, LALT, DEL, SPC, DEL, LEFT, UP, DOWN, RIGHT ),
PAUSE, LCTL, LALT, DEL, SPC, DEL, LEFT, UP, DOWN, RIGHT),
};
const uint16_t PROGMEM fn_actions[] = {

View File

@ -3,7 +3,7 @@
/**
*JD45 keymap definition macro
*/
#define KEYMAP_JD45( \
#define LAYOUT_JD45( \
K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, \
K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, \
K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, K37, \

View File

@ -1,4 +1,4 @@
#include "jd45.h"
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@ -17,7 +17,8 @@ extern keymap_config_t keymap_config;
#define _ADJUST 16
// Keycodes
enum planck_keycodes {
enum planck_keycodes
{
QWERTY = SAFE_RANGE,
COLEMAK,
DVORAK,
@ -28,7 +29,8 @@ enum planck_keycodes {
EXT_PLV
};
enum macro_keycodes {
enum macro_keycodes
{
KC_ALT_TAB,
KC_CMD_TAB,
KC_CTL_TAB,
@ -89,18 +91,18 @@ enum macro_keycodes {
*/
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = KEYMAP_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
[_QWERTY] = LAYOUT_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_BSPC,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
CTL_ESC , KC_A, KC_S,LT_MC(KC_D), KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, GUI_SEM, ALT_QUO ,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
KC_LSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT ,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
KC_RGUI , KC_LALT , KC_LGUI , LOWER , LT_TC , LT_TC , RAISE , KC_VOLD , KC_VOLU , KC_MPLY),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
CTL_ESC, KC_A, KC_S, LT_MC(KC_D), KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, GUI_SEM, ALT_QUO,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
KC_RGUI, KC_LALT, KC_LGUI, LOWER, LT_TC, LT_TC, RAISE, KC_VOLD, KC_VOLU, KC_MPLY),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
/* Colemak
/* Colemak
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
* |Hyper/Tab| Q | W | F | P | G | J | L | U | Y | ; | Bksp | Bksp |
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
@ -111,18 +113,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | RGUI | Alt | GUI | Lower | TC/Space | TC/Space | Raise | Vol- | Vol+ | Play |
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
*/
[_COLEMAK] = KEYMAP_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
[_COLEMAK] = LAYOUT_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, KC_BSPC,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
CTL_ESC , KC_A, KC_R,LT_MC(KC_S), KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT ,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
KC_LSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT ,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
KC_RGUI , KC_LALT , KC_LGUI , LOWER , LT_TC , LT_TC , RAISE , KC_VOLD , KC_VOLU , KC_MPLY),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
CTL_ESC, KC_A, KC_R, LT_MC(KC_S), KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
KC_RGUI, KC_LALT, KC_LGUI, LOWER, LT_TC, LT_TC, RAISE, KC_VOLD, KC_VOLU, KC_MPLY),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
/* Dvorak
/* Dvorak
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
* |Hyper/Tab| " | , | . | P | Y | F | G | C | R | L | Bksp | Bksp |
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
@ -133,18 +135,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | RGUI | Alt | GUI | Lower | TC/Space | TC/Space | Raise | Vol- | Vol+ | Play |
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
*/
[_DVORAK] = KEYMAP_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
HPR_TAB,KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, KC_BSPC,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
CTL_ESC , KC_A, KC_O,LT_MC(KC_E), KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH ,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
KC_LSFT , KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT ,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
KC_RGUI , KC_LALT , KC_LGUI , LOWER , LT_TC , LT_TC , RAISE , KC_VOLD , KC_VOLU , KC_MPLY),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
[_DVORAK] = LAYOUT_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, KC_BSPC,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
CTL_ESC, KC_A, KC_O, LT_MC(KC_E), KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
KC_RGUI, KC_LALT, KC_LGUI, LOWER, LT_TC, LT_TC, RAISE, KC_VOLD, KC_VOLU, KC_MPLY),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
/* Lower
/* Lower
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | Bksp |
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
@ -155,18 +157,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite | | | | | | | Prev | Next | Mute |
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
*/
[_LOWER] = KEYMAP_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
KC_TILD,KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, KC_BSPC,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
KC_LBRC , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE ,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
KC_RBRC , KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS ,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
BACKLIT , _______, _______, _______, _______ , _______ , _______, KC_MPRV, KC_MNXT, KC_MUTE),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
[_LOWER] = LAYOUT_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, KC_BSPC,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
KC_LBRC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
KC_RBRC, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
BACKLIT, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_MUTE),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
/* Raise
/* Raise
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
* | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | Bksp |
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
@ -177,18 +179,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite | | | | | | | Prev | Next | Mute |
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
*/
[_RAISE] = KEYMAP_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
KC_0 , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_BSPC,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
KC_DLR , KC_4, KC_5, KC_6, KC_DOT, KC_PLUS, KC_DOT, KC_4, KC_5, KC_6, KC_ASTR, KC_PIPE ,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
KC_EQL , KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_DOT, KC_1, KC_2, KC_3, KC_SLSH, KC_BSLS ,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
BACKLIT , _______, _______, _______, _______ , _______ , _______, KC_MPRV, KC_MNXT, KC_MUTE),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
[_RAISE] = LAYOUT_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_BSPC,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
KC_DLR, KC_4, KC_5, KC_6, KC_DOT, KC_PLUS, KC_DOT, KC_4, KC_5, KC_6, KC_ASTR, KC_PIPE,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
KC_EQL, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_DOT, KC_1, KC_2, KC_3, KC_SLSH, KC_BSLS,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
BACKLIT, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_MUTE),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
/* TouchCursor layer (http://martin-stone.github.io/touchcursor/) plus personal customizations
/* TouchCursor layer (http://martin-stone.github.io/touchcursor/) plus personal customizations
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
* | AltTab |CmdTab|CtlTab| GUI |Shift | ~ |Insert| Home | Up | End | Bksp | | |
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
@ -203,18 +205,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* seem to work on Mac. Presumably they'll work under Windows.
*/
[_TOUCHCURSOR] = KEYMAP_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
ALT_TAB,CMD_TAB, CTL_TAB, KC_LGUI, KC_LSFT, KC_TILD, KC_INS, KC_HOME, KC_UP, KC_END, KC_BSPC, _______, _______,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
_______ ,KC_LALT, KC_SPC, AG_T_C, AG_FIND,AG_AGAIN, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, AG_D_L, AG_D_R ,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
_______ ,AG_UNDO, AG_CUT, AG_COPY,AG_PASTE, KC_GRV, KC_PGDN, KC_DEL, AG_T_N, AG_T_R,CMD_SLSH, _______ ,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
_______ , _______, _______, _______, _______ , _______ , _______, _______, _______, _______),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
[_TOUCHCURSOR] = LAYOUT_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
ALT_TAB, CMD_TAB, CTL_TAB, KC_LGUI, KC_LSFT, KC_TILD, KC_INS, KC_HOME, KC_UP, KC_END, KC_BSPC, _______, _______,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
_______, KC_LALT, KC_SPC, AG_T_C, AG_FIND, AG_AGAIN, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, AG_D_L, AG_D_R,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
_______, AG_UNDO, AG_CUT, AG_COPY, AG_PASTE, KC_GRV, KC_PGDN, KC_DEL, AG_T_N, AG_T_R, CMD_SLSH, _______,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
/* Mouse Layer
/* Mouse Layer
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
* | | |ACCL0 | | | | |WHL_L | Up |WHL_R | BTN2 | | |
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
@ -226,18 +228,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
*/
[_MOUSECURSOR] = KEYMAP_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
_______,_______, KC_ACL0, _______, _______, _______, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_BTN2, _______, _______,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
_______ ,KC_ACL2, KC_BTN2, _______, KC_BTN1, KC_ACL1, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN4, KC_BTN5 ,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
_______ ,_______, _______, _______, KC_BTN3, _______, KC_WH_D, KC_BTN1, _______, _______, KC_BTN3, _______ ,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
_______ , _______, _______, _______, _______, _______, _______, _______, _______, _______),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
[_MOUSECURSOR] = LAYOUT_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
_______, _______, KC_ACL0, _______, _______, _______, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_BTN2, _______, _______,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
_______, KC_ACL2, KC_BTN2, _______, KC_BTN1, KC_ACL1, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN4, KC_BTN5,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
_______, _______, _______, _______, KC_BTN3, _______, KC_WH_D, KC_BTN1, _______, _______, KC_BTN3, _______,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
/* Plover layer (http://opensteno.org)
/* Plover layer (http://opensteno.org)
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
* | # | # | # | # | # | # | # | # | # | # | # | # | # |
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
@ -249,18 +251,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
*/
[_PLOVER] = KEYMAP_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
KC_1 , KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 ,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
XXXXXXX , KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC ,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
XXXXXXX , KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT ,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
EXT_PLV , XXXXXXX, KC_C, KC_V, XXXXXXX , XXXXXXX , KC_N, KC_M, XXXXXXX, XXXXXXX),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
[_PLOVER] = LAYOUT_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
EXT_PLV, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX),
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
/* Adjust (Lower + Raise)
/* Adjust (Lower + Raise)
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
* | | | | | | | | | | | | | Del |
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
@ -271,81 +273,98 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | Reset |
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
*/
[_ADJUST] = KEYMAP_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
_______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL ,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
_______ ,_______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______ ,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
_______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
_______ , _______, _______, _______, _______ , _______ , _______, _______, _______, RESET)
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
[_ADJUST] = LAYOUT_JD45(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
_______, _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______,
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
_______, _______, _______, _______, _______, _______, _______, _______, _______, RESET)
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
};
void persistent_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer)
{
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
bool process_record_user(uint16_t keycode, keyrecord_t *record)
{
switch (keycode)
{
case QWERTY:
if (record->event.pressed) {
default_layer_set(1UL<<_QWERTY);
if (record->event.pressed)
{
default_layer_set(1UL << _QWERTY);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
default_layer_set(1UL<<_COLEMAK);
if (record->event.pressed)
{
default_layer_set(1UL << _COLEMAK);
}
return false;
break;
case DVORAK:
if (record->event.pressed) {
default_layer_set(1UL<<_DVORAK);
if (record->event.pressed)
{
default_layer_set(1UL << _DVORAK);
}
return false;
break;
case LOWER:
if (record->event.pressed) {
if (record->event.pressed)
{
layer_on(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
}
else
{
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
break;
case RAISE:
if (record->event.pressed) {
if (record->event.pressed)
{
layer_on(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
} else {
}
else
{
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
break;
case BACKLIT:
if (record->event.pressed) {
if (record->event.pressed)
{
register_code(KC_RSFT);
#ifdef BACKLIGHT_ENABLE
#ifdef BACKLIGHT_ENABLE
backlight_step();
#endif
} else {
#endif
}
else
{
unregister_code(KC_RSFT);
}
return false;
break;
case PLOVER:
if (record->event.pressed) {
if (record->event.pressed)
{
layer_off(_RAISE);
layer_off(_LOWER);
layer_off(_ADJUST);
layer_on(_PLOVER);
if (!eeconfig_is_enabled()) {
if (!eeconfig_is_enabled())
{
eeconfig_init();
}
keymap_config.raw = eeconfig_read_keymap();
@ -355,7 +374,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return false;
break;
case EXT_PLV:
if (record->event.pressed) {
if (record->event.pressed)
{
layer_off(_PLOVER);
}
return false;
@ -369,54 +389,69 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
*/
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
if (!eeconfig_is_enabled()) {
if (!eeconfig_is_enabled())
{
eeconfig_init();
}
bool use_cmd = true; // Use, for example, Cmd-Tab, Cmd-C, Cmd-V, etc.
// Compare to MAGIC_SWAP_ALT_GUI and MAGIC_UNSWAP_ALT_GUI configs, set in:
// quantum/quantum.c
if(keymap_config.swap_lalt_lgui == 1 && keymap_config.swap_ralt_rgui == 1) {
if (keymap_config.swap_lalt_lgui == 1 && keymap_config.swap_ralt_rgui == 1)
{
use_cmd = false; // ... or, Alt-Tab, Ctrl-C, Ctrl-V, etc.
}
switch (id) {
switch (id)
{
case KC_ALT_TAB:
if(use_cmd) { return (record->event.pressed ? MACRO( D(LALT), D(TAB), END ) : MACRO( U(TAB), END )); }
else { return (record->event.pressed ? MACRO( D(LGUI), D(TAB), END ) : MACRO( U(TAB), END )); }
if (use_cmd)
{
return (record->event.pressed ? MACRO(D(LALT), D(TAB), END) : MACRO(U(TAB), END));
}
else
{
return (record->event.pressed ? MACRO(D(LGUI), D(TAB), END) : MACRO(U(TAB), END));
}
case KC_CMD_TAB:
if(use_cmd) { return (record->event.pressed ? MACRO( D(LGUI), D(TAB), END ) : MACRO( U(TAB), END )); }
else { return (record->event.pressed ? MACRO( D(LALT), D(TAB), END ) : MACRO( U(TAB), END )); }
if (use_cmd)
{
return (record->event.pressed ? MACRO(D(LGUI), D(TAB), END) : MACRO(U(TAB), END));
}
else
{
return (record->event.pressed ? MACRO(D(LALT), D(TAB), END) : MACRO(U(TAB), END));
}
case KC_CTL_TAB:
return (record->event.pressed ? MACRO( D(LCTRL), D(TAB), END ) : MACRO( U(TAB), END ));
return (record->event.pressed ? MACRO(D(LCTRL), D(TAB), END) : MACRO(U(TAB), END));
case KC_CMD_SLSH:
return (record->event.pressed ? MACRO( D(LGUI), D(SLSH),END ) : MACRO( U(SLSH),END ));
return (record->event.pressed ? MACRO(D(LGUI), D(SLSH), END) : MACRO(U(SLSH), END));
case KC_AG_FIND:
return use_cmd ? MACRODOWN( D(LGUI), T(F), END ) : MACRODOWN( D(LCTRL), T(F), END );
return use_cmd ? MACRODOWN(D(LGUI), T(F), END) : MACRODOWN(D(LCTRL), T(F), END);
case KC_AG_AGAIN:
return use_cmd ? MACRODOWN( D(LGUI), T(G), END ) : MACRODOWN( D(LCTRL), T(G), END );
return use_cmd ? MACRODOWN(D(LGUI), T(G), END) : MACRODOWN(D(LCTRL), T(G), END);
case KC_AG_UNDO:
return use_cmd ? MACRODOWN( D(LGUI), T(Z), END ) : MACRODOWN( D(LCTRL), T(Z), END );
return use_cmd ? MACRODOWN(D(LGUI), T(Z), END) : MACRODOWN(D(LCTRL), T(Z), END);
case KC_AG_CUT:
return use_cmd ? MACRODOWN( D(LGUI), T(X), END ) : MACRODOWN( D(LCTRL), T(X), END );
return use_cmd ? MACRODOWN(D(LGUI), T(X), END) : MACRODOWN(D(LCTRL), T(X), END);
case KC_AG_COPY:
return use_cmd ? MACRODOWN( D(LGUI), T(C), END ) : MACRODOWN( D(LCTRL), T(C), END );
return use_cmd ? MACRODOWN(D(LGUI), T(C), END) : MACRODOWN(D(LCTRL), T(C), END);
case KC_AG_PASTE:
return use_cmd ? MACRODOWN( D(LGUI), T(V), END ) : MACRODOWN( D(LCTRL), T(V), END );
return use_cmd ? MACRODOWN(D(LGUI), T(V), END) : MACRODOWN(D(LCTRL), T(V), END);
case KC_AG_DESK_L:
return use_cmd ? MACRODOWN( D(LGUI), D(LCTRL), T(SCLN), END ) : MACRODOWN( D(LALT), D(LCTRL), T(SCLN), END );
return use_cmd ? MACRODOWN(D(LGUI), D(LCTRL), T(SCLN), END) : MACRODOWN(D(LALT), D(LCTRL), T(SCLN), END);
case KC_AG_DESK_R:
return use_cmd ? MACRODOWN( D(LGUI), D(LCTRL), T(QUOT), END ) : MACRODOWN( D(LALT), D(LCTRL), T(QUOT), END );
return use_cmd ? MACRODOWN(D(LGUI), D(LCTRL), T(QUOT), END) : MACRODOWN(D(LALT), D(LCTRL), T(QUOT), END);
case KC_AG_TAB_C:
return use_cmd ? MACRODOWN( D(LGUI), T(W), END ) : MACRODOWN( D(LCTRL), T(W), END );
return use_cmd ? MACRODOWN(D(LGUI), T(W), END) : MACRODOWN(D(LCTRL), T(W), END);
case KC_AG_TAB_N:
return use_cmd ? MACRODOWN( D(LGUI), T(T), END ) : MACRODOWN( D(LCTRL), T(T), END );
return use_cmd ? MACRODOWN(D(LGUI), T(T), END) : MACRODOWN(D(LCTRL), T(T), END);
case KC_AG_TAB_R:
return use_cmd ? MACRODOWN( D(LGUI), D(LSHIFT), T(T), END ) : MACRODOWN( D(LCTRL), D(LSHIFT), T(T), END );
return use_cmd ? MACRODOWN(D(LGUI), D(LSHIFT), T(T), END) : MACRODOWN(D(LCTRL), D(LSHIFT), T(T), END);
}
return MACRO_NONE;

View File

@ -1,34 +1,35 @@
#include "jd45.h"
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = KEYMAP(
[0] = LAYOUT(
ESC, Q, W, F, P, G, J, L, U, Y, SCLN, QUOT, BSPC,
FN8, A, R, S, T, D, H, N, E, I, O, ENT,
LSFT, Z, X, C, V, B, K, M, COMM, DOT, SLSH, FN6,
FN4, LGUI, FN7, FN2, FN1, SPC, FN5, RALT, FN3, FN0 ),
[1] = KEYMAP(
FN4, LGUI, FN7, FN2, FN1, SPC, FN5, RALT, FN3, FN0),
[1] = LAYOUT(
TRNS, FN10, FN11, FN12, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, UP, DEL,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, HOME, PGUP, LEFT, RGHT,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, END, PGDN, DOWN, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS ),
[2] = KEYMAP(
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS),
[2] = LAYOUT(
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, 7, 8, 9, 0, TRNS, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, LBRC, 4, 5, 6, DOT, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, RBRC, 1, 2, 3, BSLS, TRNS,
TRNS,FN29, TRNS, TRNS, TRNS, PAUSE, EQL, MINS, TRNS, TRNS ),
[3] = KEYMAP(
TRNS, FN29, TRNS, TRNS, TRNS, PAUSE, EQL, MINS, TRNS, TRNS),
[3] = LAYOUT(
TRNS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS ),
[4] = KEYMAP(
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS),
[4] = LAYOUT(
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, 7, 8, 9, 0, TRNS, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, LBRC, 4, 5, 6, DOT, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, RBRC, 1, 2, 3, BSLS, TRNS,
TRNS,FN29, TRNS, TRNS, TRNS, PAUSE, EQL, MINS, TRNS, TRNS ),
TRNS, FN29, TRNS, TRNS, TRNS, PAUSE, EQL, MINS, TRNS, TRNS),
};
enum macro_id {
enum macro_id
{
PSWD1,
PSWD2,
PSWD3,
@ -60,19 +61,14 @@ const uint16_t PROGMEM fn_actions[] = {
*/
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
switch (id) {
switch (id)
{
case PSWD1:
return (record->event.pressed ?
MACRO( I(0), T(1), T(2), T(3), T(4), T(5), T(6), T(7), T(8), T(ENT), END ) :
MACRO_NONE );
return (record->event.pressed ? MACRO(I(0), T(1), T(2), T(3), T(4), T(5), T(6), T(7), T(8), T(ENT), END) : MACRO_NONE);
case PSWD2:
return (record->event.pressed ?
MACRO( I(0), T(1), T(2), T(3), T(4), T(5), T(6), T(7), T(8), T(ENT), END ) :
MACRO_NONE );
return (record->event.pressed ? MACRO(I(0), T(1), T(2), T(3), T(4), T(5), T(6), T(7), T(8), T(ENT), END) : MACRO_NONE);
case PSWD3:
return (record->event.pressed ?
MACRO( I(0), T(1), T(2), T(3), T(4), T(5), T(6), T(7), T(8), T(ENT), END ) :
MACRO_NONE );
return (record->event.pressed ? MACRO(I(0), T(1), T(2), T(3), T(4), T(5), T(6), T(7), T(8), T(ENT), END) : MACRO_NONE);
//case VOLUP:
// return (record->event.pressed ?
// MACRO( D(VOLU), U(VOLU), END ) :

View File

@ -1,33 +1,34 @@
#include "jd45.h"
#include QMK_KEYBOARD_H
/* Mike's Layout for JD45 with backlight LEDs acting as layer indicator
*/
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = KEYMAP(
[0] = LAYOUT(
TAB, Q, W, E, R, T, Y, U, I, O, P, MINS, BSLS,
FN1, A, S, D, F, G, H, J, K, L, QUOT, ENT,
FN0, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT,
NO, LCTL, LALT, LGUI, SPC, BSPC, APP, FN2, ESC, NO ),
[1] = KEYMAP(
GRV, TRNS, UP, TRNS, 7, 8, 9, 0, MINS, EQL, PSCR, LBRC, RBRC,
TRNS, LEFT, DOWN, RGHT, 4, 5, 6, INS, HOME, PGUP, SCLN, TRNS,
TRNS, TRNS, TRNS, TRNS, 1, 2, 3, DEL, END, PGDN, TRNS, TRNS,
TRNS, TRNS, TRNS, SPC, TRNS, DEL, TRNS, FN3, TRNS, TRNS ),
[2] = KEYMAP(
TRNS, TRNS, VOLU, TRNS, F7, F8, F9, F10, F11, F12, PSCR, FN3, FN4,
TRNS, MPRV, VOLD, MNXT, F4, F5, F6, J, K, L, SCLN, TRNS,
TRNS, TRNS, TRNS, TRNS, F1, F2, F3, MUTE, MPRV, MNXT, MSTP, TRNS,
TRNS, TRNS, TRNS, LGUI, TRNS, TRNS, TRNS, TRNS, PAUS, TRNS )
/* ,
[3] = KEYMAP(
NO, LCTL, LALT, LGUI, SPC, BSPC, APP, FN2, ESC, NO),
[1] = LAYOUT(
GRV, TRNS, UP, TRNS, 7, 8, 9, 0, MINS, EQL, PSCR, LBRC, RBRC,
TRNS, LEFT, DOWN, RGHT, 4, 5, 6, INS, HOME, PGUP, SCLN, TRNS,
TRNS, TRNS, TRNS, TRNS, 1, 2, 3, DEL, END, PGDN, TRNS, TRNS,
TRNS, TRNS, TRNS, SPC, TRNS, DEL, TRNS, FN3, TRNS, TRNS),
[2] = LAYOUT(
TRNS, TRNS, VOLU, TRNS, F7, F8, F9, F10, F11, F12, PSCR, FN3, FN4,
TRNS, MPRV, VOLD, MNXT, F4, F5, F6, J, K, L, SCLN, TRNS,
TRNS, TRNS, TRNS, TRNS, F1, F2, F3, MUTE, MPRV, MNXT, MSTP, TRNS,
TRNS, TRNS, TRNS, LGUI, TRNS, TRNS, TRNS, TRNS, PAUS, TRNS)
/* ,
[3] = LAYOUT(
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, BTLD, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS )*/
};
enum macro_id {
enum macro_id
{
M_LAYER1,
M_LAYER2
};
@ -38,13 +39,13 @@ const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_MACRO(M_LAYER1),
[2] = ACTION_LAYER_TAP_TOGGLE(2),
[3] = ACTION_BACKLIGHT_STEP(),
[4] = ACTION_BACKLIGHT_TOGGLE()
};
[4] = ACTION_BACKLIGHT_TOGGLE()};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch(id) {
switch (id)
{
case M_LAYER1:
// need to add a timer for doubletap: https://github.com/jackhumbert/qmk_firmware/wiki#timer-functionality
// action_function_tap may also handle this...

View File

@ -1,4 +1,4 @@
#include "jd45.h"
#include QMK_KEYBOARD_H
enum jd45_layers
{
@ -37,46 +37,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
{F_FNTAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_BSPC},
{CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(_ADJUST, KC_QUOT)},
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)},
{ XXXXXXX, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, F_FNSPC, XXXXXXX, XXXXXXX, MO(_FUNCTION), MO(_ADJUST) }
},
[_QWERTYNUMMODS] = {
{F_FNTAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_BSPC},
{CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(_ADJUST, KC_QUOT)},
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)},
{XXXXXXX, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, F_NUMSPC, XXXXXXX, XXXXXXX, MO(_FKEYNUMPAD), MO(_ADJUST) }
},
[_NUMSYM] = {
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, KC_DEL},
{__MOD__, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______},
{_______, _______, _______, _______, _______, KC_SPC, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______},
{XXXXXXX, __MOD__, __MOD__, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__}
},
[_FUNCTION] = {
{__MOD__, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
{__MOD__, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
{XXXXXXX, __MOD__, __MOD__, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__ , __MOD__}
},
[_NUMPAD] = {
{KC_GRV, _______, KC_UP, _______, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_PSCR, KC_LBRC, KC_RBRC},
{_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_4, KC_5, KC_6, KC_INS, KC_HOME, KC_PGUP, _______, _______},
{_______, _______, _______, _______, KC_1, KC_2, KC_3, KC_DEL, KC_END, KC_PGDN, _______, _______},
{XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__}
},
[_FKEYNUMPAD] = {
{_______, _______, KC_VOLU, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, _______, _______},
{_______, KC_MPRV, KC_VOLD, KC_MNXT, KC_F4, KC_F5, KC_F6, KC_J, KC_K, KC_L, KC_SCLN, _______},
{_______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_MUTE, KC_MPRV, KC_MNXT, KC_MSTP, _______},
{XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__ }
},
[_ADJUST] = {
{_______, RESET, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, KC_PSCR, _______, _______},
{ _______, _______, _______, _______, USEFNMODS, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, MACSLEEP, _______, _______},
{ _______, _______, _______, _______, _______, _______, USENUMMODS, _______, _______, _______, _______, _______},
{XXXXXXX, _______, _______,XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__}
}
};
{XXXXXXX, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, F_FNSPC, XXXXXXX, XXXXXXX, MO(_FUNCTION), MO(_ADJUST)}},
[_QWERTYNUMMODS] = {{F_FNTAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_BSPC}, {CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(_ADJUST, KC_QUOT)}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)}, {XXXXXXX, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, F_NUMSPC, XXXXXXX, XXXXXXX, MO(_FKEYNUMPAD), MO(_ADJUST)}},
[_NUMSYM] = {{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, KC_DEL}, {__MOD__, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______}, {_______, _______, _______, _______, _______, KC_SPC, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______}, {XXXXXXX, __MOD__, __MOD__, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__}},
[_FUNCTION] = {{__MOD__, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, {__MOD__, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {XXXXXXX, __MOD__, __MOD__, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__}},
[_NUMPAD] = {{KC_GRV, _______, KC_UP, _______, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_PSCR, KC_LBRC, KC_RBRC}, {_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_4, KC_5, KC_6, KC_INS, KC_HOME, KC_PGUP, _______, _______}, {_______, _______, _______, _______, KC_1, KC_2, KC_3, KC_DEL, KC_END, KC_PGDN, _______, _______}, {XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__}},
[_FKEYNUMPAD] = {{_______, _______, KC_VOLU, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, _______, _______}, {_______, KC_MPRV, KC_VOLD, KC_MNXT, KC_F4, KC_F5, KC_F6, KC_J, KC_K, KC_L, KC_SCLN, _______}, {_______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_MUTE, KC_MPRV, KC_MNXT, KC_MSTP, _______}, {XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__}},
[_ADJUST] = {{_______, RESET, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, KC_PSCR, _______, _______}, {_______, _______, _______, _______, USEFNMODS, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, MACSLEEP, _______, _______}, {_______, _______, _______, _______, _______, _______, USENUMMODS, _______, _______, _______, _______, _______}, {XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__}}};
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_LAYER_TAP_KEY(_NUMSYM, KC_SPC),
@ -84,24 +51,29 @@ const uint16_t PROGMEM fn_actions[] = {
[2] = ACTION_LAYER_TAP_KEY(_FUNCTION, KC_TAB),
};
void persistent_default_layer_set(uint16_t default_layer) {
void persistent_default_layer_set(uint16_t default_layer)
{
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
static bool singular_key = false;
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
bool process_record_user(uint16_t keycode, keyrecord_t *record)
{
uint16_t macro_kc = (keycode == MO(_ADJUST) ? DYN_REC_STOP : keycode);
if (!process_record_dynamic_macro(macro_kc, record)) {
if (!process_record_dynamic_macro(macro_kc, record))
{
return false;
}
println(" ");
print("process record");
switch (keycode) {
switch (keycode)
{
case MACSLEEP:
if (record->event.pressed) {
if (record->event.pressed)
{
// ACTION_MODS_KEY(MOD_LCTL | MOD_LSFT, KC_POWER);
register_code(KC_RSFT);
register_code(KC_RCTL);
@ -113,21 +85,23 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return false;
break;
case USEFNMODS:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_QWERTY);
#ifdef AUDIO_ENABLE
if (record->event.pressed)
{
persistent_default_layer_set(1UL << _QWERTY);
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_fnpc, false, 0);
#endif
#endif
print("Space-FN");
}
return false;
break;
case USENUMMODS:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_QWERTYNUMMODS);
#ifdef AUDIO_ENABLE
if (record->event.pressed)
{
persistent_default_layer_set(1UL << _QWERTYNUMMODS);
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_fnmac, false, 0);
#endif
#endif
print("Space-Numpad");
}
return false;
@ -140,10 +114,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
};
void matrix_init_user(void) {
#ifdef AUDIO_ENABLE
void matrix_init_user(void)
{
#ifdef AUDIO_ENABLE
startup_user();
#endif
#endif
// debug_enable = true;
}