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:
parent
43e589aa02
commit
187d76476e
|
@ -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 }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -30,7 +30,7 @@ inline void gh60_wasd_leds_off(void) { DDRF &= ~(1<<7); PORTF &= ~(1<<7); }
|
||||||
|
|
||||||
/* JD40 MKII keymap definition macro
|
/* JD40 MKII keymap definition macro
|
||||||
*/
|
*/
|
||||||
#define KEYMAP( \
|
#define LAYOUT( \
|
||||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, \
|
K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, \
|
||||||
K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, \
|
K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, \
|
||||||
K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, \
|
K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "jd40.h"
|
#include QMK_KEYBOARD_H
|
||||||
#include "action_layer.h"
|
#include "action_layer.h"
|
||||||
|
|
||||||
#define _BL 0
|
#define _BL 0
|
||||||
|
@ -7,32 +7,33 @@
|
||||||
#define _UL 3
|
#define _UL 3
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
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,
|
F12, Q, W, E, R, T, Y, U, I, O, P, BSPC,
|
||||||
TAB, A, S, D, F, G, H, J, K, L, ENT,
|
TAB, A, S, D, F, G, H, J, K, L, ENT,
|
||||||
LSFT, Z, X, C, V, B, N, M, COMM, UP, DOT,
|
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(
|
|
||||||
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 ),
|
|
||||||
|
|
||||||
[_FL] = KEYMAP(
|
[_AL] = LAYOUT(
|
||||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, DEL,
|
||||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
CAPS, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0,
|
||||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, SCLN, PGUP, QUOT,
|
||||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS ),
|
TRNS, TRNS, TRNS, TRNS, FN3, FN3, TRNS, HOME, PGDN, END),
|
||||||
|
|
||||||
[_UL] = 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, 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, TRNS, TRNS,
|
||||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS ),
|
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS),
|
||||||
|
|
||||||
|
[_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),
|
||||||
};
|
};
|
||||||
|
|
||||||
enum function_id {
|
enum function_id
|
||||||
|
{
|
||||||
RGBLED_TOGGLE,
|
RGBLED_TOGGLE,
|
||||||
RGBLED_STEP_MODE,
|
RGBLED_STEP_MODE,
|
||||||
RGBLED_INCREASE_HUE,
|
RGBLED_INCREASE_HUE,
|
||||||
|
@ -41,20 +42,20 @@ enum function_id {
|
||||||
RGBLED_DECREASE_SAT,
|
RGBLED_DECREASE_SAT,
|
||||||
RGBLED_INCREASE_VAL,
|
RGBLED_INCREASE_VAL,
|
||||||
RGBLED_DECREASE_VAL,
|
RGBLED_DECREASE_VAL,
|
||||||
SHIFT_ESC,
|
SHIFT_ESC,
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
[0] = ACTION_LAYER_MOMENTARY(1), // Momentary Fn overlay
|
[0] = ACTION_LAYER_MOMENTARY(1), // Momentary Fn overlay
|
||||||
[1] = ACTION_LAYER_TOGGLE(2), // Toggle Arrow Layer overlay
|
[1] = ACTION_LAYER_TOGGLE(2), // Toggle Arrow Layer overlay
|
||||||
[2] = ACTION_LAYER_TAP_KEY(2, KC_CAPS), // Tap to toggle caps lock and hold to activate function layer
|
[2] = ACTION_LAYER_TAP_KEY(2, KC_CAPS), // Tap to toggle caps lock and hold to activate function layer
|
||||||
[3] = ACTION_LAYER_TOGGLE(3), // Toggle Underglow Layer overlay
|
[3] = ACTION_LAYER_TOGGLE(3), // Toggle Underglow Layer overlay
|
||||||
[4] = ACTION_FUNCTION(RGBLED_TOGGLE), //Turn on/off underglow
|
[4] = ACTION_FUNCTION(RGBLED_TOGGLE), //Turn on/off underglow
|
||||||
[5] = ACTION_FUNCTION(RGBLED_STEP_MODE), // Change underglow mode
|
[5] = ACTION_FUNCTION(RGBLED_STEP_MODE), // Change underglow mode
|
||||||
[6] = ACTION_FUNCTION(RGBLED_INCREASE_HUE),
|
[6] = ACTION_FUNCTION(RGBLED_INCREASE_HUE),
|
||||||
[7] = ACTION_FUNCTION(RGBLED_DECREASE_HUE),
|
[7] = ACTION_FUNCTION(RGBLED_DECREASE_HUE),
|
||||||
[8] = ACTION_FUNCTION(RGBLED_INCREASE_SAT),
|
[8] = ACTION_FUNCTION(RGBLED_INCREASE_SAT),
|
||||||
[9] = ACTION_FUNCTION(RGBLED_DECREASE_SAT),
|
[9] = ACTION_FUNCTION(RGBLED_DECREASE_SAT),
|
||||||
[10] = ACTION_FUNCTION(RGBLED_INCREASE_VAL),
|
[10] = ACTION_FUNCTION(RGBLED_INCREASE_VAL),
|
||||||
[11] = ACTION_FUNCTION(RGBLED_DECREASE_VAL),
|
[11] = ACTION_FUNCTION(RGBLED_DECREASE_VAL),
|
||||||
[12] = ACTION_FUNCTION(SHIFT_ESC),
|
[12] = ACTION_FUNCTION(SHIFT_ESC),
|
||||||
|
@ -62,103 +63,133 @@ const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
||||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
{
|
{
|
||||||
// MACRODOWN only works in this function
|
// MACRODOWN only works in this function
|
||||||
switch(id) {
|
switch (id)
|
||||||
case 0:
|
{
|
||||||
if (record->event.pressed) {
|
case 0:
|
||||||
|
if (record->event.pressed)
|
||||||
|
{
|
||||||
register_code(KC_RSFT);
|
register_code(KC_RSFT);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
unregister_code(KC_RSFT);
|
unregister_code(KC_RSFT);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return MACRO_NONE;
|
return MACRO_NONE;
|
||||||
};
|
};
|
||||||
|
|
||||||
void matrix_scan_user(void) {
|
void matrix_scan_user(void)
|
||||||
|
{
|
||||||
|
|
||||||
// Layer LED indicators
|
// Layer LED indicators
|
||||||
// ESC led on when in function layer, WASD cluster leds enabled when on arrow cluster
|
// ESC led on when in function layer, WASD cluster leds enabled when on arrow cluster
|
||||||
uint32_t layer = layer_state;
|
uint32_t layer = layer_state;
|
||||||
if (layer & (1<<1)) {
|
if (layer & (1 << 1))
|
||||||
|
{
|
||||||
//gh60_wasd_leds_on();
|
//gh60_wasd_leds_on();
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
//gh60_wasd_leds_off();
|
//gh60_wasd_leds_off();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (layer & (1<<2)) {
|
if (layer & (1 << 2))
|
||||||
|
{
|
||||||
//gh60_esc_led_on();
|
//gh60_esc_led_on();
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
//gh60_esc_led_off();
|
//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) {
|
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
switch (id) {
|
{
|
||||||
|
switch (id)
|
||||||
|
{
|
||||||
case RGBLED_TOGGLE:
|
case RGBLED_TOGGLE:
|
||||||
//led operations
|
//led operations
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed)
|
||||||
rgblight_toggle();
|
{
|
||||||
|
rgblight_toggle();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RGBLED_INCREASE_HUE:
|
case RGBLED_INCREASE_HUE:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed)
|
||||||
rgblight_increase_hue();
|
{
|
||||||
|
rgblight_increase_hue();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RGBLED_DECREASE_HUE:
|
case RGBLED_DECREASE_HUE:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed)
|
||||||
rgblight_decrease_hue();
|
{
|
||||||
|
rgblight_decrease_hue();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RGBLED_INCREASE_SAT:
|
case RGBLED_INCREASE_SAT:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed)
|
||||||
rgblight_increase_sat();
|
{
|
||||||
|
rgblight_increase_sat();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RGBLED_DECREASE_SAT:
|
case RGBLED_DECREASE_SAT:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed)
|
||||||
rgblight_decrease_sat();
|
{
|
||||||
|
rgblight_decrease_sat();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RGBLED_INCREASE_VAL:
|
case RGBLED_INCREASE_VAL:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed)
|
||||||
rgblight_increase_val();
|
{
|
||||||
|
rgblight_increase_val();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RGBLED_DECREASE_VAL:
|
case RGBLED_DECREASE_VAL:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed)
|
||||||
rgblight_decrease_val();
|
{
|
||||||
|
rgblight_decrease_val();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RGBLED_STEP_MODE:
|
case RGBLED_STEP_MODE:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed)
|
||||||
rgblight_step();
|
{
|
||||||
|
rgblight_step();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
static uint8_t shift_esc_shift_mask;
|
static uint8_t shift_esc_shift_mask;
|
||||||
// Shift + ESC = ~
|
// Shift + ESC = ~
|
||||||
case SHIFT_ESC:
|
case SHIFT_ESC:
|
||||||
shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
|
shift_esc_shift_mask = get_mods() & MODS_CTRL_MASK;
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed)
|
||||||
if (shift_esc_shift_mask) {
|
{
|
||||||
add_key(KC_GRV);
|
if (shift_esc_shift_mask)
|
||||||
send_keyboard_report();
|
{
|
||||||
} else {
|
add_key(KC_GRV);
|
||||||
add_key(KC_ESC);
|
send_keyboard_report();
|
||||||
send_keyboard_report();
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
add_key(KC_ESC);
|
||||||
|
send_keyboard_report();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
else
|
||||||
if (shift_esc_shift_mask) {
|
{
|
||||||
del_key(KC_GRV);
|
if (shift_esc_shift_mask)
|
||||||
send_keyboard_report();
|
{
|
||||||
} else {
|
del_key(KC_GRV);
|
||||||
del_key(KC_ESC);
|
send_keyboard_report();
|
||||||
send_keyboard_report();
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
del_key(KC_ESC);
|
||||||
|
send_keyboard_report();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "../../config.h"
|
#include "../../config.h"
|
||||||
|
|
||||||
#define KEYMAP_VANAGON(\
|
#define LAYOUT_VANAGON(\
|
||||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, \
|
K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, \
|
||||||
K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, \
|
K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, \
|
||||||
K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, \
|
K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, \
|
||||||
|
|
|
@ -1,29 +1,26 @@
|
||||||
#include "jd40.h"
|
#include QMK_KEYBOARD_H
|
||||||
#include "action_layer.h"
|
#include "action_layer.h"
|
||||||
|
|
||||||
enum {
|
enum
|
||||||
_BL = 0,
|
{
|
||||||
_AL1,
|
_BL = 0,
|
||||||
_AL2,
|
_AL1,
|
||||||
|
_AL2,
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
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,
|
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),
|
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,
|
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)
|
MO(_AL2), KC_LCTL, KC_LALT, KC_LGUI, KC_ENT, KC_SPC, KC_RGUI, KC_RALT, KC_RSPC, MO(_AL2)),
|
||||||
),
|
[_AL1] = LAYOUT_VANAGON(
|
||||||
[_AL1] = KEYMAP_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_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_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_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),
|
||||||
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,
|
||||||
[_AL2] = KEYMAP_VANAGON(
|
KC_TRNS, KC_PIPE, KC_DQT, KC_UNDS, KC_PLUS, KC_SCLN, KC_TRNS, KC_4, KC_5, KC_6, KC_TRNS,
|
||||||
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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_1, KC_2, KC_3, 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_TRNS, KC_TRNS, KC_TRNS, 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
|
|
||||||
)
|
|
||||||
};
|
|
||||||
|
|
|
@ -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 }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
/* JD45 keymap definition macro
|
/* JD45 keymap definition macro
|
||||||
*/
|
*/
|
||||||
#define KEYMAP( \
|
#define LAYOUT( \
|
||||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, \
|
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, \
|
K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, \
|
||||||
K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, K37, \
|
K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, K37, \
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
/**
|
/**
|
||||||
*JD45 keymap definition macro
|
*JD45 keymap definition macro
|
||||||
*/
|
*/
|
||||||
#define KEYMAP_JD45( \
|
#define LAYOUT_JD45( \
|
||||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, \
|
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, \
|
K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, \
|
||||||
K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, K37, \
|
K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, K37, \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "jd45.h"
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
extern keymap_config_t keymap_config;
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
@ -19,28 +19,30 @@ extern keymap_config_t keymap_config;
|
||||||
// TODO: (bdietz) - make a symbol layer for greek symbols
|
// TODO: (bdietz) - make a symbol layer for greek symbols
|
||||||
|
|
||||||
// Keycodes
|
// Keycodes
|
||||||
enum planck_keycodes {
|
enum planck_keycodes
|
||||||
QWERTY = SAFE_RANGE,
|
{
|
||||||
LOWER,
|
QWERTY = SAFE_RANGE,
|
||||||
RAISE,
|
LOWER,
|
||||||
|
RAISE,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum macro_keycodes {
|
enum macro_keycodes
|
||||||
KC_ALT_TAB,
|
{
|
||||||
KC_CMD_TAB,
|
KC_ALT_TAB,
|
||||||
KC_CTL_TAB,
|
KC_CMD_TAB,
|
||||||
KC_CMD_SLSH,
|
KC_CTL_TAB,
|
||||||
KC_AG_FIND,
|
KC_CMD_SLSH,
|
||||||
KC_AG_AGAIN,
|
KC_AG_FIND,
|
||||||
KC_AG_UNDO,
|
KC_AG_AGAIN,
|
||||||
KC_AG_CUT,
|
KC_AG_UNDO,
|
||||||
KC_AG_COPY,
|
KC_AG_CUT,
|
||||||
KC_AG_PASTE,
|
KC_AG_COPY,
|
||||||
KC_AG_DESK_L,
|
KC_AG_PASTE,
|
||||||
KC_AG_DESK_R,
|
KC_AG_DESK_L,
|
||||||
KC_AG_TAB_C,
|
KC_AG_DESK_R,
|
||||||
KC_AG_TAB_N,
|
KC_AG_TAB_C,
|
||||||
KC_AG_TAB_R,
|
KC_AG_TAB_N,
|
||||||
|
KC_AG_TAB_R,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Fillers to make layering more clear
|
// Fillers to make layering more clear
|
||||||
|
@ -55,36 +57,36 @@ enum macro_keycodes {
|
||||||
* - will fire z if tapped
|
* - will fire z if tapped
|
||||||
* - will fire cmd/super/win if held
|
* - will fire cmd/super/win if held
|
||||||
*/
|
*/
|
||||||
#define ALT_DOT ALT_T(KC_DOT)
|
#define ALT_DOT ALT_T(KC_DOT)
|
||||||
#define ALT_X ALT_T(KC_X)
|
#define ALT_X ALT_T(KC_X)
|
||||||
#define CTL_SLSH CTL_T(KC_SLSH)
|
#define CTL_SLSH CTL_T(KC_SLSH)
|
||||||
#define CTL_Z CTL_T(KC_Z)
|
#define CTL_Z CTL_T(KC_Z)
|
||||||
#define GUI_C GUI_T(KC_C)
|
#define GUI_C GUI_T(KC_C)
|
||||||
#define GUI_COMM GUI_T(KC_COMM)
|
#define GUI_COMM GUI_T(KC_COMM)
|
||||||
#define HPR_ESC ALL_T(KC_ESC)
|
#define HPR_ESC ALL_T(KC_ESC)
|
||||||
#define HPR_QUO ALL_T(KC_QUOT)
|
#define HPR_QUO ALL_T(KC_QUOT)
|
||||||
|
|
||||||
// Toggle to VIM when left space button is held, emit space keycode when left space is tapped
|
// Toggle to VIM when left space button is held, emit space keycode when left space is tapped
|
||||||
#define TGL_VIM LT(_VIM, KC_SPC)
|
#define TGL_VIM LT(_VIM, KC_SPC)
|
||||||
// Toggle to the mouse layer when the right space button is held and emit enter when right space is tapped
|
// Toggle to the mouse layer when the right space button is held and emit enter when right space is tapped
|
||||||
#define TGL_MOUSE LT(_MOUSECURSOR, KC_ENT)
|
#define TGL_MOUSE LT(_MOUSECURSOR, KC_ENT)
|
||||||
|
|
||||||
// TODO: (bdietz) - need to audit these keycodes to see what sort of cool things the default layout was doing.
|
// TODO: (bdietz) - need to audit these keycodes to see what sort of cool things the default layout was doing.
|
||||||
#define ALT_TAB M(KC_ALT_TAB) // Macro for Alt-Tab
|
#define ALT_TAB M(KC_ALT_TAB) // Macro for Alt-Tab
|
||||||
#define CMD_TAB M(KC_CMD_TAB) // Macro for Cmd-Tab
|
#define CMD_TAB M(KC_CMD_TAB) // Macro for Cmd-Tab
|
||||||
#define CTL_TAB M(KC_CTL_TAB) // Macro for Ctl-Tab
|
#define CTL_TAB M(KC_CTL_TAB) // Macro for Ctl-Tab
|
||||||
#define CMD_SLSH M(KC_CMD_SLSH) // Macro for Cmd-Slash (personal shortcut to toggle iTerm2 visibility)
|
#define CMD_SLSH M(KC_CMD_SLSH) // Macro for Cmd-Slash (personal shortcut to toggle iTerm2 visibility)
|
||||||
#define AG_FIND M(KC_AG_FIND) // Macros for Cmd-[x] vs Ctrl-[x] based on current AG_NORM or AG_SWAP settings
|
#define AG_FIND M(KC_AG_FIND) // Macros for Cmd-[x] vs Ctrl-[x] based on current AG_NORM or AG_SWAP settings
|
||||||
#define AG_AGAIN M(KC_AG_AGAIN)
|
#define AG_AGAIN M(KC_AG_AGAIN)
|
||||||
#define AG_UNDO M(KC_AG_UNDO)
|
#define AG_UNDO M(KC_AG_UNDO)
|
||||||
#define AG_CUT M(KC_AG_CUT)
|
#define AG_CUT M(KC_AG_CUT)
|
||||||
#define AG_COPY M(KC_AG_COPY)
|
#define AG_COPY M(KC_AG_COPY)
|
||||||
#define AG_PASTE M(KC_AG_PASTE)
|
#define AG_PASTE M(KC_AG_PASTE)
|
||||||
#define AG_D_L M(KC_AG_DESK_L) // For Virtual Desktop Switching: Left, and
|
#define AG_D_L M(KC_AG_DESK_L) // For Virtual Desktop Switching: Left, and
|
||||||
#define AG_D_R M(KC_AG_DESK_R) // Right
|
#define AG_D_R M(KC_AG_DESK_R) // Right
|
||||||
#define AG_T_C M(KC_AG_TAB_C) // For Chrome, etc. Tab Close,
|
#define AG_T_C M(KC_AG_TAB_C) // For Chrome, etc. Tab Close,
|
||||||
#define AG_T_N M(KC_AG_TAB_N) // Tab New, and
|
#define AG_T_N M(KC_AG_TAB_N) // Tab New, and
|
||||||
#define AG_T_R M(KC_AG_TAB_R) // Tab Reopen Closed
|
#define AG_T_R M(KC_AG_TAB_R) // Tab Reopen Closed
|
||||||
|
|
||||||
/* Qwerty
|
/* Qwerty
|
||||||
*
|
*
|
||||||
|
@ -99,19 +101,19 @@ enum macro_keycodes {
|
||||||
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
|
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
|
||||||
*/
|
*/
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
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),
|
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,
|
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 ,
|
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 , _______ , _______ , _______),
|
_______, _______, _______, LOWER, TGL_VIM, TGL_MOUSE, RAISE, _______, _______, _______),
|
||||||
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
|
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
|
||||||
|
|
||||||
// TODO: (bdietz) - update the keymap documentation to include the modifier keys on the third row
|
// TODO: (bdietz) - update the keymap documentation to include the modifier keys on the third row
|
||||||
/* Lower
|
/* Lower
|
||||||
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
|
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
|
||||||
* | ` | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | Bksp |
|
* | ` | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | Bksp |
|
||||||
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
|
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
|
||||||
|
@ -122,18 +124,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* | | | | | | | | Prev | Next | Mute |
|
* | | | | | | | | Prev | Next | Mute |
|
||||||
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
|
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
|
||||||
*/
|
*/
|
||||||
[_LOWER] = KEYMAP_JD45(
|
[_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_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_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_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),
|
_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_MUTE),
|
||||||
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
|
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
|
||||||
|
|
||||||
/* Raise
|
/* Raise
|
||||||
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
|
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
|
||||||
* | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | Bksp |
|
* | ~ | 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 |
|
* | | | | | | | | 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_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_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_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_MPRV, KC_MNXT, KC_MUTE),
|
||||||
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
|
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
|
||||||
|
|
||||||
/* Mouse Layer
|
/* Mouse Layer
|
||||||
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
|
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
|
||||||
* | | |ACCL0 | | | | |WHL_L | Up |WHL_R | BTN2 | | |
|
* | | |ACCL0 | | | | |WHL_L | Up |WHL_R | BTN2 | | |
|
||||||
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
|
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
|
||||||
|
@ -167,18 +169,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
|
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[_MOUSECURSOR] = KEYMAP_JD45(
|
[_MOUSECURSOR] = LAYOUT_JD45(
|
||||||
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
|
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
|
||||||
_______,_______, _______, KC_MS_U, _______, _______, _______, KC_ACL2, KC_ACL1, KC_ACL0, _______, _______, _______,
|
_______, _______, _______, KC_MS_U, _______, _______, _______, KC_ACL2, KC_ACL1, KC_ACL0, _______, _______, _______,
|
||||||
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
|
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
|
||||||
_______ ,_______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN2, _______, _______, _______ ,
|
_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN2, _______, _______, _______,
|
||||||
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
|
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
|
||||||
_______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
|
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
|
||||||
_______ , _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||||
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
|
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
|
||||||
|
|
||||||
/* Adjust (Lower + Raise)
|
/* Adjust (Lower + Raise)
|
||||||
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
|
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
|
||||||
* | | | | | | | | | | | | | Del |
|
* | | | | | | | | | | | | | Del |
|
||||||
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
|
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
|
||||||
|
@ -189,19 +191,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* | | | | | | | | | | Reset |
|
* | | | | | | | | | | Reset |
|
||||||
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
|
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
|
||||||
*/
|
*/
|
||||||
[_ADJUST] = KEYMAP_JD45(
|
[_ADJUST] = LAYOUT_JD45(
|
||||||
|
|
||||||
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
|
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
|
||||||
_______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL ,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
|
||||||
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
|
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
|
||||||
_______ ,_______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______ ,
|
_______, _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______,
|
||||||
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
|
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
|
||||||
_______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
|
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
|
||||||
_______ , _______, _______, _______, _______ , _______ , _______, _______, _______, RESET),
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, RESET),
|
||||||
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
|
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
|
||||||
|
|
||||||
/* VIM
|
/* VIM
|
||||||
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
|
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
|
||||||
* | | | | | | | | | | | | | |
|
* | | | | | | | | | | | | | |
|
||||||
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
|
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
|
||||||
|
@ -212,18 +214,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* | | | | | | | | | | |
|
* | | | | | | | | | | |
|
||||||
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
|
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
|
||||||
*/
|
*/
|
||||||
[_VIM] = KEYMAP_JD45(
|
[_VIM] = LAYOUT_JD45(
|
||||||
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
|
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
|
||||||
_______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
|
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
|
||||||
_______ ,_______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______ ,
|
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______,
|
||||||
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
|
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
|
||||||
_______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
|
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
|
||||||
_______ , _______, _______, _______, _______ , _______ , _______, _______, _______,_______),
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||||
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
|
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
|
||||||
|
|
||||||
/* Media
|
/* Media
|
||||||
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
|
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
|
||||||
* | | | | | | | | | | | | | |
|
* | | | | | | | | | | | | | |
|
||||||
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
|
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
|
||||||
|
@ -234,53 +236,63 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* | | | | | | | | | | |
|
* | | | | | | | | | | |
|
||||||
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
|
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
|
||||||
*/
|
*/
|
||||||
[_MEDIA] = KEYMAP_JD45(
|
[_MEDIA] = LAYOUT_JD45(
|
||||||
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
|
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
|
||||||
_______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
|
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
|
||||||
_______ ,_______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_MUTE, _______, KC_MPLY ,
|
_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_MUTE, _______, KC_MPLY,
|
||||||
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
|
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
|
||||||
_______ ,_______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, _______, _______, _______ ,
|
_______, _______, _______, _______, _______, _______, _______, 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);
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record)
|
||||||
switch (keycode) {
|
{
|
||||||
|
switch (keycode)
|
||||||
|
{
|
||||||
case QWERTY:
|
case QWERTY:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed)
|
||||||
default_layer_set(1UL<<_QWERTY);
|
{
|
||||||
}
|
default_layer_set(1UL << _QWERTY);
|
||||||
return false;
|
}
|
||||||
break;
|
return false;
|
||||||
|
break;
|
||||||
case LOWER:
|
case LOWER:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed)
|
||||||
layer_on(_LOWER);
|
{
|
||||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
layer_on(_LOWER);
|
||||||
} else {
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
layer_off(_LOWER);
|
}
|
||||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
else
|
||||||
}
|
{
|
||||||
return false;
|
layer_off(_LOWER);
|
||||||
break;
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
case RAISE:
|
case RAISE:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed)
|
||||||
layer_on(_RAISE);
|
{
|
||||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
layer_on(_RAISE);
|
||||||
} else {
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
layer_off(_RAISE);
|
}
|
||||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
else
|
||||||
}
|
{
|
||||||
return false;
|
layer_off(_RAISE);
|
||||||
break;
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
}
|
}
|
||||||
return true;
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -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)
|
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();
|
{
|
||||||
|
eeconfig_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool use_cmd = true; // Use, for example, Cmd-Tab, Cmd-C, Cmd-V, etc.
|
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:
|
// Compare to MAGIC_SWAP_ALT_GUI and MAGIC_UNSWAP_ALT_GUI configs, set in:
|
||||||
// quantum/quantum.c
|
// 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.
|
{
|
||||||
|
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 )); }
|
case KC_ALT_TAB:
|
||||||
else { return (record->event.pressed ? MACRO( D(LGUI), D(TAB), END ) : MACRO( U(TAB), END )); }
|
if (use_cmd)
|
||||||
case KC_CMD_TAB:
|
{
|
||||||
if(use_cmd) { return (record->event.pressed ? MACRO( D(LGUI), D(TAB), END ) : MACRO( U(TAB), END )); }
|
return (record->event.pressed ? MACRO(D(LALT), D(TAB), END) : MACRO(U(TAB), END));
|
||||||
else { 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));
|
||||||
|
}
|
||||||
|
|
||||||
case KC_CTL_TAB:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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;
|
return MACRO_NONE;
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
#include "jd45.h"
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
/* this keymap is to provide a basic keyboard layout for testing the matrix
|
/* 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
|
* for more practical and complicated keymap refer to other keymaps in the same folder
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
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,
|
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,
|
TAB, A, S, D, F, G, H, J, K, L, SCLN, ENT,
|
||||||
LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT,
|
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[] = {
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
/**
|
/**
|
||||||
*JD45 keymap definition macro
|
*JD45 keymap definition macro
|
||||||
*/
|
*/
|
||||||
#define KEYMAP_JD45( \
|
#define LAYOUT_JD45( \
|
||||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, \
|
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, \
|
K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, \
|
||||||
K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, K37, \
|
K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, K37, \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "jd45.h"
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
extern keymap_config_t keymap_config;
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
@ -17,33 +17,35 @@ extern keymap_config_t keymap_config;
|
||||||
#define _ADJUST 16
|
#define _ADJUST 16
|
||||||
|
|
||||||
// Keycodes
|
// Keycodes
|
||||||
enum planck_keycodes {
|
enum planck_keycodes
|
||||||
QWERTY = SAFE_RANGE,
|
{
|
||||||
COLEMAK,
|
QWERTY = SAFE_RANGE,
|
||||||
DVORAK,
|
COLEMAK,
|
||||||
PLOVER,
|
DVORAK,
|
||||||
LOWER,
|
PLOVER,
|
||||||
RAISE,
|
LOWER,
|
||||||
BACKLIT,
|
RAISE,
|
||||||
EXT_PLV
|
BACKLIT,
|
||||||
|
EXT_PLV
|
||||||
};
|
};
|
||||||
|
|
||||||
enum macro_keycodes {
|
enum macro_keycodes
|
||||||
KC_ALT_TAB,
|
{
|
||||||
KC_CMD_TAB,
|
KC_ALT_TAB,
|
||||||
KC_CTL_TAB,
|
KC_CMD_TAB,
|
||||||
KC_CMD_SLSH,
|
KC_CTL_TAB,
|
||||||
KC_AG_FIND,
|
KC_CMD_SLSH,
|
||||||
KC_AG_AGAIN,
|
KC_AG_FIND,
|
||||||
KC_AG_UNDO,
|
KC_AG_AGAIN,
|
||||||
KC_AG_CUT,
|
KC_AG_UNDO,
|
||||||
KC_AG_COPY,
|
KC_AG_CUT,
|
||||||
KC_AG_PASTE,
|
KC_AG_COPY,
|
||||||
KC_AG_DESK_L,
|
KC_AG_PASTE,
|
||||||
KC_AG_DESK_R,
|
KC_AG_DESK_L,
|
||||||
KC_AG_TAB_C,
|
KC_AG_DESK_R,
|
||||||
KC_AG_TAB_N,
|
KC_AG_TAB_C,
|
||||||
KC_AG_TAB_R,
|
KC_AG_TAB_N,
|
||||||
|
KC_AG_TAB_R,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Fillers to make layering more clear
|
// Fillers to make layering more clear
|
||||||
|
@ -51,29 +53,29 @@ enum macro_keycodes {
|
||||||
#define XXXXXXX KC_NO
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
// Custom macros
|
// Custom macros
|
||||||
#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl
|
#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl
|
||||||
#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift
|
#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift
|
||||||
#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper
|
#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper
|
||||||
#define GUI_SEM GUI_T(KC_SCLN) // Tap for Semicolon, hold for GUI
|
#define GUI_SEM GUI_T(KC_SCLN) // Tap for Semicolon, hold for GUI
|
||||||
#define ALT_QUO ALT_T(KC_QUOT) // Tap for Quote, hold for Alt
|
#define ALT_QUO ALT_T(KC_QUOT) // Tap for Quote, hold for Alt
|
||||||
// Requires KC_TRNS/_______ for the trigger key in the destination layer
|
// Requires KC_TRNS/_______ for the trigger key in the destination layer
|
||||||
#define LT_TC LT(_TOUCHCURSOR, KC_SPC) // L-ayer T-ap T-ouch C-ursor
|
#define LT_TC LT(_TOUCHCURSOR, KC_SPC) // L-ayer T-ap T-ouch C-ursor
|
||||||
#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor
|
#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor
|
||||||
#define ALT_TAB M(KC_ALT_TAB) // Macro for Alt-Tab
|
#define ALT_TAB M(KC_ALT_TAB) // Macro for Alt-Tab
|
||||||
#define CMD_TAB M(KC_CMD_TAB) // Macro for Cmd-Tab
|
#define CMD_TAB M(KC_CMD_TAB) // Macro for Cmd-Tab
|
||||||
#define CTL_TAB M(KC_CTL_TAB) // Macro for Ctl-Tab
|
#define CTL_TAB M(KC_CTL_TAB) // Macro for Ctl-Tab
|
||||||
#define CMD_SLSH M(KC_CMD_SLSH) // Macro for Cmd-Slash (personal shortcut to toggle iTerm2 visibility)
|
#define CMD_SLSH M(KC_CMD_SLSH) // Macro for Cmd-Slash (personal shortcut to toggle iTerm2 visibility)
|
||||||
#define AG_FIND M(KC_AG_FIND) // Macros for Cmd-[x] vs Ctrl-[x] based on current AG_NORM or AG_SWAP settings
|
#define AG_FIND M(KC_AG_FIND) // Macros for Cmd-[x] vs Ctrl-[x] based on current AG_NORM or AG_SWAP settings
|
||||||
#define AG_AGAIN M(KC_AG_AGAIN)
|
#define AG_AGAIN M(KC_AG_AGAIN)
|
||||||
#define AG_UNDO M(KC_AG_UNDO)
|
#define AG_UNDO M(KC_AG_UNDO)
|
||||||
#define AG_CUT M(KC_AG_CUT)
|
#define AG_CUT M(KC_AG_CUT)
|
||||||
#define AG_COPY M(KC_AG_COPY)
|
#define AG_COPY M(KC_AG_COPY)
|
||||||
#define AG_PASTE M(KC_AG_PASTE)
|
#define AG_PASTE M(KC_AG_PASTE)
|
||||||
#define AG_D_L M(KC_AG_DESK_L) // For Virtual Desktop Switching: Left, and
|
#define AG_D_L M(KC_AG_DESK_L) // For Virtual Desktop Switching: Left, and
|
||||||
#define AG_D_R M(KC_AG_DESK_R) // Right
|
#define AG_D_R M(KC_AG_DESK_R) // Right
|
||||||
#define AG_T_C M(KC_AG_TAB_C) // For Chrome, etc. Tab Close,
|
#define AG_T_C M(KC_AG_TAB_C) // For Chrome, etc. Tab Close,
|
||||||
#define AG_T_N M(KC_AG_TAB_N) // Tab New, and
|
#define AG_T_N M(KC_AG_TAB_N) // Tab New, and
|
||||||
#define AG_T_R M(KC_AG_TAB_R) // Tab Reopen Closed
|
#define AG_T_R M(KC_AG_TAB_R) // Tab Reopen Closed
|
||||||
|
|
||||||
/* Qwerty
|
/* Qwerty
|
||||||
*
|
*
|
||||||
|
@ -89,18 +91,18 @@ enum macro_keycodes {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
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,
|
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 ,
|
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_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),
|
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 |
|
* |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 |
|
* | 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,
|
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 ,
|
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_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),
|
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 |
|
* |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 |
|
* | RGUI | Alt | GUI | Lower | TC/Space | TC/Space | Raise | Vol- | Vol+ | Play |
|
||||||
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
|
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
|
||||||
*/
|
*/
|
||||||
[_DVORAK] = KEYMAP_JD45(
|
[_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,
|
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 ,
|
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_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),
|
KC_RGUI, KC_LALT, KC_LGUI, LOWER, LT_TC, LT_TC, RAISE, KC_VOLD, KC_VOLU, KC_MPLY),
|
||||||
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
|
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
|
||||||
|
|
||||||
/* Lower
|
/* Lower
|
||||||
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
|
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
|
||||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | Bksp |
|
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | Bksp |
|
||||||
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
|
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
|
||||||
|
@ -155,18 +157,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* | Brite | | | | | | | Prev | Next | Mute |
|
* | Brite | | | | | | | Prev | Next | Mute |
|
||||||
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
|
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
|
||||||
*/
|
*/
|
||||||
[_LOWER] = KEYMAP_JD45(
|
[_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_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_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 ,
|
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),
|
BACKLIT, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_MUTE),
|
||||||
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
|
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
|
||||||
|
|
||||||
/* Raise
|
/* Raise
|
||||||
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
|
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
|
||||||
* | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | Bksp |
|
* | 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 |
|
* | Brite | | | | | | | Prev | Next | Mute |
|
||||||
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
|
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
|
||||||
*/
|
*/
|
||||||
[_RAISE] = KEYMAP_JD45(
|
[_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_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_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 ,
|
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),
|
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 | | |
|
* | 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.
|
* seem to work on Mac. Presumably they'll work under Windows.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[_TOUCHCURSOR] = KEYMAP_JD45(
|
[_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, _______, _______,
|
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 ,
|
_______, 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, _______ ,
|
_______, 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 | | |
|
* | | |ACCL0 | | | | |WHL_L | Up |WHL_R | BTN2 | | |
|
||||||
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
|
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
|
||||||
|
@ -226,18 +228,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
|
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[_MOUSECURSOR] = KEYMAP_JD45(
|
[_MOUSECURSOR] = LAYOUT_JD45(
|
||||||
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
|
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
|
||||||
_______,_______, KC_ACL0, _______, _______, _______, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_BTN2, _______, _______,
|
_______, _______, 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_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, _______ ,
|
_______, _______, _______, _______, 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(
|
[_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 ,
|
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_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 ,
|
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),
|
EXT_PLV, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX),
|
||||||
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
|
/*`----------+-----------+-----------+-----------+----^^^----+----^^^----+-----------+-----------+-----------+--------'*/
|
||||||
|
|
||||||
/* Adjust (Lower + Raise)
|
/* Adjust (Lower + Raise)
|
||||||
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
|
* ,---------+------+------+------+------+------+------+------+------+------+------+------+------.
|
||||||
* | | | | | | | | | | | | | Del |
|
* | | | | | | | | | | | | | Del |
|
||||||
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
|
* |---------`------`------`------`------`------`------`------`------`------`------`------`------|
|
||||||
|
@ -271,97 +273,115 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* | | | | | | | | | | Reset |
|
* | | | | | | | | | | Reset |
|
||||||
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
|
* `-------+-------+-------+-------+---^^^----+---^^^----+---------+--------+--------+----------'
|
||||||
*/
|
*/
|
||||||
[_ADJUST] = KEYMAP_JD45(
|
[_ADJUST] = LAYOUT_JD45(
|
||||||
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
|
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------.*/
|
||||||
_______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL ,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
|
||||||
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
|
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------`--------|*/
|
||||||
_______ ,_______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______ ,
|
_______, _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______,
|
||||||
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
|
/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/
|
||||||
_______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
|
/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/
|
||||||
_______ , _______, _______, _______, _______ , _______ , _______, _______, _______, RESET)
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, 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);
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record)
|
||||||
switch (keycode) {
|
{
|
||||||
|
switch (keycode)
|
||||||
|
{
|
||||||
case QWERTY:
|
case QWERTY:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed)
|
||||||
default_layer_set(1UL<<_QWERTY);
|
{
|
||||||
}
|
default_layer_set(1UL << _QWERTY);
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case COLEMAK:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
default_layer_set(1UL<<_COLEMAK);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case DVORAK:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
default_layer_set(1UL<<_DVORAK);
|
|
||||||
}
|
|
||||||
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 BACKLIT:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
register_code(KC_RSFT);
|
|
||||||
#ifdef BACKLIGHT_ENABLE
|
|
||||||
backlight_step();
|
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
unregister_code(KC_RSFT);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case PLOVER:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
layer_off(_RAISE);
|
|
||||||
layer_off(_LOWER);
|
|
||||||
layer_off(_ADJUST);
|
|
||||||
layer_on(_PLOVER);
|
|
||||||
if (!eeconfig_is_enabled()) {
|
|
||||||
eeconfig_init();
|
|
||||||
}
|
}
|
||||||
keymap_config.raw = eeconfig_read_keymap();
|
return false;
|
||||||
keymap_config.nkro = 1;
|
break;
|
||||||
eeconfig_update_keymap(keymap_config.raw);
|
case COLEMAK:
|
||||||
}
|
if (record->event.pressed)
|
||||||
return false;
|
{
|
||||||
break;
|
default_layer_set(1UL << _COLEMAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case DVORAK:
|
||||||
|
if (record->event.pressed)
|
||||||
|
{
|
||||||
|
default_layer_set(1UL << _DVORAK);
|
||||||
|
}
|
||||||
|
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 BACKLIT:
|
||||||
|
if (record->event.pressed)
|
||||||
|
{
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
backlight_step();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case PLOVER:
|
||||||
|
if (record->event.pressed)
|
||||||
|
{
|
||||||
|
layer_off(_RAISE);
|
||||||
|
layer_off(_LOWER);
|
||||||
|
layer_off(_ADJUST);
|
||||||
|
layer_on(_PLOVER);
|
||||||
|
if (!eeconfig_is_enabled())
|
||||||
|
{
|
||||||
|
eeconfig_init();
|
||||||
|
}
|
||||||
|
keymap_config.raw = eeconfig_read_keymap();
|
||||||
|
keymap_config.nkro = 1;
|
||||||
|
eeconfig_update_keymap(keymap_config.raw);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
case EXT_PLV:
|
case EXT_PLV:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed)
|
||||||
layer_off(_PLOVER);
|
{
|
||||||
}
|
layer_off(_PLOVER);
|
||||||
return false;
|
}
|
||||||
break;
|
return false;
|
||||||
}
|
break;
|
||||||
return true;
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -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)
|
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();
|
{
|
||||||
|
eeconfig_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool use_cmd = true; // Use, for example, Cmd-Tab, Cmd-C, Cmd-V, etc.
|
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:
|
// Compare to MAGIC_SWAP_ALT_GUI and MAGIC_UNSWAP_ALT_GUI configs, set in:
|
||||||
// quantum/quantum.c
|
// 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.
|
{
|
||||||
|
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 )); }
|
case KC_ALT_TAB:
|
||||||
else { return (record->event.pressed ? MACRO( D(LGUI), D(TAB), END ) : MACRO( U(TAB), END )); }
|
if (use_cmd)
|
||||||
case KC_CMD_TAB:
|
{
|
||||||
if(use_cmd) { return (record->event.pressed ? MACRO( D(LGUI), D(TAB), END ) : MACRO( U(TAB), END )); }
|
return (record->event.pressed ? MACRO(D(LALT), D(TAB), END) : MACRO(U(TAB), END));
|
||||||
else { 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));
|
||||||
|
}
|
||||||
|
|
||||||
case KC_CTL_TAB:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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;
|
return MACRO_NONE;
|
||||||
|
|
|
@ -1,58 +1,59 @@
|
||||||
#include "jd45.h"
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
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,
|
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,
|
FN8, A, R, S, T, D, H, N, E, I, O, ENT,
|
||||||
LSFT, Z, X, C, V, B, K, M, COMM, DOT, SLSH, FN6,
|
LSFT, Z, X, C, V, B, K, M, COMM, DOT, SLSH, FN6,
|
||||||
FN4, LGUI, FN7, FN2, FN1, SPC, FN5, RALT, FN3, FN0 ),
|
FN4, LGUI, FN7, FN2, FN1, SPC, FN5, RALT, FN3, FN0),
|
||||||
[1] = KEYMAP(
|
[1] = LAYOUT(
|
||||||
TRNS, FN10, FN11, FN12, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, UP, DEL,
|
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, HOME, PGUP, LEFT, RGHT,
|
||||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, END, PGDN, DOWN, TRNS,
|
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, END, PGDN, DOWN, TRNS,
|
||||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS ),
|
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS),
|
||||||
[2] = KEYMAP(
|
[2] = LAYOUT(
|
||||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, 7, 8, 9, 0, TRNS, TRNS,
|
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, LBRC, 4, 5, 6, DOT, TRNS,
|
||||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, RBRC, 1, 2, 3, BSLS, 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),
|
||||||
[3] = KEYMAP(
|
[3] = LAYOUT(
|
||||||
TRNS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,
|
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, 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(
|
[4] = LAYOUT(
|
||||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, 7, 8, 9, 0, TRNS, TRNS,
|
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, LBRC, 4, 5, 6, DOT, TRNS,
|
||||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, RBRC, 1, 2, 3, BSLS, 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,
|
PSWD1,
|
||||||
PSWD3,
|
PSWD2,
|
||||||
|
PSWD3,
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
[0] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_MINS),
|
[0] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_MINS),
|
||||||
[1] = ACTION_LAYER_MOMENTARY(1), // FN1
|
[1] = ACTION_LAYER_MOMENTARY(1), // FN1
|
||||||
[2] = ACTION_LAYER_MOMENTARY(2), // FN2
|
[2] = ACTION_LAYER_MOMENTARY(2), // FN2
|
||||||
[3] = ACTION_LAYER_MOMENTARY(3), // FN3
|
[3] = ACTION_LAYER_MOMENTARY(3), // FN3
|
||||||
[4] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_GRV),
|
[4] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_GRV),
|
||||||
[5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_RGUI),
|
[5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_RGUI),
|
||||||
[6] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_CAPS),
|
[6] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_CAPS),
|
||||||
[7] = ACTION_LAYER_MODS(4, MOD_LSFT), // FN4
|
[7] = ACTION_LAYER_MODS(4, MOD_LSFT), // FN4
|
||||||
[8] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_TAB),
|
[8] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_TAB),
|
||||||
|
|
||||||
[10] = ACTION_MACRO(PSWD1),
|
[10] = ACTION_MACRO(PSWD1),
|
||||||
[11] = ACTION_MACRO(PSWD2),
|
[11] = ACTION_MACRO(PSWD2),
|
||||||
[12] = ACTION_MACRO(PSWD3),
|
[12] = ACTION_MACRO(PSWD3),
|
||||||
|
|
||||||
[29] = ACTION_BACKLIGHT_TOGGLE(),
|
[29] = ACTION_BACKLIGHT_TOGGLE(),
|
||||||
[30] = ACTION_BACKLIGHT_INCREASE(),
|
[30] = ACTION_BACKLIGHT_INCREASE(),
|
||||||
[31] = ACTION_BACKLIGHT_DECREASE()
|
[31] = ACTION_BACKLIGHT_DECREASE()
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -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)
|
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 ?
|
case PSWD1:
|
||||||
MACRO( I(0), T(1), T(2), T(3), T(4), T(5), T(6), T(7), T(8), T(ENT), END ) :
|
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);
|
||||||
MACRO_NONE );
|
case PSWD2:
|
||||||
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 ?
|
case PSWD3:
|
||||||
MACRO( I(0), T(1), T(2), T(3), T(4), T(5), T(6), T(7), T(8), T(ENT), END ) :
|
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);
|
||||||
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 );
|
|
||||||
//case VOLUP:
|
//case VOLUP:
|
||||||
// return (record->event.pressed ?
|
// return (record->event.pressed ?
|
||||||
// MACRO( D(VOLU), U(VOLU), END ) :
|
// MACRO( D(VOLU), U(VOLU), END ) :
|
||||||
|
|
|
@ -1,33 +1,34 @@
|
||||||
#include "jd45.h"
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
/* Mike's Layout for JD45 with backlight LEDs acting as layer indicator
|
/* Mike's Layout for JD45 with backlight LEDs acting as layer indicator
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
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,
|
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,
|
FN1, A, S, D, F, G, H, J, K, L, QUOT, ENT,
|
||||||
FN0, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT,
|
FN0, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT,
|
||||||
NO, LCTL, LALT, LGUI, SPC, BSPC, APP, FN2, ESC, NO ),
|
NO, LCTL, LALT, LGUI, SPC, BSPC, APP, FN2, ESC, NO),
|
||||||
[1] = KEYMAP(
|
[1] = LAYOUT(
|
||||||
GRV, TRNS, UP, TRNS, 7, 8, 9, 0, MINS, EQL, PSCR, LBRC, RBRC,
|
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, 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, TRNS, 1, 2, 3, DEL, END, PGDN, TRNS, TRNS,
|
||||||
TRNS, TRNS, TRNS, SPC, TRNS, DEL, TRNS, FN3, TRNS, TRNS ),
|
TRNS, TRNS, TRNS, SPC, TRNS, DEL, TRNS, FN3, TRNS, TRNS),
|
||||||
[2] = KEYMAP(
|
[2] = LAYOUT(
|
||||||
TRNS, TRNS, VOLU, TRNS, F7, F8, F9, F10, F11, F12, PSCR, FN3, FN4,
|
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, 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, TRNS, F1, F2, F3, MUTE, MPRV, MNXT, MSTP, TRNS,
|
||||||
TRNS, TRNS, TRNS, LGUI, TRNS, TRNS, TRNS, TRNS, PAUS, TRNS )
|
TRNS, TRNS, TRNS, LGUI, TRNS, TRNS, TRNS, TRNS, PAUS, TRNS)
|
||||||
/* ,
|
/* ,
|
||||||
[3] = KEYMAP(
|
[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, 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, BTLD, 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 macro_id {
|
enum macro_id
|
||||||
|
{
|
||||||
M_LAYER1,
|
M_LAYER1,
|
||||||
M_LAYER2
|
M_LAYER2
|
||||||
};
|
};
|
||||||
|
@ -38,43 +39,43 @@ const uint16_t PROGMEM fn_actions[] = {
|
||||||
[1] = ACTION_MACRO(M_LAYER1),
|
[1] = ACTION_MACRO(M_LAYER1),
|
||||||
[2] = ACTION_LAYER_TAP_TOGGLE(2),
|
[2] = ACTION_LAYER_TAP_TOGGLE(2),
|
||||||
[3] = ACTION_BACKLIGHT_STEP(),
|
[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)
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
{
|
{
|
||||||
// MACRODOWN only works in this function
|
// 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
|
case M_LAYER1:
|
||||||
// action_function_tap may also handle this...
|
// need to add a timer for doubletap: https://github.com/jackhumbert/qmk_firmware/wiki#timer-functionality
|
||||||
if (record->event.pressed)
|
// action_function_tap may also handle this...
|
||||||
{
|
if (record->event.pressed)
|
||||||
breathing_period_set(3);
|
{
|
||||||
breathing_enable();
|
breathing_period_set(3);
|
||||||
layer_on(1);
|
breathing_enable();
|
||||||
}
|
layer_on(1);
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
breathing_period_set(1);
|
{
|
||||||
breathing_self_disable();
|
breathing_period_set(1);
|
||||||
layer_off(1);
|
breathing_self_disable();
|
||||||
}
|
layer_off(1);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case M_LAYER2:
|
case M_LAYER2:
|
||||||
if (record->event.pressed)
|
if (record->event.pressed)
|
||||||
{
|
{
|
||||||
breathing_period_set(2);
|
breathing_period_set(2);
|
||||||
breathing_pulse();
|
breathing_pulse();
|
||||||
layer_on(2);
|
layer_on(2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
breathing_period_set(1);
|
breathing_period_set(1);
|
||||||
breathing_self_disable();
|
breathing_self_disable();
|
||||||
layer_off(2);
|
layer_off(2);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return MACRO_NONE;
|
return MACRO_NONE;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
#include "jd45.h"
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
enum jd45_layers
|
enum jd45_layers
|
||||||
{
|
{
|
||||||
_QWERTY,
|
_QWERTY,
|
||||||
_QWERTYNUMMODS,
|
_QWERTYNUMMODS,
|
||||||
_NUMSYM,
|
_NUMSYM,
|
||||||
_FUNCTION,
|
_FUNCTION,
|
||||||
_NUMPAD,
|
_NUMPAD,
|
||||||
_FKEYNUMPAD,
|
_FKEYNUMPAD,
|
||||||
_ADJUST
|
_ADJUST
|
||||||
};
|
};
|
||||||
|
|
||||||
enum jd45_keycodes
|
enum jd45_keycodes
|
||||||
{
|
{
|
||||||
NUMSYM = SAFE_RANGE,
|
NUMSYM = SAFE_RANGE,
|
||||||
MACSLEEP,
|
MACSLEEP,
|
||||||
USEFNMODS,
|
USEFNMODS,
|
||||||
USENUMMODS,
|
USENUMMODS,
|
||||||
DYNAMIC_MACRO_RANGE,
|
DYNAMIC_MACRO_RANGE,
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "dynamic_macro.h"
|
#include "dynamic_macro.h"
|
||||||
|
@ -33,117 +33,91 @@ enum jd45_keycodes
|
||||||
#define F_FNTAB F(2)
|
#define F_FNTAB F(2)
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[_QWERTY] = {
|
[_QWERTY] = {
|
||||||
{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},
|
{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)},
|
{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)},
|
{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) }
|
{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)}},
|
||||||
[_QWERTYNUMMODS] = {
|
[_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__}},
|
||||||
{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},
|
[_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__}},
|
||||||
{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)},
|
[_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__}},
|
||||||
{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)},
|
[_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__}},
|
||||||
{XXXXXXX, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, F_NUMSPC, XXXXXXX, XXXXXXX, MO(_FKEYNUMPAD), MO(_ADJUST) }
|
[_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__}}};
|
||||||
},
|
|
||||||
[_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[] = {
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
[0] = ACTION_LAYER_TAP_KEY(_NUMSYM, KC_SPC),
|
[0] = ACTION_LAYER_TAP_KEY(_NUMSYM, KC_SPC),
|
||||||
[1] = ACTION_LAYER_TAP_KEY(_NUMPAD, KC_SPC),
|
[1] = ACTION_LAYER_TAP_KEY(_NUMPAD, KC_SPC),
|
||||||
[2] = ACTION_LAYER_TAP_KEY(_FUNCTION, KC_TAB),
|
[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);
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool singular_key = false;
|
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)) {
|
uint16_t macro_kc = (keycode == MO(_ADJUST) ? DYN_REC_STOP : keycode);
|
||||||
return false;
|
if (!process_record_dynamic_macro(macro_kc, record))
|
||||||
}
|
{
|
||||||
println(" ");
|
return false;
|
||||||
print("process record");
|
}
|
||||||
|
println(" ");
|
||||||
|
print("process record");
|
||||||
|
|
||||||
switch (keycode) {
|
switch (keycode)
|
||||||
case MACSLEEP:
|
{
|
||||||
if (record->event.pressed) {
|
case MACSLEEP:
|
||||||
// ACTION_MODS_KEY(MOD_LCTL | MOD_LSFT, KC_POWER);
|
if (record->event.pressed)
|
||||||
register_code(KC_RSFT);
|
{
|
||||||
register_code(KC_RCTL);
|
// ACTION_MODS_KEY(MOD_LCTL | MOD_LSFT, KC_POWER);
|
||||||
register_code(KC_POWER);
|
register_code(KC_RSFT);
|
||||||
unregister_code(KC_POWER);
|
register_code(KC_RCTL);
|
||||||
unregister_code(KC_RCTL);
|
register_code(KC_POWER);
|
||||||
unregister_code(KC_RSFT);
|
unregister_code(KC_POWER);
|
||||||
|
unregister_code(KC_RCTL);
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case USEFNMODS:
|
||||||
|
if (record->event.pressed)
|
||||||
|
{
|
||||||
|
persistent_default_layer_set(1UL << _QWERTY);
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_fnpc, false, 0);
|
||||||
|
#endif
|
||||||
|
print("Space-FN");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case USENUMMODS:
|
||||||
|
if (record->event.pressed)
|
||||||
|
{
|
||||||
|
persistent_default_layer_set(1UL << _QWERTYNUMMODS);
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_NOTE_ARRAY(tone_fnmac, false, 0);
|
||||||
|
#endif
|
||||||
|
print("Space-Numpad");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
singular_key = false;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case USEFNMODS:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
persistent_default_layer_set(1UL<<_QWERTY);
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
PLAY_NOTE_ARRAY(tone_fnpc, false, 0);
|
|
||||||
#endif
|
|
||||||
print("Space-FN");
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case USENUMMODS:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
persistent_default_layer_set(1UL<<_QWERTYNUMMODS);
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
PLAY_NOTE_ARRAY(tone_fnmac, false, 0);
|
|
||||||
#endif
|
|
||||||
print("Space-Numpad");
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
singular_key = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void matrix_init_user(void)
|
||||||
void matrix_init_user(void) {
|
{
|
||||||
#ifdef AUDIO_ENABLE
|
#ifdef AUDIO_ENABLE
|
||||||
startup_user();
|
startup_user();
|
||||||
#endif
|
#endif
|
||||||
// debug_enable = true;
|
// debug_enable = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue