diff options
| -rw-r--r-- | keyboards/bananasplit/bananasplit.h | 10 | ||||
| -rw-r--r-- | keyboards/bananasplit/keymaps/coloneljesus/config.h | 2 | ||||
| -rw-r--r-- | keyboards/bananasplit/keymaps/coloneljesus/keymap.c | 44 | ||||
| -rw-r--r-- | keyboards/bananasplit/rules.mk | 23 |
4 files changed, 39 insertions, 40 deletions
diff --git a/keyboards/bananasplit/bananasplit.h b/keyboards/bananasplit/bananasplit.h index fa4c13258..f9b055c63 100644 --- a/keyboards/bananasplit/bananasplit.h +++ b/keyboards/bananasplit/bananasplit.h | |||
| @@ -47,11 +47,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 47 | } | 47 | } |
| 48 | /* Here is the above keymap filled with KC_TRNS. It's a useful starting point when defining layers. | 48 | /* Here is the above keymap filled with KC_TRNS. It's a useful starting point when defining layers. |
| 49 | KEYMAP( \ | 49 | KEYMAP( \ |
| 50 | ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ | 50 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ |
| 51 | ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ | 51 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ |
| 52 | ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ | 52 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ |
| 53 | ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,\ | 53 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ |
| 54 | ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______ \ | 54 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ |
| 55 | ) | 55 | ) |
| 56 | */ | 56 | */ |
| 57 | 57 | ||
diff --git a/keyboards/bananasplit/keymaps/coloneljesus/config.h b/keyboards/bananasplit/keymaps/coloneljesus/config.h index af6cf8ef1..5f2cd13fe 100644 --- a/keyboards/bananasplit/keymaps/coloneljesus/config.h +++ b/keyboards/bananasplit/keymaps/coloneljesus/config.h | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | #ifndef CONFIG_USER_H | 17 | #ifndef CONFIG_USER_H |
| 18 | #define CONFIG_USER_H | 18 | #define CONFIG_USER_H |
| 19 | 19 | ||
| 20 | #include "../../config.h" | 20 | #include "config_common.h" |
| 21 | 21 | ||
| 22 | // place overrides here | 22 | // place overrides here |
| 23 | #define GRAVE_ESC_CTRL_OVERRIDE | 23 | #define GRAVE_ESC_CTRL_OVERRIDE |
diff --git a/keyboards/bananasplit/keymaps/coloneljesus/keymap.c b/keyboards/bananasplit/keymaps/coloneljesus/keymap.c index 5d67079f8..ac7f1113a 100644 --- a/keyboards/bananasplit/keymaps/coloneljesus/keymap.c +++ b/keyboards/bananasplit/keymaps/coloneljesus/keymap.c | |||
| @@ -15,7 +15,9 @@ | |||
| 15 | */ | 15 | */ |
| 16 | #include "bananasplit.h" | 16 | #include "bananasplit.h" |
| 17 | 17 | ||
| 18 | #define ______ KC_TRNS | 18 | enum custom_keycodes { |
| 19 | WIN_SWITCH_LAYOUT = SAFE_RANGE | ||
| 20 | }; | ||
| 19 | 21 | ||
| 20 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 22 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 21 | /* | 23 | /* |
| @@ -35,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 35 | 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, \ | 37 | 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, \ |
| 36 | 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, \ | 38 | 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, \ |
| 37 | 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, \ | 39 | 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, \ |
| 38 | 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),\ | 40 | 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,\ |
| 39 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_NO, KC_APP, KC_RCTL \ | 41 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_NO, KC_APP, KC_RCTL \ |
| 40 | ), | 42 | ), |
| 41 | /* | 43 | /* |
| @@ -52,11 +54,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 52 | ------------------------------------------------------------------------------------------- | 54 | ------------------------------------------------------------------------------------------- |
| 53 | */ | 55 | */ |
| 54 | [1] = KEYMAP( \ | 56 | [1] = KEYMAP( \ |
| 55 | ______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ______, \ | 57 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, \ |
| 56 | KC_CAPS, KC_MPRV, KC_VOLU, KC_MNXT, KC_PGUP, KC_INS, KC_HOME, LCTL(KC_LEFT), LCTL(KC_RGHT), KC_END, ______, ______, ______, KC_PSCR, \ | 58 | KC_CAPS, KC_MPRV, KC_VOLU, KC_MNXT, KC_PGUP, KC_INS, KC_HOME, LCTL(KC_LEFT), LCTL(KC_RGHT), KC_END, _______, _______, _______, KC_PSCR, \ |
| 57 | ______, KC_MUTE, KC_VOLD, KC_MPLY, KC_PGDN, KC_DEL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, ______, ______, ______, \ | 59 | _______, KC_MUTE, KC_VOLD, KC_MPLY, KC_PGDN, KC_DEL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, \ |
| 58 | ______, ______, ______, ______, ______, ______, LCTL(KC_BSPC), LCTL(KC_DEL), ______, ______, ______, ______, ______, \ | 60 | _______, _______, _______, _______, _______,_______, LCTL(KC_BSPC), LCTL(KC_DEL), _______, _______, _______, _______, _______, \ |
| 59 | ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET \ | 61 | _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, RESET \ |
| 60 | ), | 62 | ), |
| 61 | }; | 63 | }; |
| 62 | 64 | ||
| @@ -64,21 +66,6 @@ const uint16_t PROGMEM fn_actions[] = { | |||
| 64 | 66 | ||
| 65 | }; | 67 | }; |
| 66 | 68 | ||
| 67 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { | ||
| 68 | switch(id) { | ||
| 69 | case 0: | ||
| 70 | // Sends Alt+Shift on both key down and key up. | ||
| 71 | // Fesigned to switch between two keyboard layouts on Windows using a locking switch. | ||
| 72 | // Does nothing if right shift is pressed for easier resync. | ||
| 73 | if (!(get_mods() & MOD_BIT(KC_RSFT))) | ||
| 74 | return MACRO(D(LALT), T(LSFT), U(LALT), END); | ||
| 75 | else | ||
| 76 | return MACRO_NONE; | ||
| 77 | } | ||
| 78 | return MACRO_NONE; | ||
| 79 | }; | ||
| 80 | |||
| 81 | |||
| 82 | void matrix_init_user(void) { | 69 | void matrix_init_user(void) { |
| 83 | 70 | ||
| 84 | } | 71 | } |
| @@ -88,6 +75,19 @@ void matrix_scan_user(void) { | |||
| 88 | } | 75 | } |
| 89 | 76 | ||
| 90 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 77 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
| 78 | switch (keycode) { | ||
| 79 | case WIN_SWITCH_LAYOUT: { | ||
| 80 | // Sends Alt+Shift on both key down and key up. | ||
| 81 | // Designed to switch between two keyboard layouts on Windows using a locking switch. | ||
| 82 | // Does nothing if right shift is pressed for easy resync. | ||
| 83 | if (!(get_mods() & MOD_BIT(KC_RSFT))) { | ||
| 84 | SEND_STRING(SS_DOWN(X_LALT)SS_TAP(X_LSHIFT)SS_UP(X_LALT)); | ||
| 85 | return false; | ||
| 86 | } | ||
| 87 | else | ||
| 88 | return false; | ||
| 89 | } | ||
| 90 | } | ||
| 91 | return true; | 91 | return true; |
| 92 | } | 92 | } |
| 93 | 93 | ||
diff --git a/keyboards/bananasplit/rules.mk b/keyboards/bananasplit/rules.mk index 04579d4ce..168fa06d1 100644 --- a/keyboards/bananasplit/rules.mk +++ b/keyboards/bananasplit/rules.mk | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | # MCU name | 1 | # MCU name |
| 2 | #MCU = at90usb1287 | 2 | MCU ?= atmega32u4 |
| 3 | MCU = atmega32u4 | ||
| 4 | 3 | ||
| 5 | # Processor frequency. | 4 | # Processor frequency. |
| 6 | # This will define a symbol, F_CPU, in all source code files equal to the | 5 | # This will define a symbol, F_CPU, in all source code files equal to the |
| @@ -13,14 +12,14 @@ MCU = atmega32u4 | |||
| 13 | # does not *change* the processor frequency - it should merely be updated to | 12 | # does not *change* the processor frequency - it should merely be updated to |
| 14 | # reflect the processor speed set externally so that the code can use accurate | 13 | # reflect the processor speed set externally so that the code can use accurate |
| 15 | # software delays. | 14 | # software delays. |
| 16 | F_CPU = 16000000 | 15 | F_CPU ?= 16000000 |
| 17 | 16 | ||
| 18 | 17 | ||
| 19 | # | 18 | # |
| 20 | # LUFA specific | 19 | # LUFA specific |
| 21 | # | 20 | # |
| 22 | # Target architecture (see library "Board Types" documentation). | 21 | # Target architecture (see library "Board Types" documentation). |
| 23 | ARCH = AVR8 | 22 | ARCH ?= AVR8 |
| 24 | 23 | ||
| 25 | # Input clock frequency. | 24 | # Input clock frequency. |
| 26 | # This will define a symbol, F_USB, in all source code files equal to the | 25 | # This will define a symbol, F_USB, in all source code files equal to the |
| @@ -33,7 +32,7 @@ ARCH = AVR8 | |||
| 33 | # | 32 | # |
| 34 | # If no clock division is performed on the input clock inside the AVR (via the | 33 | # If no clock division is performed on the input clock inside the AVR (via the |
| 35 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | 34 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. |
| 36 | F_USB = $(F_CPU) | 35 | F_USB ?= $(F_CPU) |
| 37 | 36 | ||
| 38 | # Interrupt driven control endpoint task(+60) | 37 | # Interrupt driven control endpoint task(+60) |
| 39 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | 38 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT |
| @@ -51,14 +50,14 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 | |||
| 51 | # Build Options | 50 | # Build Options |
| 52 | # comment out to disable the options. | 51 | # comment out to disable the options. |
| 53 | # | 52 | # |
| 54 | BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) | 53 | BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) |
| 55 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | 54 | MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) |
| 56 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 55 | EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) |
| 57 | CONSOLE_ENABLE = yes # Console for debug(+400) | 56 | CONSOLE_ENABLE ?= yes # Console for debug(+400) |
| 58 | COMMAND_ENABLE = yes # Commands for debug and configuration | 57 | COMMAND_ENABLE ?= yes # Commands for debug and configuration |
| 59 | #SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend | 58 | #SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend |
| 60 | NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA | 59 | NKRO_ENABLE ?= yes # USB Nkey Rollover - not yet supported in LUFA |
| 61 | BACKLIGHT_ENABLE = yes | 60 | BACKLIGHT_ENABLE ?= yes |
| 62 | 61 | ||
| 63 | 62 | ||
| 64 | # Optimize size but this may cause error "relocation truncated to fit" | 63 | # Optimize size but this may cause error "relocation truncated to fit" |
