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
119 changed files with 286 additions and 1860 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue