1
0
Fork 0

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:
fauxpark 2019-07-16 16:04:02 +10:00 committed by skullydazed
parent 2a231457bd
commit f14629ed1c
119 changed files with 286 additions and 1860 deletions

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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 ), 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) { void matrix_init_user(void) {
} }

View file

@ -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 ), 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) { void matrix_init_user(void) {
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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), 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) { void matrix_init_user(void) {
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {

View file

@ -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_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_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, \ _______, 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), _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT),
/* Keymap 2: Tab Layer w/ vim pageup, modified with Tab (by holding tab) /* 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, \ KC_WAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \
_______, _______, _______, _______, _______, _______, _______, GER_CUR_L, GER_CUR_R, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, GER_CUR_L, GER_CUR_R, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, KC_ENT, \ _______, _______, _______, _______, _______, _______, 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), _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END),
/* Keymap 3: Split right shift Numpad toggle Layer (by tapping the split rshift key) /* 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_0, _______, KC_SLSH, KC_UP, _______, \
_______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT), _______, _______, _______, _______, _______, 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;
};

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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_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_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, 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 /* 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_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_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, 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 /* 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_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_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, 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 /* 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 _______, _______, _______, _______, _______, 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;
};

View file

@ -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_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 ) 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;
};

View file

@ -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;
};

View file

@ -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 \ 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;
};

View file

@ -29,10 +29,6 @@ LAYOUT(
bool initialized = 0; 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) { void matrix_init_user(void) {
if (!initialized){ if (!initialized){
dprintf("Initializing in matrix_scan_user"); dprintf("Initializing in matrix_scan_user");

View file

@ -28,10 +28,6 @@ LAYOUT(
bool initialized = 0; 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) { void matrix_init_user(void) {
if (!initialized){ if (!initialized){
dprintf("Initializing in matrix_scan_user"); dprintf("Initializing in matrix_scan_user");

View file

@ -28,10 +28,6 @@ LAYOUT(
bool initialized = 0; 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) { void matrix_init_user(void) {
if (!initialized){ if (!initialized){
dprintf("Initializing in matrix_scan_user"); dprintf("Initializing in matrix_scan_user");

View file

@ -28,10 +28,6 @@ LAYOUT(
bool initialized = 0; 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) { void matrix_init_user(void) {
if (!initialized){ if (!initialized){
dprintf("Initializing in matrix_scan_user"); dprintf("Initializing in matrix_scan_user");

View file

@ -28,10 +28,6 @@ LAYOUT(
bool initialized = 0; 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) { void matrix_init_user(void) {
if (!initialized){ if (!initialized){
// Disable to set a known state // Disable to set a known state

View file

@ -29,10 +29,6 @@ LAYOUT(
bool initialized = 0; 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) { void matrix_init_user(void) {
if (!initialized){ if (!initialized){
dprintf("Initializing in matrix_scan_user"); dprintf("Initializing in matrix_scan_user");

View file

@ -28,10 +28,6 @@ LAYOUT(
bool initialized = 0; 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) { void matrix_init_user(void) {
if (!initialized){ if (!initialized){
dprintf("Initializing in matrix_scan_user"); dprintf("Initializing in matrix_scan_user");

View file

@ -29,10 +29,6 @@ LAYOUT(
bool initialized = 0; 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) { void matrix_init_user(void) {
if (!initialized){ if (!initialized){
dprintf("Initializing in matrix_scan_user"); dprintf("Initializing in matrix_scan_user");

View file

@ -27,10 +27,6 @@ LAYOUT(
bool initialized = 0; 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) { void matrix_init_user(void) {
if (!initialized){ if (!initialized){
dprintf("Initializing in matrix_scan_user"); dprintf("Initializing in matrix_scan_user");

View file

@ -28,10 +28,6 @@ LAYOUT(
bool initialized = 0; 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) { void matrix_init_user(void) {
if (!initialized){ if (!initialized){
dprintf("Initializing in matrix_scan_user"); dprintf("Initializing in matrix_scan_user");

View file

@ -29,10 +29,6 @@ LAYOUT(
bool initialized = 0; 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) { void matrix_init_user(void) {
if (!initialized){ if (!initialized){
dprintf("Initializing in matrix_scan_user"); dprintf("Initializing in matrix_scan_user");

View file

@ -28,10 +28,6 @@ LAYOUT(
bool initialized = 0; 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) { void matrix_init_user(void) {
if (!initialized){ if (!initialized){
dprintf("Initializing in matrix_scan_user"); dprintf("Initializing in matrix_scan_user");

View file

@ -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) 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) { void matrix_init_user(void) {
} }

View file

@ -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 ) 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) { void matrix_init_user(void) {
} }

View file

@ -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 ) 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) { void matrix_init_user(void) {
} }

View file

@ -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;
};

View file

@ -17,6 +17,14 @@ enum chimera_ergo_layers
_NAV _NAV
}; };
enum custom_keycodes {
SC_INCL = SAFE_RANGE,
SC_PULL,
SC_PUSH,
SC_SCAP,
SC_SCOF
};
#define SC_NMPD TG(_NUMPAD) #define SC_NMPD TG(_NUMPAD)
#define SC_SYMB TG(_SYMBOLS) #define SC_SYMB TG(_SYMBOLS)
#define SC_SPFN LT(_NAV,KC_EQL) #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_SPRT MT(MOD_LALT, KC_1)
#define SC_GBRC MT(MOD_RGUI, KC_RBRC) #define SC_GBRC MT(MOD_RGUI, KC_RBRC)
#define SC_MESC LT(_MACROS, KC_ESC) #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 SC_CAD LALT(LCTL(KC_DEL))
#define LONGPRESS_DELAY 150 #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) bool process_record_user(uint16_t keycode, keyrecord_t *record) {
{ switch(keycode) {
switch(id) {
/* include some kind of library or header */ /* include some kind of library or header */
case 0: case SC_INCL:
if (record->event.pressed) { if (record->event.pressed) {
SEND_STRING("#include <>"); SEND_STRING("#include <>");
return MACRO( T(LEFT), END); tap_code(KC_LEFT);
} }
break; return false;
case 1: case SC_PULL:
if (record->event.pressed) { if (record->event.pressed) {
SEND_STRING("git pull"); SEND_STRING("git pull");
return MACRO( T(ENT), END ); tap_code(KC_ENT);
} }
break; return false;
case 2: case SC_PUSH:
if (record->event.pressed){ if (record->event.pressed) {
SEND_STRING("git push"); SEND_STRING("git push");
return MACRO( T(ENT), END ); tap_code(KC_ENT);
} }
break; return false;
case 3: case SC_SCAP:
if (record->event.pressed){ if (record->event.pressed) {
layer_on(_CAPS); layer_on(_CAPS);
register_code(KC_CAPSLOCK); tap_code(KC_CAPS);
unregister_code(KC_CAPSLOCK);
} }
break; return false;
case 4: case SC_SCOF:
if (record->event.pressed){ if (record->event.pressed) {
layer_off(_CAPS); layer_off(_CAPS);
register_code(KC_CAPSLOCK); tap_code(KC_CAPS);
unregister_code(KC_CAPSLOCK);
} }
break; return false;
default:
return true;
} }
return MACRO_NONE; return true;
}; };
void matrix_scan_user(void) { void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state); uint8_t layer = biton32(layer_state);

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true; return true;
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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 // Loop
void matrix_scan_user(void) { void matrix_scan_user(void) {
// Empty // Empty

View file

@ -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 // Loop
void matrix_scan_user(void) { void matrix_scan_user(void) {
// Empty // Empty

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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;
};

View file

@ -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), 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) { void matrix_init_user(void) {
} }

View file

@ -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;
};

View file

@ -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) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
// dynamically generate these. // dynamically generate these.

View file

@ -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. // Runs just one time when the keyboard initializes.
void matrix_init_user(void) { void matrix_init_user(void) {

View file

@ -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) { void matrix_init_user(void) {
#ifdef RGBLIGHT_COLOR_LAYER_0 #ifdef RGBLIGHT_COLOR_LAYER_0
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0); rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0);

View file

@ -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) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
// dynamically generate these. // dynamically generate these.

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -37,10 +37,7 @@ enum preonic_keycodes {
RGBLED_DECREASE_SAT, RGBLED_DECREASE_SAT,
RGBLED_INCREASE_VAL, RGBLED_INCREASE_VAL,
RGBLED_DECREASE_VAL, RGBLED_DECREASE_VAL,
}; DEMOMACRO
enum macro_keycodes {
KC_DEMOMACRO,
}; };
// Custom macros // Custom macros
@ -51,7 +48,6 @@ enum macro_keycodes {
// Requires KC_TRNS/_______ for the trigger key in the destination layer // 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_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 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] = { 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; return false;
break; break;
case DEMOMACRO:
if (record->event.pressed) {
SEND_STRING("hello world");
}
return false;
break;
} }
return true; 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 //Functions for ver2
#ifdef KEYBOARD_hadron_ver2 #ifdef KEYBOARD_hadron_ver2
#include "LUFA/Drivers/Peripheral/TWI.h" #include "LUFA/Drivers/Peripheral/TWI.h"

View file

@ -27,10 +27,7 @@ enum preonic_keycodes {
RGBLED_DECREASE_SAT, RGBLED_DECREASE_SAT,
RGBLED_INCREASE_VAL, RGBLED_INCREASE_VAL,
RGBLED_DECREASE_VAL, RGBLED_DECREASE_VAL,
}; DEMOMACRO
enum macro_keycodes {
KC_DEMOMACRO,
}; };
// Custom macros // Custom macros
@ -41,8 +38,6 @@ enum macro_keycodes {
// Requires KC_TRNS/_______ for the trigger key in the destination layer // 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_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 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] = { 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; return false;
break; break;
case DEMOMACRO:
if (record->event.pressed) {
SEND_STRING("hello world");
}
} }
return true; 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) { void matrix_init_user(void) {
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case VRSN: case VRSN:

View file

@ -12,7 +12,7 @@
#define PEDAL_DELAY 250 #define PEDAL_DELAY 250
#define KEY_DELAY 130 #define KEY_DELAY 130
enum macros { enum custom_keycodes {
M_LP = SAFE_RANGE, // left pedal M_LP = SAFE_RANGE, // left pedal
M_RP, // right pedal M_RP, // right pedal
M_SF, // shift M_SF, // shift

View file

@ -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) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch(keycode) { switch(keycode) {
case TO(HDN): case TO(HDN):

View file

@ -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) { void led_set_user(uint8_t usb_led) {
if (usb_led & _BV(USB_LED_CAPS_LOCK)) { if (usb_led & _BV(USB_LED_CAPS_LOCK)) {
PORTB |= _BV(PB0); PORTB |= _BV(PB0);

View file

@ -15,13 +15,13 @@
#define RGBLED_TOGGLE 10 #define RGBLED_TOGGLE 10
#define _HIOUT 15 #define _HIOUT 15
#define _LWOUT 16 #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] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty /* Qwerty
@ -102,9 +102,9 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key
*/ */
[_NAV] = KEYMAP( [_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, 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 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) bool process_record_user(uint16_t keycode, keyrecord_t *record) {
{ switch (keycode) {
// 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;
// from algernon's ErgoDox EZ layout, // from algernon's ErgoDox EZ layout,
case MUL: case M_MUL:
if (record->event.pressed) { if (record->event.pressed) {
mousekey_on(KC_MS_UP); mousekey_on(KC_MS_UP);
mousekey_on(KC_MS_LEFT); 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_off(KC_MS_LEFT);
} }
mousekey_send(); mousekey_send();
break; return false;
case MUR: case M_MUR:
if (record->event.pressed) { if (record->event.pressed) {
mousekey_on(KC_MS_UP); mousekey_on(KC_MS_UP);
mousekey_on(KC_MS_RIGHT); 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_off(KC_MS_RIGHT);
} }
mousekey_send(); mousekey_send();
break; return false;
case MDL: case M_MDL:
if (record->event.pressed) { if (record->event.pressed) {
mousekey_on(KC_MS_DOWN); mousekey_on(KC_MS_DOWN);
mousekey_on(KC_MS_LEFT); 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_off(KC_MS_LEFT);
} }
mousekey_send(); mousekey_send();
break; return false;
case MDR: case M_MDR:
if (record->event.pressed) { if (record->event.pressed) {
mousekey_on(KC_MS_DOWN); mousekey_on(KC_MS_DOWN);
mousekey_on(KC_MS_RIGHT); 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_off(KC_MS_RIGHT);
} }
mousekey_send(); mousekey_send();
break; return false;
default:
return true;
} }
return MACRO_NONE; return true;
}; };
void LayerLEDSet(uint8_t layr) { 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) { void led_set_user(uint8_t usb_led) {
} }

View file

@ -41,15 +41,9 @@ enum custom_keycodes {
RGBLED_DECREASE_SAT, RGBLED_DECREASE_SAT,
RGBLED_INCREASE_VAL, RGBLED_INCREASE_VAL,
RGBLED_DECREASE_VAL, RGBLED_DECREASE_VAL,
M_SAMPLE
}; };
enum macro_keycodes {
KC_SAMPLEMACRO,
};
//Macros
#define M_SAMPLE M(KC_SAMPLEMACRO)
#if HELIX_ROWS == 5 #if HELIX_ROWS == 5
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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; return false;
break; break;
case M_SAMPLE:
if (record->event.pressed) {
SEND_STRING("hello world");
}
return false;
} }
return true; return true;
} }
@ -470,23 +469,3 @@ void music_scale_user(void)
} }
#endif #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;
}

View file

@ -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_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, 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)}; 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;
};

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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), 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) { void matrix_init_user(void) {
} }

View file

@ -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 \ 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;
};

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -1,5 +1,10 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
enum custom_keycodes {
M_TGLHF = SAFE_RANGE,
M_TGG
};
/* /*
* Copy of knopps mini default May 16,2018 * Copy of knopps mini default May 16,2018
* Added comments in code to more easilly understand it. * Added comments in code to more easilly understand it.
@ -41,16 +46,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* Layer 1 * Layer 1
* _____ _____ _____ * _____ _____ _____
* | | | | | | * | | | | | |
* ESC Macro3 Macro4 * ESC Ctl+Z CSf+Z
* |_____| |_____| |_____| * |_____| |_____| |_____|
* _____ _____ _____ * _____ _____ _____
* | | | | | | * | | | | | |
* Macro5 Macro6 Macro7 * Ctl+X Ctl+C Ctl+V
* |_____| |_____| |_____| * |_____| |_____| |_____|
* *
*/ */
LAYOUT( 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 * Layer 2
@ -65,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* *
*/ */
LAYOUT( 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 * 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) { void set_switch_led(int ledId, bool state) {
if(state) { if(state) {
switch(ledId) { switch(ledId) {
@ -480,6 +400,17 @@ bool process_record_user (uint16_t keycode, keyrecord_t *record) {
led_set_layer(2); led_set_layer(2);
} }
break; 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; return true;
} }

View file

@ -1,15 +1,20 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
enum custom_keycodes {
M_TGLHF = SAFE_RANGE,
M_TGG
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT( LAYOUT(
LT(3, KC_MSTP), KC_VOLU, KC_MPLY, KC_MPRV, KC_VOLD, KC_MNXT), LT(3, KC_MSTP), KC_VOLU, KC_MPLY, KC_MPRV, KC_VOLD, KC_MNXT),
LAYOUT( 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( 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( LAYOUT(
KC_TRNS, KC_TRNS, RESET, TO(0), TO(1), TO(2)), 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) { void set_switch_led(int ledId, bool state) {
if(state) { if(state) {
switch(ledId) { switch(ledId) {
@ -369,6 +326,18 @@ bool process_record_user (uint16_t keycode, keyrecord_t *record) {
led_set_layer(2); led_set_layer(2);
} }
break; 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; return true;
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -37,15 +37,9 @@ enum custom_keycodes {
RGBLED_DECREASE_SAT, RGBLED_DECREASE_SAT,
RGBLED_INCREASE_VAL, RGBLED_INCREASE_VAL,
RGBLED_DECREASE_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] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty /* Qwerty
@ -278,6 +272,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} }
return false; return false;
break; break;
case M_SAMPLE:
if (record->event.pressed){
SEND_STRING("hello world");
}
return false;
} }
return true; return true;
} }
@ -328,27 +327,6 @@ void music_scale_user(void)
#endif #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, void matrix_update(struct CharacterMatrix *dest,
const struct CharacterMatrix *source) { const struct CharacterMatrix *source) {
if (memcmp(dest->display, source->display, sizeof(dest->display))) { if (memcmp(dest->display, source->display, sizeof(dest->display))) {

View file

@ -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), 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) { void matrix_init_user(void) {
} }

View file

@ -92,16 +92,6 @@ const uint16_t PROGMEM fn_actions[] = {
ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click 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) { void matrix_init_user(void) {
// This keymap only has a single base layer, so reset the default if needed // This keymap only has a single base layer, so reset the default if needed
if(eeconfig_read_default_layer() > 1){ if(eeconfig_read_default_layer() > 1){

View file

@ -92,16 +92,6 @@ const uint16_t PROGMEM fn_actions[] = {
ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click 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) { void matrix_init_user(void) {
// This keymap only has a single base layer, so reset the default if needed // This keymap only has a single base layer, so reset the default if needed
if(eeconfig_read_default_layer() > 1){ if(eeconfig_read_default_layer() > 1){

View file

@ -92,16 +92,6 @@ const uint16_t PROGMEM fn_actions[] = {
ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click 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) { void matrix_init_user(void) {
// This keymap only has a single base layer, so reset the default if needed // This keymap only has a single base layer, so reset the default if needed
if(eeconfig_read_default_layer() > 1){ if(eeconfig_read_default_layer() > 1){

View file

@ -100,16 +100,6 @@ const uint16_t PROGMEM fn_actions[] = {
ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click 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) { void matrix_init_user(void) {
// This keymap only has a single base layer, so reset the default if needed // This keymap only has a single base layer, so reset the default if needed
if(eeconfig_read_default_layer() > 1){ if(eeconfig_read_default_layer() > 1){

View file

@ -100,16 +100,6 @@ const uint16_t PROGMEM fn_actions[] = {
[7] = ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN7 - Toggle audio click [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) { void matrix_init_user(void) {
// This keymap only has a single base layer, so reset the default if needed // This keymap only has a single base layer, so reset the default if needed
if(eeconfig_read_default_layer() > 1){ if(eeconfig_read_default_layer() > 1){

View file

@ -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) { void matrix_init_user(void) {
// This keymap only has a single base layer, so reset the default if needed // This keymap only has a single base layer, so reset the default if needed
if(eeconfig_read_default_layer() > 1){ if(eeconfig_read_default_layer() > 1){

View file

@ -100,16 +100,6 @@ const uint16_t PROGMEM fn_actions[] = {
ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click 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) { void matrix_init_user(void) {
// This keymap only has a single base layer, so reset the default if needed // This keymap only has a single base layer, so reset the default if needed
if(eeconfig_read_default_layer() > 1){ if(eeconfig_read_default_layer() > 1){

View file

@ -59,15 +59,6 @@ const uint16_t PROGMEM fn_actions[] = {
[5] = ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click [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) { void matrix_init_user(void) {
} }

View file

@ -59,16 +59,6 @@ const uint16_t PROGMEM fn_actions[] = {
[5] = ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click [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) { void matrix_init_user(void) {
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true; return true;
} }

View file

@ -52,22 +52,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
bool TOG_STATUS = false; bool TOG_STATUS = false;
int RGB_current_mode; 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) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case RGBRST: case RGBRST:

View file

@ -18,16 +18,10 @@ enum mitosis_layers
enum mitosis_keycodes enum mitosis_keycodes
{ {
FNKEY = SAFE_RANGE, FNKEY = SAFE_RANGE,
SHIFT SHIFT,
}; M_VOLU,
M_VOLD,
M_ESCM
// Macro definitions for readability
enum mitosis_macros
{
VOLU,
VOLD,
ESCM
}; };
#define LONGPRESS_DELAY 150 #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_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_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, 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_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_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; 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; 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) {
@ -165,6 +110,44 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
update_tri_layer(_FUNCTION, _SHIFTED, _FUNCSHIFT); update_tri_layer(_FUNCTION, _SHIFTED, _FUNCSHIFT);
return false; return false;
break; 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, //If any other key was pressed during the layer mod hold period,
//then the layer mod was used momentarily, and should block latching //then the layer mod was used momentarily, and should block latching

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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) { void matrix_init_user(void) {
} }

View file

@ -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) { void matrix_init_user(void) {
rgblight_setrgb(0,255,0); rgblight_setrgb(0,255,0);

Some files were not shown because too many files have changed in this diff Show more