diff options
Diffstat (limited to 'keyboards/dz60/keymaps')
23 files changed, 156 insertions, 544 deletions
diff --git a/keyboards/dz60/keymaps/256k_HHKB/keymap.c b/keyboards/dz60/keymaps/256k_HHKB/keymap.c index f426e3d1fb..1448e4ddce 100644 --- a/keyboards/dz60/keymaps/256k_HHKB/keymap.c +++ b/keyboards/dz60/keymaps/256k_HHKB/keymap.c @@ -29,11 +29,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ - [_DEFAULT] = LAYOUT_hhkb( + [_DEFAULT] = LAYOUT_60_hhkb( 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_GRV, 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, KC_LCTL, 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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN), KC_LGUI, KC_LALT, KC_SPC, MO(_ALTFN), MO(_LIGHTS)), @@ -55,12 +55,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `---------------------------------------------------------------------------------------------------------------------' */ - [_ALTFN] = LAYOUT_hhkb( + [_ALTFN] = LAYOUT_60_hhkb( MO(_MOUSEFN), 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_PSCR, KC_CAPS, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_UP, KC_VOLD, KC_VOLU, KC_DEL, ______, ______, ______, ______, ______, ______, ______, KC_HOME, KC_END, KC_LEFT, KC_DOWN, KC_RIGHT, ______, - ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MPRV, KC_MNXT, KC_MPLY, ______, ______, + ______, ______, ______, ______, ______, ______, ______, ______, KC_MPRV, KC_MNXT, KC_MPLY, ______, ______, ______, ______, ______, ______, ______), @@ -85,12 +85,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ - [_MOUSEFN] = LAYOUT_hhkb( + [_MOUSEFN] = LAYOUT_60_hhkb( ______, KC_ACL0, KC_ACL1, KC_ACL2, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MS_UP, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, ______, - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______), @@ -116,11 +116,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_FN] = LAYOUT_hhkb( + [_FN] = LAYOUT_60_hhkb( ______, 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_INS, ______, KC_CAPS, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ______, KC_DEL, ______, KC_VOLD, KC_VOLU, KC_MUTE, ______, ______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, ______, - ______, ______, KC_MPRV, KC_MPLY, KC_MNXT, ______, ______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ______, ______, + ______, KC_MPRV, KC_MPLY, KC_MNXT, ______, ______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ______, ______, ______, ______, ______, ______, ______), @@ -146,11 +146,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_LIGHTS] = LAYOUT_hhkb( + [_LIGHTS] = LAYOUT_60_hhkb( RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, ______, ______, ______, ______, ______, ______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RGB_HUD, RGB_SAD, RGB_VAD, ______, ______, ______, ______, ______, ______, ______, ______, ______, - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______), }; diff --git a/keyboards/dz60/keymaps/60_ansi_arrow_fkeys/config.h b/keyboards/dz60/keymaps/60_ansi_arrow_fkeys/config.h new file mode 100644 index 0000000000..9560d51a6f --- /dev/null +++ b/keyboards/dz60/keymaps/60_ansi_arrow_fkeys/config.h @@ -0,0 +1 @@ +#define GRAVE_ESC_GUI_OVERRIDE # Always send Escape if GUI is pressed diff --git a/keyboards/dz60/keymaps/60_ansi_arrow_fkeys/keymap.c b/keyboards/dz60/keymaps/60_ansi_arrow_fkeys/keymap.c index 76804670c8..0d3b653638 100644 --- a/keyboards/dz60/keymaps/60_ansi_arrow_fkeys/keymap.c +++ b/keyboards/dz60/keymaps/60_ansi_arrow_fkeys/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - #define ______ KC_TRNS const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -20,11 +18,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------------' */ - LAYOUT_2_shifts( - F(0), 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, + LAYOUT_directional( + KC_GESC, 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_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_CAPS, 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, KC_RSFT, KC_UP, KC_DEL, + 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_UP, KC_DEL, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT ), @@ -50,37 +48,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______ ), }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/dz60/keymaps/60_plus_arrows/keymap.c b/keyboards/dz60/keymaps/60_plus_arrows/keymap.c index a4b2dc29e1..f38cdb2853 100644 --- a/keyboards/dz60/keymaps/60_plus_arrows/keymap.c +++ b/keyboards/dz60/keymaps/60_plus_arrows/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - #define ______ KC_TRNS const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -20,11 +18,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------------' */ - LAYOUT_2_shifts( + LAYOUT_directional( KC_GRV, 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_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_CAPS, 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, KC_RSFT, KC_UP, MO(1), + 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_UP, MO(1), KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT ), @@ -50,37 +48,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______ ), }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/dz60/keymaps/Ansi_plus_fn_arrows/config.h b/keyboards/dz60/keymaps/Ansi_plus_fn_arrows/config.h new file mode 100644 index 0000000000..9560d51a6f --- /dev/null +++ b/keyboards/dz60/keymaps/Ansi_plus_fn_arrows/config.h @@ -0,0 +1 @@ +#define GRAVE_ESC_GUI_OVERRIDE # Always send Escape if GUI is pressed diff --git a/keyboards/dz60/keymaps/Ansi_plus_fn_arrows/keymap.c b/keyboards/dz60/keymaps/Ansi_plus_fn_arrows/keymap.c index 778a5ac038..4c6552675a 100644 --- a/keyboards/dz60/keymaps/Ansi_plus_fn_arrows/keymap.c +++ b/keyboards/dz60/keymaps/Ansi_plus_fn_arrows/keymap.c @@ -1,11 +1,9 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT( - F(0), 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_NO, KC_BSPC, + KC_GESC, 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_NO, 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, KC_CAPS, 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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, @@ -25,37 +23,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, 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), }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/dz60/keymaps/dbroqua/keymap.c b/keyboards/dz60/keymaps/dbroqua/keymap.c index c6c77210d8..0b4deae51e 100644 --- a/keyboards/dz60/keymaps/dbroqua/keymap.c +++ b/keyboards/dz60/keymaps/dbroqua/keymap.c @@ -64,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | * `-----------------------------------------------------------------' */ - [_SFX] = LAYOUT_hhkb( + [_SFX] = LAYOUT_true_hhkb( ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, BL_TOGG,BL_STEP,BL_DEC, BL_INC, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, RGB_TOG,RGB_MOD,______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ diff --git a/keyboards/dz60/keymaps/default/keymap.c b/keyboards/dz60/keymaps/default/keymap.c index 426b10989d..1d375a3c63 100644 --- a/keyboards/dz60/keymaps/default/keymap.c +++ b/keyboards/dz60/keymaps/default/keymap.c @@ -1,11 +1,9 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT( - F(0), 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_NO, KC_BSPC, + KC_GESC, 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_NO, 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, KC_CAPS, 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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, @@ -25,37 +23,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, 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), }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/dz60/keymaps/eric/keymap.c b/keyboards/dz60/keymaps/eric/keymap.c index d2cabebe74..a384de480c 100644 --- a/keyboards/dz60/keymaps/eric/keymap.c +++ b/keyboards/dz60/keymaps/eric/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0 @@ -56,37 +54,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC) -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/dz60/keymaps/f3d3/keymap.c b/keyboards/dz60/keymaps/f3d3/keymap.c index 85bb05a1d4..1e92aabc18 100644 --- a/keyboards/dz60/keymaps/f3d3/keymap.c +++ b/keyboards/dz60/keymaps/f3d3/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0 @@ -18,7 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------------' */ - LAYOUT_2_shifts( + LAYOUT_all( 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_GRV, 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, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, @@ -42,44 +40,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ - LAYOUT_2_shifts( + LAYOUT_all( KC_PWR, 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_TRNS, KC_DEL, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, 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, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MSTP, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/dz60/keymaps/frogger/keymap.c b/keyboards/dz60/keymaps/frogger/keymap.c index 86a4687913..75e805cd91 100644 --- a/keyboards/dz60/keymaps/frogger/keymap.c +++ b/keyboards/dz60/keymaps/frogger/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - #define ______ KC_TRNS #define LAYER_1 1 @@ -24,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------------' */ - LAYOUT_2_shifts( + LAYOUT_all( KC_GRAVE, 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_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, @@ -52,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_MPRV, KC_MPLY, KC_MNXT, */ - LAYOUT_2_shifts( + LAYOUT_all( KC_ESC, 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_MPRV, KC_MPLY, KC_MNXT, ______, ______, ______, ______, KC_UP, ______, ______, ______, ______, ______, @@ -78,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------------' */ - LAYOUT_2_shifts( + LAYOUT_all( RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ______, RESET, ______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, ______, ______, ______, ______, ______, diff --git a/keyboards/dz60/keymaps/hailbreno/keymap.c b/keyboards/dz60/keymaps/hailbreno/keymap.c index cc718c3935..edc22a5a24 100644 --- a/keyboards/dz60/keymaps/hailbreno/keymap.c +++ b/keyboards/dz60/keymaps/hailbreno/keymap.c @@ -44,7 +44,7 @@ enum keycodes { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------------' - [LAYOUT] = LAYOUT_2_shifts( + [LAYOUT] = LAYOUT_all( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | Gui | Backspace | Fn2 | Space | Alt | App | Left| Down|Right| * `-----------------------------------------------------------------------------------------' */ -[_QWERTY] = LAYOUT_2_shifts( +[_QWERTY] = LAYOUT_all( 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_GRV, 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_DEL, LT(_FUNC,KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, @@ -87,7 +87,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | Gui | Backspace | Fn2 | Space | Alt | App | Left| Down|Right| * `-----------------------------------------------------------------------------------------' */ -[_COLEMAK] = LAYOUT_2_shifts( +[_COLEMAK] = LAYOUT_all( 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_GRV, 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_DEL, LT(_FUNC,KC_CAPS), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, @@ -107,7 +107,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | Gui | Backspace | Fn2 | Space | Alt | App | Left| Down|Right| * `-----------------------------------------------------------------------------------------' */ -[_DVORAK] = LAYOUT_2_shifts( +[_DVORAK] = LAYOUT_all( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, KC_TAB, KC_QUOTE, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_DEL, LT(_FUNC,KC_CAPS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, @@ -127,7 +127,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | Home| PgDn| End | * `-----------------------------------------------------------------------------------------' */ -[_FUNC] = LAYOUT_2_shifts( +[_FUNC] = LAYOUT_all( _______, 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_PSCR, KC_INS, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_CIRC, _______, _______, KC_BSPC, _______, _______, _______, _______, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_TILD, _______, @@ -147,7 +147,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------------' */ -[_FUNC2] = LAYOUT_2_shifts( +[_FUNC2] = LAYOUT_all( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -167,7 +167,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------------' */ -[_RGB] = LAYOUT_2_shifts( +[_RGB] = LAYOUT_all( _______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -187,7 +187,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | |Qwerty|Colemk|Dvorak| * `-----------------------------------------------------------------------------------------' */ -[_ADJUST] = LAYOUT_2_shifts( +[_ADJUST] = LAYOUT_all( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/dz60/keymaps/iso_6u_space/keymap.c b/keyboards/dz60/keymaps/iso_6u_space/keymap.c index 15ad72f3e4..e0085b4904 100644 --- a/keyboards/dz60/keymaps/iso_6u_space/keymap.c +++ b/keyboards/dz60/keymaps/iso_6u_space/keymap.c @@ -1,74 +1,44 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * _______ can be used in place of KC_TRNS (transparent) * + * XXXXXXX can be used in place of KC_NO (No Operation) * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* ISO 6u layout layer 0 -* ,-----------------------------------------------------------------------------------------. -* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ß | ´ | BSPC | -* |-----------------------------------------------------------------------------------------+ -* | Tab | Q | W | E | R | T | Z | U | I | O | P | P | Ü | * | | -* |-------------------------------------------------------------------------------------| + -* | Layer_1 | A | S | D | F | G | H | J | K | L | Ö | Ä | # |Enter | -* |-----------------------------------------------------------------------------------------+ -* | Shift| < | Y | X | C | V | B | N | M | , | . | . | - | RShift | -* |-----------------------------------------------------------------------------------------+ -* | LCtrl | LGUI | LAlt | Space | RAlt | RGUI | Layer_2 | RCtrl | -* `-----------------------------------------------------------------------------------------' -*/ - LAYOUT( - 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_NO, 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(1), 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_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT,KC_RGUI, KC_NO, MO(2), KC_RCTL), + /* ISO 6u layout layer 0 (UK Layout shown) + * ,-----------------------------------------------------------. + * |Esc|1 !|2 "|3 £|4 $|5 %|6 ^|7 &|8 *|9 (|0 )|- _|= +| Bksp | + * |-----------------------------------------------------------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P |[ {|] }|Enter| + * |------------------------------------------------------. | + * | Fn1 | A | S | D | F | G | H | J | K | L |; :|' @|# ~| | + * |-----------------------------------------------------------| + * |Sft |\ || Z | X | C | V | B | N | M |, <|. >|/ ?| Shift | + * |-----------------------------------------------------------| + * |Ctrl |GUI|Alt | Space |Alt |GUI|Fn2|Ctrl | + * `-----------------------------------------------------------' + */ + [0] = LAYOUT_60_iso( + 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_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, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(2), KC_RCTL), + + + [1] = LAYOUT_60_iso( + KC_GRV, 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, + XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_TOGG, BL_INC, BL_STEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LCTL, KC_LGUI, KC_LGUI, XXXXXXX, KC_RALT, KC_RGUI, _______, KC_RCTL), + + [2] = LAYOUT_60_iso( + KC_GRV, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DEL, + XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX), - - LAYOUT( - KC_GRV, 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_NO, KC_DEL, - KC_NO, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_LSFT, KC_NO, KC_NO, KC_NO, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_LCTL, KC_LGUI, KC_LGUI, KC_NO, KC_NO, KC_NO, KC_RALT, KC_RGUI, KC_NO, KC_NO, KC_RCTL), - - LAYOUT( - KC_GRV, KC_MPRV, KC_MPLY, KC_MNXT, M(4), M(5), M(6), M(7), M(8), M(9), M(10), M(11), M(12), KC_NO, KC_DEL, - KC_NO, KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), -}; - -enum function_id { - SHIFT_ESC, }; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/dz60/keymaps/iso_7u_space/keymap.c b/keyboards/dz60/keymaps/iso_7u_space/keymap.c index 2de2445987..016fe9a6a5 100644 --- a/keyboards/dz60/keymaps/iso_7u_space/keymap.c +++ b/keyboards/dz60/keymaps/iso_7u_space/keymap.c @@ -1,76 +1,47 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * _______ can be used in place of KC_TRNS (transparent) * + * XXXXXXX can be used in place of KC_NO (No Operation) * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* ISO 7u layout layer 0 -* ,-----------------------------------------------------------------------------------------. -* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ß | ´ | BSPC | -* |-----------------------------------------------------------------------------------------+ -* | Tab | Q | W | E | R | T | Z | U | I | O | P | P | Ü | * | | -* |-------------------------------------------------------------------------------------| + -* | Layer_1 | A | S | D | F | G | H | J | K | L | Ö | Ä | # |Enter | -* |-----------------------------------------------------------------------------------------+ -* | Shift| < | Y | X | C | V | B | N | M | , | . | . | - | RShift | -* |-----------------------------------------------------------------------------------------+ -* | LCtrl | LGUI | LAlt | Space | RAlt | Layer_2 | RCtrl | -* `-----------------------------------------------------------------------------------------' -*/ + /* ISO 7u layout layer 0 + * ,-----------------------------------------------------------. + * |Esc|1 !|2 "|3 £|4 $|5 %|6 ^|7 &|8 *|9 (|0 )|- _|= +| Bksp | + * |-----------------------------------------------------------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P |[ {|] }|Enter| + * |------------------------------------------------------. | + * | Fn1 | A | S | D | F | G | H | J | K | L |; :|' @|# ~| | + * |-----------------------------------------------------------| + * |Sft |\ || Z | X | C | V | B | N | M |, <|. >|/ ?| Shift | + * |-----------------------------------------------------------| + * |Ctrl |GUI|Alt | Space |Alt |Fn2|Ctrl | + * `-----------------------------------------------------------' + */ + [0] = LAYOUT_60_iso( + 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_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, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, XXXXXXX, KC_RALT, MO(2), KC_RCTL + ), + + [1] = LAYOUT_60_iso( + KC_GRV, 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, + XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_TOGG, BL_INC, BL_STEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_PGDN, KC_LGUI, KC_LGUI, XXXXXXX, XXXXXXX, KC_RGUI, _______, KC_RCTL + ), + + [2] = LAYOUT_60_iso( + KC_GRV, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DEL, + XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX + ), - LAYOUT( - 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_NO, 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(1), 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_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_NO, KC_RALT, KC_NO, MO(2), KC_RCTL), - - - LAYOUT( - KC_GRV, 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_NO, KC_DEL, - KC_NO, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_PGUP, KC_NO, KC_NO, KC_NO, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_PGDOWN, KC_LGUI, KC_LGUI, KC_NO, KC_NO, KC_NO, KC_RALT, KC_RGUI, KC_NO, KC_NO, KC_RCTL), - - LAYOUT( - KC_GRV, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, - KC_NO, KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), -}; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), }; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/dz60/keymaps/iso_uk/keymap.c b/keyboards/dz60/keymaps/iso_uk/keymap.c index 1c15a59df8..13e6e18594 100644 --- a/keyboards/dz60/keymaps/iso_uk/keymap.c +++ b/keyboards/dz60/keymaps/iso_uk/keymap.c @@ -18,8 +18,6 @@ #define MO_FN MO(1) #define MO_FN MO(1) -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_60_iso( @@ -50,37 +48,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/dz60/keymaps/iso_vim_arrow/keymap.c b/keyboards/dz60/keymaps/iso_vim_arrow/keymap.c index 9e85a89eee..4dad9e19f5 100644 --- a/keyboards/dz60/keymaps/iso_vim_arrow/keymap.c +++ b/keyboards/dz60/keymaps/iso_vim_arrow/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* ISO 5x1u layout (ISO German keyboard layout shown) @@ -23,8 +21,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ LAYOUT_60_iso_5x1u( 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_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_ENT, - MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, + 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, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), @@ -32,44 +30,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_60_iso_5x1u( KC_GRV, 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_NO, KC_NO, KC_NO, KC_NO, RESET, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_PSCR, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_END, KC_DEL, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, RESET, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_PSCR, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_END, KC_DEL, KC_NO, KC_NO, KC_LSFT, BL_TOGG, KC_APP, KC_PAUS, KC_INS, KC_NO, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_RSFT, KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_DEL, KC_HOME, KC_PGDN, KC_PGUP, KC_END ), }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/dz60/keymaps/itsaferbie/keymap.c b/keyboards/dz60/keymaps/itsaferbie/keymap.c index ecc99cc751..de30e05382 100644 --- a/keyboards/dz60/keymaps/itsaferbie/keymap.c +++ b/keyboards/dz60/keymaps/itsaferbie/keymap.c @@ -9,25 +9,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_DEFAULT] = LAYOUT_hhkb( + [_DEFAULT] = LAYOUT_60_hhkb( 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_GRV, 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, KC_LCTL, 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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_LIGHTS)), - [_FN] = LAYOUT_hhkb( + [_FN] = LAYOUT_60_hhkb( ______, 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_INS, KC_DEL, KC_CAPS, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ______, RESET, ______, KC_VOLD, KC_VOLU, KC_MUTE, ______, ______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, ______, - ______, ______, KC_MPRV, KC_MPLY, KC_MNXT, ______, ______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ______, ______, + ______, KC_MPRV, KC_MPLY, KC_MNXT, ______, ______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ______, ______, ______, ______, ______, ______, ______), - [_LIGHTS] = LAYOUT_hhkb( + [_LIGHTS] = LAYOUT_60_hhkb( RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, ______, ______, ______, ______, ______, ______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RGB_HUD, RGB_SAD, RGB_VAD, ______, ______, ______, ______, ______, ______, ______, ______, ______, - ______, ______, ______, ______, BL_DEC, BL_TOGG, BL_INC, ______, ______, ______, ______, ______, ______, ______, + ______, ______, ______, BL_DEC, BL_TOGG, BL_INC, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______), }; diff --git a/keyboards/dz60/keymaps/jkbone/keymap.c b/keyboards/dz60/keymaps/jkbone/keymap.c index ecc391785f..1efcbe38f4 100644 --- a/keyboards/dz60/keymaps/jkbone/keymap.c +++ b/keyboards/dz60/keymaps/jkbone/keymap.c @@ -1,7 +1,6 @@ #include QMK_KEYBOARD_H #define ____ KC_TRNS -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) #define FL_ESC LT(_FL, KC_ESC) #define FL MO(_FL) @@ -11,60 +10,56 @@ enum layers_idx { _FL // Functions }; +enum custom_keycodes { + RGB_VAZ = SAFE_RANGE, + RGB_OAZ, + RGB_WAN, + RGB_000 +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BL] = LAYOUT_60_iso_5x1u( 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_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_ENT, - FL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, + 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, + FL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS,KC_ENT, KC_LSFT, KC_GRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, FL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT ), [_ML] = LAYOUT_60_iso_5x1u( ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, - ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, - ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, KC_LGUI, KC_LALT, KC_LCTL, ____, ____, ____, ____, ____, ____ ), [_FL] = LAYOUT_60_iso_5x1u( RESET, 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, - ____, ____, DF(_BL), DF(_ML), ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, - ____, ____, ____, ____, ____, ____, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, ____, ____, ____, - ____, F(3), F(2), F(1), F(0), ____, ____, ____, KC_MUTE, KC_MPRV, KC_MNXT, KC_MPLY, ____, + ____, ____, DF(_BL), DF(_ML), ____, ____, ____, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, ____, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, ____, ____, ____, ____, + ____, RGB_000, RGB_WAN, RGB_OAZ, RGB_VAZ, ____, ____, ____, KC_MUTE, KC_MPRV, KC_MNXT, KC_MPLY, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ ) }; -enum function_id { - RGB_VAZ, - RGB_OAZ, - RGB_WAN, - RGB_000 -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(RGB_VAZ), - [1] = ACTION_FUNCTION(RGB_OAZ), - [2] = ACTION_FUNCTION(RGB_WAN), - [3] = ACTION_FUNCTION(RGB_000) -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - case RGB_VAZ: +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case RGB_VAZ: rgblight_enable(); rgblight_setrgb(0, 204, 33); break; - case RGB_OAZ: + case RGB_OAZ: rgblight_enable(); rgblight_setrgb(229, 65, 0); break; - case RGB_WAN: + case RGB_WAN: rgblight_enable(); rgblight_setrgb(255, 255, 255); break; - case RGB_000: + case RGB_000: rgblight_disable(); break; + } } -} + return true; +}; diff --git a/keyboards/dz60/keymaps/krusli/keymap.c b/keyboards/dz60/keymaps/krusli/keymap.c index 36e7b801a3..0ad6f1b2b5 100644 --- a/keyboards/dz60/keymaps/krusli/keymap.c +++ b/keyboards/dz60/keymaps/krusli/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) #define _______ KC_TRNS const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/dz60/keymaps/macos_arrow/keymap.c b/keyboards/dz60/keymaps/macos_arrow/keymap.c index 7106092a47..81d61a59ae 100644 --- a/keyboards/dz60/keymaps/macos_arrow/keymap.c +++ b/keyboards/dz60/keymaps/macos_arrow/keymap.c @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | Gui | Space / _NL |Gui/_ML| Alt | Left| Down|Right| * `-----------------------------------------------------------------------------------------' */ - [_BL] = LAYOUT_2_shifts( + [_BL] = LAYOUT_all( KC_GRV, 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_NO, 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, LT(_FL, 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, @@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | * `-----------------------------------------------------------------------------------------' */ - [_FL] = LAYOUT_2_shifts( + [_FL] = LAYOUT_all( _______, 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_NO, KC_DEL, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, @@ -63,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | * `-----------------------------------------------------------------------------------------' */ - [_ML] = LAYOUT_2_shifts( + [_ML] = LAYOUT_all( KC_MEDIA_EJECT, BR_DOWN, BR_UP, _______, _______, _______, _______, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -82,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | * `-----------------------------------------------------------------------------------------' */ - [_NL] = LAYOUT_2_shifts( + [_NL] = LAYOUT_all( _______, _______, _______, _______, _______, _______, _______, _______, KC_PERCENT, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_LEFT_ANGLE_BRACKET, KC_RIGHT_ANGLE_BRACKET, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, KC_ASTERISK, KC_0, KC_1, KC_2, KC_3, _______, RESET, _______, _______, _______, _______, _______, _______, _______, KC_DOT, KC_MINS, KC_4, KC_5, KC_6, _______, diff --git a/keyboards/dz60/keymaps/stephengrier/config.h b/keyboards/dz60/keymaps/stephengrier/config.h new file mode 100644 index 0000000000..9560d51a6f --- /dev/null +++ b/keyboards/dz60/keymaps/stephengrier/config.h @@ -0,0 +1 @@ +#define GRAVE_ESC_GUI_OVERRIDE # Always send Escape if GUI is pressed diff --git a/keyboards/dz60/keymaps/stephengrier/keymap.c b/keyboards/dz60/keymaps/stephengrier/keymap.c index d9403f59e2..f6bbe78932 100644 --- a/keyboards/dz60/keymaps/stephengrier/keymap.c +++ b/keyboards/dz60/keymaps/stephengrier/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - #define ______ KC_TRNS const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -20,11 +18,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------------' */ - LAYOUT_2_shifts( - F(0), 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, + LAYOUT_directional( + KC_GESC, 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_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(1), 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, KC_RSFT, KC_UP, MO(1), + 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_UP, MO(1), KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT ), @@ -50,37 +48,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______ ), }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/dz60/keymaps/weeheavy/keymap.c b/keyboards/dz60/keymaps/weeheavy/keymap.c index a98e3eeb20..cb9697e107 100644 --- a/keyboards/dz60/keymaps/weeheavy/keymap.c +++ b/keyboards/dz60/keymaps/weeheavy/keymap.c @@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Base layer - ANSI QWERTY -[L0] = LAYOUT_2_shifts( +[L0] = LAYOUT_all( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, XXXX, 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, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, @@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(L1), KC_SPC, KC_RALT, MO(L2), KC_LEFT, KC_DOWN, KC_RIGHT), // Utility layer - RGB and multimedia control -[L1] = LAYOUT_2_shifts( +[L1] = LAYOUT_all( ____, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ____, ____, ____, RGB_TOG, RGB_MOD, RGB_M_K, RGB_M_R, ____, ____, KC_PSCR, ____, KC_PAUS, ____, ____, ____, ____, ____, RGB_HUI, RGB_HUD, ____, ____, ____, ____, KC_INS, KC_HOME, KC_PGUP, ____, ____, ____, @@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ____, RGB_VAI, RGB_VAD, ____, ____, ____, ____, ____, KC_MPRV, KC_VOLD, KC_MNXT), // Setup layer - Reset an additional "b" button -[L2] = LAYOUT_2_shifts( +[L2] = LAYOUT_all( RESET, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, KC_B, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, RESET, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, |