diff options
Diffstat (limited to 'keyboards/bananasplit/keymaps')
-rw-r--r-- | keyboards/bananasplit/keymaps/coloneljesus/config.h | 2 | ||||
-rw-r--r-- | keyboards/bananasplit/keymaps/coloneljesus/keymap.c | 44 |
2 files changed, 23 insertions, 23 deletions
diff --git a/keyboards/bananasplit/keymaps/coloneljesus/config.h b/keyboards/bananasplit/keymaps/coloneljesus/config.h index af6cf8ef1f..5f2cd13fef 100644 --- a/keyboards/bananasplit/keymaps/coloneljesus/config.h +++ b/keyboards/bananasplit/keymaps/coloneljesus/config.h @@ -17,7 +17,7 @@ #ifndef CONFIG_USER_H #define CONFIG_USER_H -#include "../../config.h" +#include "config_common.h" // place overrides here #define GRAVE_ESC_CTRL_OVERRIDE diff --git a/keyboards/bananasplit/keymaps/coloneljesus/keymap.c b/keyboards/bananasplit/keymaps/coloneljesus/keymap.c index 5d67079f81..ac7f1113a9 100644 --- a/keyboards/bananasplit/keymaps/coloneljesus/keymap.c +++ b/keyboards/bananasplit/keymaps/coloneljesus/keymap.c @@ -15,7 +15,9 @@ */ #include "bananasplit.h" -#define ______ KC_TRNS +enum custom_keycodes { + WIN_SWITCH_LAYOUT = SAFE_RANGE +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* @@ -35,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, M(0),\ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, WIN_SWITCH_LAYOUT,\ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_NO, KC_APP, KC_RCTL \ ), /* @@ -52,11 +54,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ------------------------------------------------------------------------------------------- */ [1] = KEYMAP( \ - ______, 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_CAPS, KC_MPRV, KC_VOLU, KC_MNXT, KC_PGUP, KC_INS, KC_HOME, LCTL(KC_LEFT), LCTL(KC_RGHT), KC_END, ______, ______, ______, KC_PSCR, \ - ______, KC_MUTE, KC_VOLD, KC_MPLY, KC_PGDN, KC_DEL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, ______, ______, ______, \ - ______, ______, ______, ______, ______, ______, LCTL(KC_BSPC), LCTL(KC_DEL), ______, ______, ______, ______, ______, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, 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_CAPS, KC_MPRV, KC_VOLU, KC_MNXT, KC_PGUP, KC_INS, KC_HOME, LCTL(KC_LEFT), LCTL(KC_RGHT), KC_END, _______, _______, _______, KC_PSCR, \ + _______, KC_MUTE, KC_VOLD, KC_MPLY, KC_PGDN, KC_DEL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, \ + _______, _______, _______, _______, _______,_______, LCTL(KC_BSPC), LCTL(KC_DEL), _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, RESET \ ), }; @@ -64,21 +66,6 @@ const uint16_t PROGMEM fn_actions[] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch(id) { - case 0: - // Sends Alt+Shift on both key down and key up. - // Fesigned to switch between two keyboard layouts on Windows using a locking switch. - // Does nothing if right shift is pressed for easier resync. - if (!(get_mods() & MOD_BIT(KC_RSFT))) - return MACRO(D(LALT), T(LSFT), U(LALT), END); - else - return MACRO_NONE; - } - return MACRO_NONE; -}; - - void matrix_init_user(void) { } @@ -88,6 +75,19 @@ void matrix_scan_user(void) { } bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case WIN_SWITCH_LAYOUT: { + // Sends Alt+Shift on both key down and key up. + // Designed to switch between two keyboard layouts on Windows using a locking switch. + // Does nothing if right shift is pressed for easy resync. + if (!(get_mods() & MOD_BIT(KC_RSFT))) { + SEND_STRING(SS_DOWN(X_LALT)SS_TAP(X_LSHIFT)SS_UP(X_LALT)); + return false; + } + else + return false; + } + } return true; } |