Remove/migrate action_get_macro()s from default keymaps (#5625)
* Remove/migrate action_get_macro()s from default keymaps * Leave these breaks alone
This commit is contained in:
parent
2a231457bd
commit
f14629ed1c
@ -18,15 +18,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
;
|
||||
|
||||
switch (id) {
|
||||
|
||||
}
|
||||
return MACRO_NONE;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
|
@ -18,15 +18,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
;
|
||||
|
||||
switch (id) {
|
||||
|
||||
}
|
||||
return MACRO_NONE;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
|
@ -18,15 +18,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
;
|
||||
|
||||
switch (id) {
|
||||
|
||||
}
|
||||
return MACRO_NONE;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
|
@ -31,23 +31,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_TRNS, KC_RGUI, KC_RCTRL, BL_TOGG, BL_DEC, BL_INC, KC_P0, KC_PDOT ),
|
||||
};
|
||||
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -15,22 +15,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_TRNS, KC_RGUI, KC_RCTRL, BL_TOGG, BL_DEC, BL_INC, KC_P0, KC_PDOT ),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -33,22 +33,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -19,10 +19,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
return MACRO_NONE;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
|
@ -55,15 +55,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
|
||||
|
||||
switch (id) {
|
||||
|
||||
}
|
||||
return MACRO_NONE;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
|
@ -98,16 +98,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
switch (keycode) {
|
||||
|
@ -68,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \
|
||||
_______, KC_PAUS, KC_UP, GER_BRC_L, GER_BRC_R, _______, _______, GER_PAR_L, GER_PAR_R, _______, _______, _______, _______, _______, \
|
||||
_______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, KC_MPLY, \
|
||||
_______, _______, _______, _______, GER_ANG_L, GER_ANG_R, KC_SPACE, M(0), _______, _______, _______, _______, KC_VOLU, _______, \
|
||||
_______, _______, _______, _______, GER_ANG_L, GER_ANG_R, KC_SPACE, RALT(KC_SPC),_______, _______, _______, _______, KC_VOLU, _______, \
|
||||
_______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT),
|
||||
|
||||
/* Keymap 2: Tab Layer w/ vim pageup, modified with Tab (by holding tab)
|
||||
@ -88,7 +88,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_WAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \
|
||||
_______, _______, _______, _______, _______, _______, _______, GER_CUR_L, GER_CUR_R, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, KC_ENT, \
|
||||
_______, _______, _______, _______, _______, _______, _______, M(1), _______, _______, _______, _______, KC_PGUP, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, A(KC_F2), _______, _______, _______, _______, KC_PGUP, _______, \
|
||||
_______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END),
|
||||
|
||||
/* Keymap 3: Split right shift Numpad toggle Layer (by tapping the split rshift key)
|
||||
@ -111,21 +111,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_0, _______, KC_SLSH, KC_UP, _______, \
|
||||
_______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
return (record->event.pressed ?
|
||||
MACRO( D(RALT), T(SPC), U(RALT), END )
|
||||
:MACRO( END ));
|
||||
break;
|
||||
case 1:
|
||||
return (record->event.pressed ?
|
||||
MACRO( D(LALT), T(F2), U(LALT), END )
|
||||
:MACRO( END ));
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
@ -36,22 +36,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
)
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL ,
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN,
|
||||
M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT
|
||||
BL_STEP, KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
/* COLEMAK - MIT ENHANCED / GRID COMPATIBLE
|
||||
@ -117,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL ,
|
||||
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN,
|
||||
M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT
|
||||
BL_STEP, KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
/* DVORAK - MIT ENHANCED / GRID COMPATIBLE
|
||||
@ -139,7 +139,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL ,
|
||||
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, KC_ENT, KC_ENT, KC_PGUP,
|
||||
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN,
|
||||
M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT
|
||||
BL_STEP, KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
/* LOWERED
|
||||
@ -208,20 +208,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R
|
||||
),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_step();
|
||||
#endif
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
@ -42,17 +42,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, KC_NO, KC_F1, KC_F2, KC_F3, KC_F12 ,
|
||||
KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, TO(_QW), KC_PSCR, KC_SLCK, KC_PAUS )
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
@ -46,18 +46,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
*/
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
// MACRODOWN only works in this function
|
||||
switch (id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
}
|
||||
else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
@ -23,8 +23,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_SPC, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT \
|
||||
)
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // MACRODOWN only works in this function
|
||||
{
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
@ -29,10 +29,6 @@ LAYOUT(
|
||||
|
||||
bool initialized = 0;
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
return MACRO_NONE ;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
if (!initialized){
|
||||
dprintf("Initializing in matrix_scan_user");
|
||||
|
@ -28,10 +28,6 @@ LAYOUT(
|
||||
|
||||
bool initialized = 0;
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
return MACRO_NONE ;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
if (!initialized){
|
||||
dprintf("Initializing in matrix_scan_user");
|
||||
|
@ -28,10 +28,6 @@ LAYOUT(
|
||||
|
||||
bool initialized = 0;
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
return MACRO_NONE ;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
if (!initialized){
|
||||
dprintf("Initializing in matrix_scan_user");
|
||||
|
@ -28,10 +28,6 @@ LAYOUT(
|
||||
|
||||
bool initialized = 0;
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
return MACRO_NONE ;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
if (!initialized){
|
||||
dprintf("Initializing in matrix_scan_user");
|
||||
|
@ -28,10 +28,6 @@ LAYOUT(
|
||||
|
||||
bool initialized = 0;
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
return MACRO_NONE ;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
if (!initialized){
|
||||
// Disable to set a known state
|
||||
|
@ -29,10 +29,6 @@ LAYOUT(
|
||||
|
||||
bool initialized = 0;
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
return MACRO_NONE ;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
if (!initialized){
|
||||
dprintf("Initializing in matrix_scan_user");
|
||||
|
@ -28,10 +28,6 @@ LAYOUT(
|
||||
|
||||
bool initialized = 0;
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
return MACRO_NONE ;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
if (!initialized){
|
||||
dprintf("Initializing in matrix_scan_user");
|
||||
|
@ -29,10 +29,6 @@ LAYOUT(
|
||||
|
||||
bool initialized = 0;
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
return MACRO_NONE ;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
if (!initialized){
|
||||
dprintf("Initializing in matrix_scan_user");
|
||||
|
@ -27,10 +27,6 @@ LAYOUT(
|
||||
|
||||
bool initialized = 0;
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
return MACRO_NONE ;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
if (!initialized){
|
||||
dprintf("Initializing in matrix_scan_user");
|
||||
|
@ -28,10 +28,6 @@ LAYOUT(
|
||||
|
||||
bool initialized = 0;
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
return MACRO_NONE ;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
if (!initialized){
|
||||
dprintf("Initializing in matrix_scan_user");
|
||||
|
@ -29,10 +29,6 @@ LAYOUT(
|
||||
|
||||
bool initialized = 0;
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
return MACRO_NONE ;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
if (!initialized){
|
||||
dprintf("Initializing in matrix_scan_user");
|
||||
|
@ -28,10 +28,6 @@ LAYOUT(
|
||||
|
||||
bool initialized = 0;
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
return MACRO_NONE ;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
if (!initialized){
|
||||
dprintf("Initializing in matrix_scan_user");
|
||||
|
@ -14,22 +14,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT)
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -25,22 +25,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT )
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -25,22 +25,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT )
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -19,8 +19,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, _______, _______, _______ \
|
||||
),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // MACRODOWN only works in this function
|
||||
{
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
@ -17,6 +17,14 @@ enum chimera_ergo_layers
|
||||
_NAV
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
SC_INCL = SAFE_RANGE,
|
||||
SC_PULL,
|
||||
SC_PUSH,
|
||||
SC_SCAP,
|
||||
SC_SCOF
|
||||
};
|
||||
|
||||
#define SC_NMPD TG(_NUMPAD)
|
||||
#define SC_SYMB TG(_SYMBOLS)
|
||||
#define SC_SPFN LT(_NAV,KC_EQL)
|
||||
@ -26,11 +34,6 @@ enum chimera_ergo_layers
|
||||
#define SC_SPRT MT(MOD_LALT, KC_1)
|
||||
#define SC_GBRC MT(MOD_RGUI, KC_RBRC)
|
||||
#define SC_MESC LT(_MACROS, KC_ESC)
|
||||
#define SC_INCL M(0)
|
||||
#define SC_PULL M(1)
|
||||
#define SC_PUSH M(2)
|
||||
#define SC_SCAP M(3)
|
||||
#define SC_SCOF M(4)
|
||||
#define SC_CAD LALT(LCTL(KC_DEL))
|
||||
|
||||
#define LONGPRESS_DELAY 150
|
||||
@ -88,47 +91,45 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
switch(id) {
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch(keycode) {
|
||||
/* include some kind of library or header */
|
||||
case 0:
|
||||
case SC_INCL:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("#include <>");
|
||||
return MACRO( T(LEFT), END);
|
||||
tap_code(KC_LEFT);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
return false;
|
||||
case SC_PULL:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("git pull");
|
||||
return MACRO( T(ENT), END );
|
||||
tap_code(KC_ENT);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (record->event.pressed){
|
||||
return false;
|
||||
case SC_PUSH:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("git push");
|
||||
return MACRO( T(ENT), END );
|
||||
tap_code(KC_ENT);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (record->event.pressed){
|
||||
return false;
|
||||
case SC_SCAP:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_CAPS);
|
||||
register_code(KC_CAPSLOCK);
|
||||
unregister_code(KC_CAPSLOCK);
|
||||
tap_code(KC_CAPS);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (record->event.pressed){
|
||||
return false;
|
||||
case SC_SCOF:
|
||||
if (record->event.pressed) {
|
||||
layer_off(_CAPS);
|
||||
register_code(KC_CAPSLOCK);
|
||||
unregister_code(KC_CAPSLOCK);
|
||||
tap_code(KC_CAPS);
|
||||
}
|
||||
break;
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
uint8_t layer = biton32(layer_state);
|
||||
|
||||
|
@ -25,21 +25,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -35,22 +35,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
};
|
||||
|
||||
/* Use this function to add macros */
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
@ -58,15 +58,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -57,15 +57,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -20,21 +20,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
// Macros
|
||||
/*
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) { register_code(KC_RSFT); }
|
||||
else { unregister_code(KC_RSFT); }
|
||||
break;
|
||||
}
|
||||
|
||||
return MACRO_NONE;
|
||||
};
|
||||
*/
|
||||
// Loop
|
||||
void matrix_scan_user(void) {
|
||||
// Empty
|
||||
|
@ -21,21 +21,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
// Macros
|
||||
/*
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) { register_code(KC_RSFT); }
|
||||
else { unregister_code(KC_RSFT); }
|
||||
break;
|
||||
}
|
||||
|
||||
return MACRO_NONE;
|
||||
};
|
||||
*/
|
||||
// Loop
|
||||
void matrix_scan_user(void) {
|
||||
// Empty
|
||||
|
@ -35,22 +35,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -33,7 +33,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
@ -26,22 +26,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_COMM),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -42,7 +42,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), \
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
@ -141,24 +141,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (record->event.pressed) { // For resetting EEPROM
|
||||
eeconfig_init();
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
// dynamically generate these.
|
||||
|
@ -138,21 +138,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
|
||||
|
@ -28,19 +28,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
// leaving this in place for compatibilty with old keymaps cloned and re-compiled.
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_0
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0);
|
||||
|
@ -141,24 +141,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (record->event.pressed) { // For resetting EEPROM
|
||||
eeconfig_init();
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
// dynamically generate these.
|
||||
|
@ -26,22 +26,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -37,10 +37,7 @@ enum preonic_keycodes {
|
||||
RGBLED_DECREASE_SAT,
|
||||
RGBLED_INCREASE_VAL,
|
||||
RGBLED_DECREASE_VAL,
|
||||
};
|
||||
|
||||
enum macro_keycodes {
|
||||
KC_DEMOMACRO,
|
||||
DEMOMACRO
|
||||
};
|
||||
|
||||
// Custom macros
|
||||
@ -51,7 +48,6 @@ enum macro_keycodes {
|
||||
// Requires KC_TRNS/_______ for the trigger key in the destination layer
|
||||
#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor
|
||||
#define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise
|
||||
#define DEMOMACRO M(KC_DEMOMACRO) // Sample for macros
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
@ -302,32 +298,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DEMOMACRO:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("hello world");
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Macro definition
|
||||
*/
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
if (!eeconfig_is_enabled()) {
|
||||
eeconfig_init();
|
||||
}
|
||||
|
||||
switch (id) {
|
||||
case KC_DEMOMACRO:
|
||||
if (record->event.pressed){
|
||||
return MACRO (I(1), T(H),T(E),T(L), T(L), T(O), T(SPACE), T(W), T(O), T(R), T(L), T(D), END);
|
||||
}
|
||||
}
|
||||
|
||||
return MACRO_NONE;
|
||||
}
|
||||
|
||||
|
||||
//Functions for ver2
|
||||
#ifdef KEYBOARD_hadron_ver2
|
||||
#include "LUFA/Drivers/Peripheral/TWI.h"
|
||||
|
@ -27,10 +27,7 @@ enum preonic_keycodes {
|
||||
RGBLED_DECREASE_SAT,
|
||||
RGBLED_INCREASE_VAL,
|
||||
RGBLED_DECREASE_VAL,
|
||||
};
|
||||
|
||||
enum macro_keycodes {
|
||||
KC_DEMOMACRO,
|
||||
DEMOMACRO
|
||||
};
|
||||
|
||||
// Custom macros
|
||||
@ -41,8 +38,6 @@ enum macro_keycodes {
|
||||
// Requires KC_TRNS/_______ for the trigger key in the destination layer
|
||||
#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor
|
||||
#define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise
|
||||
#define DEMOMACRO M(KC_DEMOMACRO) // Sample for macros
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
@ -248,6 +243,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DEMOMACRO:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("hello world");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -262,27 +261,6 @@ bool music_mask_user(uint16_t keycode) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Macro definition
|
||||
*/
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
if (!eeconfig_is_enabled()) {
|
||||
eeconfig_init();
|
||||
}
|
||||
|
||||
switch (id) {
|
||||
case KC_DEMOMACRO:
|
||||
if (record->event.pressed){
|
||||
return MACRO (I(1), T(H),T(E),T(L), T(L), T(O), T(SPACE), T(W), T(O), T(R), T(L), T(D), END);
|
||||
}
|
||||
}
|
||||
|
||||
return MACRO_NONE;
|
||||
}
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
|
@ -71,17 +71,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
keyevent_t event = record->event;
|
||||
(void)event;
|
||||
|
||||
switch (id) {
|
||||
|
||||
}
|
||||
return MACRO_NONE;
|
||||
}
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -137,24 +137,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (record->event.pressed) { // For resetting EEPROM
|
||||
eeconfig_init();
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case VRSN:
|
||||
|
@ -12,8 +12,8 @@
|
||||
#define PEDAL_DELAY 250
|
||||
#define KEY_DELAY 130
|
||||
|
||||
enum macros {
|
||||
M_LP = SAFE_RANGE, // left pedal
|
||||
enum custom_keycodes {
|
||||
M_LP = SAFE_RANGE, // left pedal
|
||||
M_RP, // right pedal
|
||||
M_SF, // shift
|
||||
M_SFS, // shift and space
|
||||
|
@ -29,11 +29,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
)
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch(keycode) {
|
||||
case TO(HDN):
|
||||
|
@ -75,11 +75,6 @@ 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)
|
||||
{
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
if (usb_led & _BV(USB_LED_CAPS_LOCK)) {
|
||||
PORTB |= _BV(PB0);
|
||||
|
@ -15,13 +15,13 @@
|
||||
#define RGBLED_TOGGLE 10
|
||||
#define _HIOUT 15
|
||||
#define _LWOUT 16
|
||||
// Macros
|
||||
#define MDL 4
|
||||
#define MDR 5
|
||||
#define MUR 6
|
||||
#define MUL 3
|
||||
|
||||
|
||||
enum custom_keycodes {
|
||||
M_MUL = SAFE_RANGE,
|
||||
M_MDL,
|
||||
M_MDR,
|
||||
M_MUR
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Qwerty
|
||||
@ -102,9 +102,9 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key
|
||||
*/
|
||||
|
||||
[_NAV] = KEYMAP(
|
||||
TG(_NAV), KC_NO, KC_NO, KC_UP, KC_NO, RGUI(KC_RIGHT), KC_WH_U, M(MUL), KC_MS_U, M(MUR), KC_NO, KC_ACL2,
|
||||
TG(_NAV), KC_NO, KC_NO, KC_UP, KC_NO, RGUI(KC_RIGHT), KC_WH_U, M_MUL, KC_MS_U, M_MUR, KC_NO, KC_ACL2,
|
||||
KC_TRNS, RGUI(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_E), KC_BTN3, KC_MS_L, KC_MS_U, KC_MS_R, KC_NO, KC_ACL1,
|
||||
KC_TRNS, LCTL(KC_A), LGUI(KC_X),RGUI(KC_C), RGUI(KC_V),KC_NO, KC_ENTER, KC_WH_D, M(MDL), KC_MS_D, M(MDR), KC_UP, KC_ACL0,
|
||||
KC_TRNS, LCTL(KC_A), LGUI(KC_X),RGUI(KC_C), RGUI(KC_V),KC_NO, KC_ENTER, KC_WH_D, M_MDL, KC_MS_D, M_MDR, KC_UP, KC_ACL0,
|
||||
KC_TRNS, RGUI(KC_Z), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN2, KC_BTN1, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT
|
||||
),
|
||||
|
||||
@ -152,23 +152,10 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_step();
|
||||
#endif
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
// from algernon's ErgoDox EZ layout,
|
||||
case MUL:
|
||||
case M_MUL:
|
||||
if (record->event.pressed) {
|
||||
mousekey_on(KC_MS_UP);
|
||||
mousekey_on(KC_MS_LEFT);
|
||||
@ -177,9 +164,9 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
mousekey_off(KC_MS_LEFT);
|
||||
}
|
||||
mousekey_send();
|
||||
break;
|
||||
return false;
|
||||
|
||||
case MUR:
|
||||
case M_MUR:
|
||||
if (record->event.pressed) {
|
||||
mousekey_on(KC_MS_UP);
|
||||
mousekey_on(KC_MS_RIGHT);
|
||||
@ -188,9 +175,9 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
mousekey_off(KC_MS_RIGHT);
|
||||
}
|
||||
mousekey_send();
|
||||
break;
|
||||
return false;
|
||||
|
||||
case MDL:
|
||||
case M_MDL:
|
||||
if (record->event.pressed) {
|
||||
mousekey_on(KC_MS_DOWN);
|
||||
mousekey_on(KC_MS_LEFT);
|
||||
@ -199,9 +186,9 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
mousekey_off(KC_MS_LEFT);
|
||||
}
|
||||
mousekey_send();
|
||||
break;
|
||||
return false;
|
||||
|
||||
case MDR:
|
||||
case M_MDR:
|
||||
if (record->event.pressed) {
|
||||
mousekey_on(KC_MS_DOWN);
|
||||
mousekey_on(KC_MS_RIGHT);
|
||||
@ -210,11 +197,11 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
mousekey_off(KC_MS_RIGHT);
|
||||
}
|
||||
mousekey_send();
|
||||
break;
|
||||
|
||||
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
return true;
|
||||
};
|
||||
|
||||
void LayerLEDSet(uint8_t layr) {
|
||||
@ -262,11 +249,6 @@ void matrix_scan_user(void) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
}
|
||||
|
@ -41,15 +41,9 @@ enum custom_keycodes {
|
||||
RGBLED_DECREASE_SAT,
|
||||
RGBLED_INCREASE_VAL,
|
||||
RGBLED_DECREASE_VAL,
|
||||
M_SAMPLE
|
||||
};
|
||||
|
||||
enum macro_keycodes {
|
||||
KC_SAMPLEMACRO,
|
||||
};
|
||||
|
||||
//Macros
|
||||
#define M_SAMPLE M(KC_SAMPLEMACRO)
|
||||
|
||||
#if HELIX_ROWS == 5
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
@ -423,6 +417,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case M_SAMPLE:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("hello world");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -470,23 +469,3 @@ void music_scale_user(void)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Macro definition
|
||||
*/
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
if (!eeconfig_is_enabled()) {
|
||||
eeconfig_init();
|
||||
}
|
||||
|
||||
switch (id) {
|
||||
case KC_SAMPLEMACRO:
|
||||
if (record->event.pressed){
|
||||
return MACRO (I(10), T(H), T(E), T(L), T(L), T(O), T(SPACE), T(W), T(O), T(R), T(L), T(D), END);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return MACRO_NONE;
|
||||
}
|
||||
|
@ -54,22 +54,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch (id)
|
||||
{
|
||||
case 0:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
register_code(KC_RSFT);
|
||||
}
|
||||
else
|
||||
{
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
@ -43,22 +43,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -35,22 +35,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -64,22 +64,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -66,22 +66,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -66,22 +66,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -66,22 +66,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -35,22 +35,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -34,22 +34,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -10,9 +10,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_NO, KC_RGUI, KC_RALT, KC_RCTL, RESET \
|
||||
),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
@ -52,22 +52,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
)
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -45,22 +45,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -26,22 +26,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,10 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum custom_keycodes {
|
||||
M_TGLHF = SAFE_RANGE,
|
||||
M_TGG
|
||||
};
|
||||
|
||||
/*
|
||||
* Copy of knopps mini default May 16,2018
|
||||
* Added comments in code to more easilly understand it.
|
||||
@ -41,16 +46,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* Layer 1
|
||||
* _____ _____ _____
|
||||
* | | | | | |
|
||||
* ESC Macro3 Macro4
|
||||
* ESC Ctl+Z CSf+Z
|
||||
* |_____| |_____| |_____|
|
||||
* _____ _____ _____
|
||||
* | | | | | |
|
||||
* Macro5 Macro6 Macro7
|
||||
* Ctl+X Ctl+C Ctl+V
|
||||
* |_____| |_____| |_____|
|
||||
*
|
||||
*/
|
||||
LAYOUT(
|
||||
LT(3, KC_ESC), M(3), M(4), M(5), M(6), M(7)),
|
||||
LT(3, KC_ESC), C(KC_Z), C(S(KC_Z)), C(KC_X), C(KC_C), C(KC_V)),
|
||||
|
||||
/*
|
||||
* Layer 2
|
||||
@ -65,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
*
|
||||
*/
|
||||
LAYOUT(
|
||||
LT(3, KC_1), KC_2, KC_3, KC_4, M(0), M(1)),
|
||||
LT(3, KC_1), KC_2, KC_3, KC_4, M_TGLHF, M_TGG),
|
||||
|
||||
/*
|
||||
* Layer 3 Key Layout
|
||||
@ -126,91 +131,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
// Older way of Macros found here: https://docs.qmk.fm/features/macros
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
//keyevent_t event = record->event;
|
||||
|
||||
switch (id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
/*
|
||||
* This is Macro 0
|
||||
* Content: tglhf<enter>
|
||||
*/
|
||||
return MACRO( T(T), T(G), T(L), T(H), T(F), T(ENT), END );
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (record->event.pressed) {
|
||||
/*
|
||||
* This is Macro 1
|
||||
* Content: tgg<enter>
|
||||
*/
|
||||
return MACRO( T(T), T(G), T(G), T(ENT), END );
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (record->event.pressed) {
|
||||
/*
|
||||
* This is Macro 2
|
||||
* Content: Press and hold "no" , type "l", release "no"<enter>
|
||||
* I haven't found what this "NO" key maps to
|
||||
*/
|
||||
return MACRO( D(NO), T(L), U(NO), END );
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (record->event.pressed) {
|
||||
/*
|
||||
* This is Macro 3
|
||||
* Content: press/hold LCTRL, type "2", release LCTRL
|
||||
*/
|
||||
return MACRO( D(LCTL), T(Z), U(LCTL), END );
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (record->event.pressed) {
|
||||
/*
|
||||
* This is Macro 4
|
||||
* Content: press/hold LCTRL, type "2", release LCTRL
|
||||
*/
|
||||
return MACRO( D(LCTL), D(LSFT), T(Z), U(LSFT), U(LCTL), END );
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (record->event.pressed) {
|
||||
/*
|
||||
* This is Macro 5
|
||||
* Content: press/hold LCTRL, type "x", release LCTRL
|
||||
*/
|
||||
return MACRO( D(LCTL), T(X), U(LCTL), END );
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (record->event.pressed) {
|
||||
/*
|
||||
* This is Macro 6
|
||||
* Content: press/hold LCTRL, type "c", release LCTRL
|
||||
*/
|
||||
return MACRO( D(LCTL), T(C), U(LCTL), END );
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (record->event.pressed) {
|
||||
/*
|
||||
* This is Macro 7
|
||||
* Content: press/hold LCTRL, type "v", release LCTRL
|
||||
*/
|
||||
return MACRO( D(LCTL), T(V), U(LCTL), END );
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void set_switch_led(int ledId, bool state) {
|
||||
if(state) {
|
||||
switch(ledId) {
|
||||
@ -480,6 +400,17 @@ bool process_record_user (uint16_t keycode, keyrecord_t *record) {
|
||||
led_set_layer(2);
|
||||
}
|
||||
break;
|
||||
case M_TGLHF:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("tglhf");
|
||||
tap_code(KC_ENT);
|
||||
}
|
||||
case M_TGG:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("tgg");
|
||||
tap_code(KC_ENT);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -1,15 +1,20 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum custom_keycodes {
|
||||
M_TGLHF = SAFE_RANGE,
|
||||
M_TGG
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
LAYOUT(
|
||||
LT(3, KC_MSTP), KC_VOLU, KC_MPLY, KC_MPRV, KC_VOLD, KC_MNXT),
|
||||
|
||||
LAYOUT(
|
||||
LT(3, KC_ESC), M(3), M(4), M(5), M(6), M(7)),
|
||||
LT(3, KC_ESC), C(KC_Z), C(S(KC_Z)), C(KC_X), C(KC_C), C(KC_V)),
|
||||
|
||||
LAYOUT(
|
||||
LT(3, KC_1), KC_2, KC_3, KC_4, M(0), M(1)),
|
||||
LT(3, KC_1), KC_2, KC_3, KC_4, M_TGLHF, M_TGG),
|
||||
|
||||
LAYOUT(
|
||||
KC_TRNS, KC_TRNS, RESET, TO(0), TO(1), TO(2)),
|
||||
@ -52,54 +57,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
//keyevent_t event = record->event;
|
||||
|
||||
switch (id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( T(T), T(G), T(L), T(H), T(F), T(ENT), END );
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( T(T), T(G), T(G), T(ENT), END );
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(NO), T(L), U(NO), END );
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(Z), U(LCTL), END );
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), D(LSFT), T(Z), U(LSFT), U(LCTL), END );
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(X), U(LCTL), END );
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(C), U(LCTL), END );
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(V), U(LCTL), END );
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
}
|
||||
|
||||
void set_switch_led(int ledId, bool state) {
|
||||
if(state) {
|
||||
switch(ledId) {
|
||||
@ -369,6 +326,18 @@ bool process_record_user (uint16_t keycode, keyrecord_t *record) {
|
||||
led_set_layer(2);
|
||||
}
|
||||
break;
|
||||
case M_TGLHF:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("tglhf");
|
||||
tap_code(KC_ENT);
|
||||
}
|
||||
return false;
|
||||
case M_TGG:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("tgg");
|
||||
tap_code(KC_ENT);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -44,9 +44,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
)
|
||||
};
|
||||
|
||||
// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -44,9 +44,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
)
|
||||
};
|
||||
|
||||
// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -44,9 +44,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
)
|
||||
};
|
||||
|
||||
// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -44,9 +44,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
)
|
||||
};
|
||||
|
||||
// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -44,9 +44,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
)
|
||||
};
|
||||
|
||||
// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -44,9 +44,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
)
|
||||
};
|
||||
|
||||
// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -44,9 +44,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
)
|
||||
};
|
||||
|
||||
// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -44,9 +44,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
)
|
||||
};
|
||||
|
||||
// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -44,9 +44,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
)
|
||||
};
|
||||
|
||||
// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -44,9 +44,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
)
|
||||
};
|
||||
|
||||
// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -37,15 +37,9 @@ enum custom_keycodes {
|
||||
RGBLED_DECREASE_SAT,
|
||||
RGBLED_INCREASE_VAL,
|
||||
RGBLED_DECREASE_VAL,
|
||||
M_SAMPLE
|
||||
};
|
||||
|
||||
enum macro_keycodes {
|
||||
KC_SAMPLEMACRO,
|
||||
};
|
||||
|
||||
//Macros
|
||||
#define M_SAMPLE M(KC_SAMPLEMACRO)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
@ -278,6 +272,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case M_SAMPLE:
|
||||
if (record->event.pressed){
|
||||
SEND_STRING("hello world");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -328,27 +327,6 @@ void music_scale_user(void)
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Macro definition
|
||||
*/
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
if (!eeconfig_is_enabled()) {
|
||||
eeconfig_init();
|
||||
}
|
||||
|
||||
switch (id) {
|
||||
case KC_SAMPLEMACRO:
|
||||
if (record->event.pressed){
|
||||
return MACRO (I(10), T(H), T(E), T(L), T(L), T(O), T(SPACE), T(W), T(O), T(R), T(L), T(D), END);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return MACRO_NONE;
|
||||
}
|
||||
|
||||
|
||||
void matrix_update(struct CharacterMatrix *dest,
|
||||
const struct CharacterMatrix *source) {
|
||||
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
|
||||
|
@ -53,15 +53,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, RGB_SAD, RGB_HUD, RGB_SAI),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -92,16 +92,6 @@ const uint16_t PROGMEM fn_actions[] = {
|
||||
ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click
|
||||
};
|
||||
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
// This keymap only has a single base layer, so reset the default if needed
|
||||
if(eeconfig_read_default_layer() > 1){
|
||||
|
@ -92,16 +92,6 @@ const uint16_t PROGMEM fn_actions[] = {
|
||||
ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click
|
||||
};
|
||||
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
// This keymap only has a single base layer, so reset the default if needed
|
||||
if(eeconfig_read_default_layer() > 1){
|
||||
|
@ -92,16 +92,6 @@ const uint16_t PROGMEM fn_actions[] = {
|
||||
ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click
|
||||
};
|
||||
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
// This keymap only has a single base layer, so reset the default if needed
|
||||
if(eeconfig_read_default_layer() > 1){
|
||||
|
@ -100,16 +100,6 @@ const uint16_t PROGMEM fn_actions[] = {
|
||||
ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click
|
||||
};
|
||||
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
// This keymap only has a single base layer, so reset the default if needed
|
||||
if(eeconfig_read_default_layer() > 1){
|
||||
|
@ -100,16 +100,6 @@ const uint16_t PROGMEM fn_actions[] = {
|
||||
[7] = ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN7 - Toggle audio click
|
||||
};
|
||||
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
// This keymap only has a single base layer, so reset the default if needed
|
||||
if(eeconfig_read_default_layer() > 1){
|
||||
|
@ -20,16 +20,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
};
|
||||
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
// This keymap only has a single base layer, so reset the default if needed
|
||||
if(eeconfig_read_default_layer() > 1){
|
||||
|
@ -100,16 +100,6 @@ const uint16_t PROGMEM fn_actions[] = {
|
||||
ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click
|
||||
};
|
||||
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
// This keymap only has a single base layer, so reset the default if needed
|
||||
if(eeconfig_read_default_layer() > 1){
|
||||
|
@ -59,15 +59,6 @@ const uint16_t PROGMEM fn_actions[] = {
|
||||
[5] = ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -59,16 +59,6 @@ const uint16_t PROGMEM fn_actions[] = {
|
||||
[5] = ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click
|
||||
};
|
||||
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -31,15 +31,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
|
||||
|
||||
switch (id) {
|
||||
|
||||
}
|
||||
return MACRO_NONE;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
|
@ -174,22 +174,6 @@ void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
|
||||
}
|
||||
}
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -69,10 +69,6 @@ BL_TOGG, BL_DEC, BL_INC changes the in-switch LEDs
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
return MACRO_NONE;
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
@ -52,22 +52,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
bool TOG_STATUS = false;
|
||||
int RGB_current_mode;
|
||||
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case RGBRST:
|
||||
|
@ -18,16 +18,10 @@ enum mitosis_layers
|
||||
enum mitosis_keycodes
|
||||
{
|
||||
FNKEY = SAFE_RANGE,
|
||||
SHIFT
|
||||
};
|
||||
|
||||
|
||||
// Macro definitions for readability
|
||||
enum mitosis_macros
|
||||
{
|
||||
VOLU,
|
||||
VOLD,
|
||||
ESCM
|
||||
SHIFT,
|
||||
M_VOLU,
|
||||
M_VOLD,
|
||||
M_ESCM
|
||||
};
|
||||
|
||||
#define LONGPRESS_DELAY 150
|
||||
@ -39,8 +33,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_Q, KC_P, KC_Y, KC_C, KC_B, KC_V, KC_M, KC_U, KC_Z, KC_L,
|
||||
KC_A, KC_N, KC_I, KC_S, KC_F, KC_D, KC_T, KC_H, KC_O, KC_R,
|
||||
KC_COMM, KC_DOT, KC_J, KC_G, KC_SLSH, KC_SCLN, KC_W, KC_K, KC_QUOT, KC_X,
|
||||
M(VOLU), M(ESCM), KC_TAB, KC_LCTL, KC_LALT, KC_ENT, KC_DEL, KC_PGUP,
|
||||
M(VOLD), KC_LGUI, KC_E, FNKEY, SHIFT, KC_SPC, KC_BSPC, KC_PGDN
|
||||
M_VOLU, M_ESCM, KC_TAB, KC_LCTL, KC_LALT, KC_ENT, KC_DEL, KC_PGUP,
|
||||
M_VOLD, KC_LGUI, KC_E, FNKEY, SHIFT, KC_SPC, KC_BSPC, KC_PGDN
|
||||
),
|
||||
|
||||
|
||||
@ -78,55 +72,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
static uint16_t key_timer;
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
|
||||
//switch multiplexing for media, short tap for volume up, long press for play/pause
|
||||
case VOLU:
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read(); // if the key is being pressed, we start the timer.
|
||||
} else { // this means the key was just released, so we can figure out how long it was pressed for (tap or "held down").
|
||||
if (timer_elapsed(key_timer) > LONGPRESS_DELAY) { // LONGPRESS_DELAY being 150ms, the threshhold we pick for counting something as a tap.
|
||||
return MACRO(T(MPLY), END);
|
||||
} else {
|
||||
return MACRO(T(VOLU), END);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
//switch multiplexing for media, short tap for volume down, long press for next track
|
||||
case VOLD:
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read();
|
||||
} else {
|
||||
if (timer_elapsed(key_timer) > LONGPRESS_DELAY) {
|
||||
return MACRO(T(MNXT), END);
|
||||
} else {
|
||||
return MACRO(T(VOLD), END);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
//switch multiplexing for escape, short tap for escape, long press for context menu
|
||||
case ESCM:
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read();
|
||||
} else {
|
||||
if (timer_elapsed(key_timer) > LONGPRESS_DELAY) {
|
||||
return MACRO(T(APP), END);
|
||||
} else {
|
||||
return MACRO(T(ESC), END);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
static bool singular_key = false;
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
@ -165,6 +110,44 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
update_tri_layer(_FUNCTION, _SHIFTED, _FUNCSHIFT);
|
||||
return false;
|
||||
break;
|
||||
//switch multiplexing for media, short tap for volume up, long press for play/pause
|
||||
case M_VOLU:
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read(); // if the key is being pressed, we start the timer.
|
||||
} else { // this means the key was just released, so we can figure out how long it was pressed for (tap or "held down").
|
||||
if (timer_elapsed(key_timer) > LONGPRESS_DELAY) { // LONGPRESS_DELAY being 150ms, the threshhold we pick for counting something as a tap.
|
||||
tap_code(KC_MPLY);
|
||||
} else {
|
||||
tap_code(KC_VOLU);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
//switch multiplexing for media, short tap for volume down, long press for next track
|
||||
case M_VOLD:
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read();
|
||||
} else {
|
||||
if (timer_elapsed(key_timer) > LONGPRESS_DELAY) {
|
||||
tap_code(KC_MNXT);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
//switch multiplexing for escape, short tap for escape, long press for context menu
|
||||
case M_ESCM:
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read();
|
||||
} else {
|
||||
if (timer_elapsed(key_timer) > LONGPRESS_DELAY) {
|
||||
tap_code(KC_APP);
|
||||
} else {
|
||||
tap_code(KC_ESC);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
//If any other key was pressed during the layer mod hold period,
|
||||
//then the layer mod was used momentarily, and should block latching
|
||||
|
@ -59,21 +59,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
)
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
|
@ -51,22 +51,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@ -43,10 +43,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
return MACRO_NONE ;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
rgblight_setrgb(0,255,0);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user