|
|
@ -15,7 +15,9 @@
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
#include "bananasplit.h"
|
|
|
|
#include "bananasplit.h"
|
|
|
|
|
|
|
|
|
|
|
|
#define ______ KC_TRNS
|
|
|
|
enum custom_keycodes {
|
|
|
|
|
|
|
|
WIN_SWITCH_LAYOUT = SAFE_RANGE
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
|
|
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_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_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, \
|
|
|
|
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 \
|
|
|
|
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( \
|
|
|
|
[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_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_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, ______, ______, ______, \
|
|
|
|
_______, KC_MUTE, KC_VOLD, KC_MPLY, KC_PGDN, KC_DEL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, \
|
|
|
|
______, ______, ______, ______, ______, ______, LCTL(KC_BSPC), LCTL(KC_DEL), ______, ______, ______, ______, ______, \
|
|
|
|
_______, _______, _______, _______, _______,_______, LCTL(KC_BSPC), LCTL(KC_DEL), _______, _______, _______, _______, _______, \
|
|
|
|
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET \
|
|
|
|
_______, _______, _______, _______, _______,_______, _______, _______, _______, _______, 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) {
|
|
|
|
void matrix_init_user(void) {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -88,6 +75,19 @@ void matrix_scan_user(void) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
|
|
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;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|