Skip to content

Commit

Permalink
Migrate ACTION_LAYER_MODS to LM() (qmk#8959)
Browse files Browse the repository at this point in the history
  • Loading branch information
fauxpark authored and noroadsleft committed May 22, 2020
1 parent f5a17c6 commit 7b7059f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 20 deletions.
3 changes: 1 addition & 2 deletions keyboards/gh60/satan/keymaps/denolfe/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_PGUP, KC_TRNS, KC_END, KC_MPRV, KC_MNXT, KC_MPLY, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, KC_HOME, LCTL(KC_LEFT), LCTL(KC_END), LCTL(KC_RIGHT), KC_TRNS, RESET, \
KC_TRNS, KC_TRNS, F(9), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
KC_TRNS, KC_TRNS, LM(2, MOD_LSFT), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
#endif

[_SL] = LAYOUT_60_ansi(
Expand Down Expand Up @@ -99,7 +99,6 @@ const uint16_t PROGMEM fn_actions[] = {
[7] = ACTION_FUNCTION(RGBLED_INCREASE_VAL),
[8] = ACTION_FUNCTION(RGBLED_DECREASE_VAL),
#endif
[9] = ACTION_LAYER_MODS(2, MOD_LSFT)
};

void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
Expand Down
4 changes: 1 addition & 3 deletions keyboards/infinity60/keymaps/jpetermans/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ enum ic60_keycodes {
NUMPAD,
FNAV,
MEDIA,
TILDE,
CTLALTDEL,
BACKLIGHT,
BRIGHT,
Expand Down Expand Up @@ -55,7 +54,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSLS,KC_NO,\
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSPC, \
TT(_FNAV), 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,F(TILDE),KC_NO, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,LM(_TILDE, MOD_LSFT),KC_NO, \
KC_LCTL, KC_LGUI,KC_LALT, LT(_FNAV, KC_SPC), KC_RALT,TG(_NUMPAD),MO(_MEDIA), KC_RCTL \
),

Expand Down Expand Up @@ -163,7 +162,6 @@ uint8_t led_game[5] = {
//======== qmk functions =========
const uint16_t fn_actions[] = {
[CTLALTDEL] = ACTION_KEY(LALT(LCTL(KC_DEL))),
[TILDE] = ACTION_LAYER_MODS(_TILDE, MOD_LSFT),
[ALL] = ACTION_FUNCTION(ACTION_LEDS_ALL),
[GAME] = ACTION_FUNCTION(ACTION_LEDS_GAME),
[BACKLIGHT] = ACTION_FUNCTION(ACTION_LEDS_BACKLIGHT),
Expand Down
4 changes: 2 additions & 2 deletions keyboards/jd45/keymaps/justin/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#define KC_MO1 MO(1)
#define KC_MO2 MO(2)
#define KC_MO3 MO(3)
#define KC_LM4 LM(4, MOD_LSFT)

#define KC_BLTG BL_TOGG

Expand All @@ -11,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
ESC, Q, W, F, P, G, J, L, U, Y, SCLN, QUOT, BSPC,
FN8, A, R, S, T, D, H, N, E, I, O, ENT,
LSFT, Z, X, C, V, B, K, M, COMM, DOT, SLSH, FN6,
FN4, LGUI, FN7, MO2, MO1, SPC, FN5, RALT, MO3, FN0),
FN4, LGUI, LM4, MO2, MO1, SPC, FN5, RALT, MO3, FN0),
[1] = LAYOUT_kc(
TRNS, FN10, FN11, FN12, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, UP, DEL,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, HOME, PGUP, LEFT, RGHT,
Expand Down Expand Up @@ -46,7 +47,6 @@ const uint16_t PROGMEM fn_actions[] = {
[4] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_GRV),
[5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_RGUI),
[6] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_CAPS),
[7] = ACTION_LAYER_MODS(4, MOD_LSFT), // FN4
[8] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_TAB),

[10] = ACTION_MACRO(PSWD1),
Expand Down
7 changes: 1 addition & 6 deletions keyboards/planck/keymaps/matrixman/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LT(_NAV_L,KC_Q), KC_W, KC_E, KC_R, KC_T, KC_DELETE, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, LT(_NAV_R,KC_P)
,KC_A, KC_S, KC_D, KC_F, KC_G, CTL_T(KC_ESC), CTL_T(KC_SCLN), KC_H, KC_J, KC_K, KC_L, KC_QUOT
,SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALT_T(KC_TAB), ALT_T(KC_INS), KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH)
,KC_LCTRL, KC_LGUI, KC_FN0, KC_TAB, LT(_SYMB_L, KC_ESC), KC_LSFT, KC_LSFT, LT(_SYMB_R,KC_SPC), KC_BSPC, KC_FN0, KC_RCTRL, KC_ENT
,KC_LCTRL, KC_LGUI, LM(_NAV_ALT, MOD_LALT), KC_TAB, LT(_SYMB_L, KC_ESC), KC_LSFT, KC_LSFT, LT(_SYMB_R,KC_SPC), KC_BSPC, LM(_NAV_ALT, MOD_LALT), KC_RCTRL, KC_ENT
),
// accessed via the left symb-layer key, includes a semicolon where the right symb-layer key was
[_SYMB_L] = LAYOUT_planck_grid(
Expand Down Expand Up @@ -53,11 +53,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};

const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_LAYER_MODS(_NAV_ALT, MOD_LALT)

};

const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
Expand Down
8 changes: 1 addition & 7 deletions keyboards/xd60/keymaps/cheese/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
MO(_FL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \
F(0), KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, F(1), F(1), F(1), \
LM(_LS, MOD_LSFT), KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, LM(_RS, MOD_RSFT), LM(_RS, MOD_RSFT), LM(_RS, MOD_RSFT), \
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FL), KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT),

// Function Layer
Expand Down Expand Up @@ -59,9 +59,3 @@ 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),

};

// Custom Actions
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_LAYER_MODS(_LS, MOD_LSFT),
[1] = ACTION_LAYER_MODS(_RS, MOD_RSFT),
};

0 comments on commit 7b7059f

Please sign in to comment.