From 15fbe6e233d1d344725411be02d6cc4f6c3e0881 Mon Sep 17 00:00:00 2001
From: Balz Guenat <balz.guenat@gmail.com>
Date: Thu, 3 Aug 2017 03:51:34 +0200
Subject: [PATCH 1/4] add the bananasplit keyboard incl. default keymap.

---
 keyboards/bananasplit/Makefile                |  18 ++
 keyboards/bananasplit/bananasplit.c           |  43 ++++
 keyboards/bananasplit/bananasplit.h           |  75 +++++++
 keyboards/bananasplit/config.h                | 185 ++++++++++++++++++
 .../bananasplit/keymaps/default/Makefile      |  37 ++++
 .../bananasplit/keymaps/default/config.h      |  24 +++
 .../bananasplit/keymaps/default/keymap.c      |  75 +++++++
 .../bananasplit/keymaps/default/readme.md     |  17 ++
 keyboards/bananasplit/readme.md               |  28 +++
 keyboards/bananasplit/rules.mk                |  67 +++++++
 10 files changed, 569 insertions(+)
 create mode 100644 keyboards/bananasplit/Makefile
 create mode 100644 keyboards/bananasplit/bananasplit.c
 create mode 100644 keyboards/bananasplit/bananasplit.h
 create mode 100644 keyboards/bananasplit/config.h
 create mode 100644 keyboards/bananasplit/keymaps/default/Makefile
 create mode 100644 keyboards/bananasplit/keymaps/default/config.h
 create mode 100644 keyboards/bananasplit/keymaps/default/keymap.c
 create mode 100644 keyboards/bananasplit/keymaps/default/readme.md
 create mode 100644 keyboards/bananasplit/readme.md
 create mode 100644 keyboards/bananasplit/rules.mk

diff --git a/keyboards/bananasplit/Makefile b/keyboards/bananasplit/Makefile
new file mode 100644
index 0000000000..687afba30b
--- /dev/null
+++ b/keyboards/bananasplit/Makefile
@@ -0,0 +1,18 @@
+# Copyright 2017 Balz Guenat
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+ifndef MAKEFILE_INCLUDED
+	include ../../Makefile
+endif
diff --git a/keyboards/bananasplit/bananasplit.c b/keyboards/bananasplit/bananasplit.c
new file mode 100644
index 0000000000..766e662db2
--- /dev/null
+++ b/keyboards/bananasplit/bananasplit.c
@@ -0,0 +1,43 @@
+/* Copyright 2017 Balz Guenat
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "bananasplit.h"
+
+void matrix_init_kb(void) {
+	// put your keyboard start-up code here
+	// runs once when the firmware starts up
+
+	matrix_init_user();
+}
+
+void matrix_scan_kb(void) {
+	// put your looping keyboard code here
+	// runs every cycle (a lot)
+
+	matrix_scan_user();
+}
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+	// put your per-action keyboard code here
+	// runs for every action, just before processing by the firmware
+
+	return process_record_user(keycode, record);
+}
+
+void led_set_kb(uint8_t usb_led) {
+	// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+
+	led_set_user(usb_led);
+}
diff --git a/keyboards/bananasplit/bananasplit.h b/keyboards/bananasplit/bananasplit.h
new file mode 100644
index 0000000000..f1025b9be1
--- /dev/null
+++ b/keyboards/bananasplit/bananasplit.h
@@ -0,0 +1,75 @@
+/* Copyright 2017 Balz Guenat
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef BANANASPLIT_H
+#define BANANASPLIT_H
+
+#include "quantum.h"
+
+/*
+-------------------------------------------------------------------------------------------
+| K00 | K01 | K02 | K03 | K04 | K05 | K06 | K07 | K08 | K09 | K0A | K0B | K0C |    K0D    |
+-------------------------------------------------------------------------------------------
+|  K10   | K11 | K12 | K13 | K14 | K15 | K16 | K17 | K18 | K19 | K1A | K1B | K1C |  K1D   |
+-------------------------------------------------------------------------------------------
+|   K20   | K21 | K22 | K23 | K24 | K25 | K26 | K27 | K28 | K29 | K2A | K2B |     K2C     |
+-------------------------------------------------------------------------------------------
+|     K30     | K32 | K33 | K34 | K35 | K36 | K37 | K38 | K39 | K3A | K3B |   K3C   | K3D |
+-------------------------------------------------------------------------------------------
+|  K40  |  K41  |  K42  |     K44     |  K45  |     K46     | K48 | K49 | K4A | K4B | K4C |
+-------------------------------------------------------------------------------------------
+*/
+#define KEYMAP( \
+    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
+    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
+    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
+    K30,      K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D,\
+    K40, K41, K42,      K44, K45, K46,      K48, K49, K4A, K4B, K4C  \
+) { \
+    { K00, K01,   K02, K03,   K04, K05, K06, K07,   K08, K09, K0A, K0B, K0C, K0D   }, \
+    { K10, K11,   K12, K13,   K14, K15, K16, K17,   K18, K19, K1A, K1B, K1C, K1D   }, \
+    { K20, K21,   K22, K23,   K24, K25, K26, K27,   K28, K29, K2A, K2B, K2C, KC_NO }, \
+    { K30, KC_NO, K32, K33,   K34, K35, K36, K37,   K38, K39, K3A, K3B, K3C, K3D   }, \
+    { K40, K41,   K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, K4A, K4B, K4C, KC_NO }  \
+}
+
+/*
+-------------------------------------------------------------------------------------------
+| K00 | K01 | K02 | K03 | K04 | K05 | K06 | K07 | K08 | K09 | K0A | K0B | K0C | K0D | K2D |
+-------------------------------------------------------------------------------------------
+|  K10   | K11 | K12 | K13 | K14 | K15 | K16 | K17 | K18 | K19 | K1A | K1B | K1C |  K1D   |
+-------------------------------------------------------------------------------------------
+|   K20   | K21 | K22 | K23 | K24 | K25 | K26 | K27 | K28 | K29 | K2A | K2B |     K2C     |
+-------------------------------------------------------------------------------------------
+|  K30  | K31 | K32 | K33 | K34 | K35 | K36 | K37 | K38 | K39 | K3A | K3B |   K3C   | K3D |
+-------------------------------------------------------------------------------------------
+|  K40  |  K41  |  K42  |     K44     |  K45  |     K46     | K48 | K49 | K4A | K4B | K4C |
+-------------------------------------------------------------------------------------------
+*/
+#define KEYMAP_ALL( \
+    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \
+    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D,      \
+    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C,           \
+    K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D,      \
+    K40, K41, K42,      K44, K45, K46,      K48, K49, K4A, K4B, K4C            \
+) { \
+    { K00, K01, K02, K03,   K04, K05, K06, K07,   K08, K09, K0A, K0B, K0C, K0D   }, \
+    { K10, K11, K12, K13,   K14, K15, K16, K17,   K18, K19, K1A, K1B, K1C, K1D   }, \
+    { K20, K21, K22, K23,   K24, K25, K26, K27,   K28, K29, K2A, K2B, K2C, K2D   }, \
+    { K30, K31, K32, K33,   K34, K35, K36, K37,   K38, K39, K3A, K3B, K3C, K3D   }, \
+    { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, K4A, K4B, K4C, KC_NO }  \
+}
+
+#endif
diff --git a/keyboards/bananasplit/config.h b/keyboards/bananasplit/config.h
new file mode 100644
index 0000000000..6d92deb0c0
--- /dev/null
+++ b/keyboards/bananasplit/config.h
@@ -0,0 +1,185 @@
+/*
+Copyright 2017 Balz Guenat
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID       0xFEAE
+#define PRODUCT_ID      0x8870
+#define DEVICE_VER      0x0001
+#define MANUFACTURER    TheVan Keyboards
+#define PRODUCT         BananaSplit 60
+#define DESCRIPTION     keyboard firmware for BananaSplit 60
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 14
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ *                  ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { B0, B2, B4, B5, B6 }
+#define MATRIX_COL_PINS { F5, B1, F0, F1, F4, B3, D7, D6, D4, D5, D3, D2, D1, D0 }
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+#define DIODE_DIRECTION COL2ROW
+ 
+// #define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+#define BACKLIGHT_LEVELS 1
+
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+#define IS_COMMAND() ( \
+    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS  true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS  true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1          H
+//#define MAGIC_KEY_HELP2          SLASH
+//#define MAGIC_KEY_DEBUG          D
+//#define MAGIC_KEY_DEBUG_MATRIX   X
+//#define MAGIC_KEY_DEBUG_KBD      K
+//#define MAGIC_KEY_DEBUG_MOUSE    M
+//#define MAGIC_KEY_VERSION        V
+//#define MAGIC_KEY_STATUS         S
+//#define MAGIC_KEY_CONSOLE        C
+//#define MAGIC_KEY_LAYER0_ALT1    ESC
+//#define MAGIC_KEY_LAYER0_ALT2    GRAVE
+//#define MAGIC_KEY_LAYER0         0
+//#define MAGIC_KEY_LAYER1         1
+//#define MAGIC_KEY_LAYER2         2
+//#define MAGIC_KEY_LAYER3         3
+//#define MAGIC_KEY_LAYER4         4
+//#define MAGIC_KEY_LAYER5         5
+//#define MAGIC_KEY_LAYER6         6
+//#define MAGIC_KEY_LAYER7         7
+//#define MAGIC_KEY_LAYER8         8
+//#define MAGIC_KEY_LAYER9         9
+//#define MAGIC_KEY_BOOTLOADER     PAUSE
+//#define MAGIC_KEY_LOCK           CAPS
+//#define MAGIC_KEY_EEPROM         E
+//#define MAGIC_KEY_NKRO           N
+//#define MAGIC_KEY_SLEEP_LED      Z
+
+/*
+ * Feature disable options
+ *  These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* enable basic MIDI features:
+   - MIDI notes can be sent when in Music mode is on
+*/
+//#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+   - MIDI notes can be added to the keymap
+   - Octave shift and transpose
+   - Virtual sustain, portamento, and modulation wheel
+   - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 1
+
+#endif
diff --git a/keyboards/bananasplit/keymaps/default/Makefile b/keyboards/bananasplit/keymaps/default/Makefile
new file mode 100644
index 0000000000..7d09c322e5
--- /dev/null
+++ b/keyboards/bananasplit/keymaps/default/Makefile
@@ -0,0 +1,37 @@
+# Copyright 2017 Balz Guenat
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+# QMK Build Options
+#   change to "no" to disable the options, or define them in the Makefile in 
+#   the appropriate keymap folder that will get included automatically
+#
+# BOOTMAGIC_ENABLE = no       # Virtual DIP switch configuration(+1000)
+# MOUSEKEY_ENABLE = yes       # Mouse keys(+4700)
+# EXTRAKEY_ENABLE = yes       # Audio control and System control(+450)
+# CONSOLE_ENABLE = no         # Console for debug(+400)
+# COMMAND_ENABLE = yes        # Commands for debug and configuration
+# NKRO_ENABLE = yes           # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+# BACKLIGHT_ENABLE = no       # Enable keyboard backlight functionality
+# MIDI_ENABLE = no            # MIDI support (+2400 to 4200, depending on config)
+# AUDIO_ENABLE = no           # Audio output on port C6
+# UNICODE_ENABLE = no         # Unicode
+# BLUETOOTH_ENABLE = no       # Enable Bluetooth with the Adafruit EZ-Key HID
+# RGBLIGHT_ENABLE = no        # Enable WS2812 RGB underlight.  Do not enable this with audio at the same time.
+# SLEEP_LED_ENABLE = no       # Breathing sleep LED during USB suspend
+
+ifndef QUANTUM_DIR
+	include ../../../../Makefile
+endif
diff --git a/keyboards/bananasplit/keymaps/default/config.h b/keyboards/bananasplit/keymaps/default/config.h
new file mode 100644
index 0000000000..060f5922f2
--- /dev/null
+++ b/keyboards/bananasplit/keymaps/default/config.h
@@ -0,0 +1,24 @@
+/* Copyright 2017 Balz Guenat
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+// place overrides here
+
+#endif
diff --git a/keyboards/bananasplit/keymaps/default/keymap.c b/keyboards/bananasplit/keymaps/default/keymap.c
new file mode 100644
index 0000000000..9aa65fb7ea
--- /dev/null
+++ b/keyboards/bananasplit/keymaps/default/keymap.c
@@ -0,0 +1,75 @@
+/* Copyright 2017 Balz Guenat
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "bananasplit.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/*
+-------------------------------------------------------------------------------------------
+| Esc |  1  |  2  |  3  |  4  |  5  |  6  |  7  |  8  |  9  |  0  |  -  |  =  | Backspace |
+-------------------------------------------------------------------------------------------
+|  Tab   |  Q  |  W  |  E  |  R  |  T  |  Y  |  U  |  I  |  O  |  P  |  [  |  ]  |   \    |
+-------------------------------------------------------------------------------------------
+| CapsLck |  A  |  S  |  D  |  F  |  G  |  H  |  J  |  K  |  L  |  ;  |  '  |    Enter    |
+-------------------------------------------------------------------------------------------
+|    Shift    |  Z  |  X  |  C  |  V  |  B  |  N  |  M  |  ,  |  .  |RSFT_T(/)| Up  |Light|
+-------------------------------------------------------------------------------------------
+| Ctrl  |  GUI  |  Alt  |    Enter    |  App  |    Space    | Alt |Ctrl |Left |Down |Right|
+-------------------------------------------------------------------------------------------
+*/
+[0] = KEYMAP( \
+    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_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, RSFT_T(KC_SLSH), KC_UP, BL_STEP,\
+    KC_LCTL, KC_LGUI, KC_LALT, KC_ENT, KC_APP, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
+),
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+  // MACRODOWN only works in this function
+      switch(id) {
+        case 0:
+          if (record->event.pressed) {
+            register_code(KC_RSFT);
+          } else {
+            unregister_code(KC_RSFT);
+          }
+        break;
+      }
+    return MACRO_NONE;
+};
+
+
+void matrix_init_user(void) {
+
+}
+
+void matrix_scan_user(void) {
+
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+  return true;
+}
+
+void led_set_user(uint8_t usb_led) {
+
+}
diff --git a/keyboards/bananasplit/keymaps/default/readme.md b/keyboards/bananasplit/keymaps/default/readme.md
new file mode 100644
index 0000000000..9e8eeb5bdd
--- /dev/null
+++ b/keyboards/bananasplit/keymaps/default/readme.md
@@ -0,0 +1,17 @@
+# The default keymap for the Bananasplit
+
+```
+-------------------------------------------------------------------------------------------
+| Esc |  1  |  2  |  3  |  4  |  5  |  6  |  7  |  8  |  9  |  0  |  -  |  =  | Backspace |
+-------------------------------------------------------------------------------------------
+|  Tab   |  Q  |  W  |  E  |  R  |  T  |  Y  |  U  |  I  |  O  |  P  |  [  |  ]  |   \    |
+-------------------------------------------------------------------------------------------
+| CapsLck |  A  |  S  |  D  |  F  |  G  |  H  |  J  |  K  |  L  |  ;  |  '  |    Enter    |
+-------------------------------------------------------------------------------------------
+|    Shift    |  Z  |  X  |  C  |  V  |  B  |  N  |  M  |  ,  |  .  |RSFT_T(/)| Up  |Light|
+-------------------------------------------------------------------------------------------
+| Ctrl  |  GUI  |  Alt  |    Enter    |  App  |    Space    | Alt |Ctrl |Left |Down |Right|
+-------------------------------------------------------------------------------------------
+```
+
+The `RSFT_T(/)` key works as `/` when tapped and as right shift when held.
diff --git a/keyboards/bananasplit/readme.md b/keyboards/bananasplit/readme.md
new file mode 100644
index 0000000000..b4fac7ac9f
--- /dev/null
+++ b/keyboards/bananasplit/readme.md
@@ -0,0 +1,28 @@
+Bananasplit keyboard firmware
+======================
+
+The BananaSplit60 is a custom 60% keyboard with a split space bar. It was conceived by Arhipio and evangs. It was ported to QMK by Coloneljesus.
+
+## Quantum MK Firmware
+
+For the full Quantum feature list, see [the parent readme](/).
+
+## Building
+
+Download or clone the whole firmware and navigate to the keyboards/bananasplit folder. Once your dev env is set up, you'll be able to type `make` to generate your .hex which can then be flashed to the keyboard.
+
+### Default
+
+To build with the default keymap, simply run `make default`.
+
+### Other Keymaps
+
+You are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files.
+
+To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
+
+```
+$ make [default|jack|<name>]
+```
+
+Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
diff --git a/keyboards/bananasplit/rules.mk b/keyboards/bananasplit/rules.mk
new file mode 100644
index 0000000000..00c144bc06
--- /dev/null
+++ b/keyboards/bananasplit/rules.mk
@@ -0,0 +1,67 @@
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+#     This will define a symbol, F_CPU, in all source code files equal to the
+#     processor frequency in Hz. You can then use this symbol in your source code to
+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+#     automatically to create a 32-bit value in your source code.
+#
+#     This will be an integer division of F_USB below, as it is sourced by
+#     F_USB after it has run through any CPU prescalers. Note that this value
+#     does not *change* the processor frequency - it should merely be updated to
+#     reflect the processor speed set externally so that the code can use accurate
+#     software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+#     This will define a symbol, F_USB, in all source code files equal to the
+#     input clock frequency (before any prescaling is performed) in Hz. This value may
+#     differ from F_CPU if prescaling is used on the latter, and is required as the
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+#     at the end, this will be done automatically to create a 32-bit value in your
+#     source code.
+#
+#     If no clock division is performed on the input clock inside the AVR (via the
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+#   Teensy halfKay   512
+#   Teensy++ halfKay 1024
+#   Atmel DFU loader 4096
+#   LUFA bootloader  4096
+#   USBaspLoader     2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+#   change yes to no to disable
+#
+BOOTMAGIC_ENABLE ?= yes      # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE ?= yes       # Mouse keys(+4700)
+EXTRAKEY_ENABLE ?= yes       # Audio control and System control(+450)
+CONSOLE_ENABLE ?= yes        # Console for debug(+400)
+COMMAND_ENABLE ?= yes        # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE ?= no            # USB Nkey Rollover
+BACKLIGHT_ENABLE ?= yes      # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE ?= no            # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE ?= no         # Unicode
+BLUETOOTH_ENABLE ?= no       # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE ?= no           # Audio output on port C6
+FAUXCLICKY_ENABLE ?= no      # Use buzzer to emulate clicky switches

From d8c503f3acbd9c0bff431d396ed10e9e1fd12888 Mon Sep 17 00:00:00 2001
From: Balz Guenat <balz.guenat@gmail.com>
Date: Thu, 3 Aug 2017 23:33:31 +0200
Subject: [PATCH 2/4] add personal keymap

---
 keyboards/bananasplit/bananasplit.h           |  9 ++
 .../bananasplit/keymaps/coloneljesus/Makefile | 37 +++++++
 .../bananasplit/keymaps/coloneljesus/config.h | 24 +++++
 .../bananasplit/keymaps/coloneljesus/keymap.c | 97 +++++++++++++++++++
 .../keymaps/coloneljesus/readme.md            | 33 +++++++
 5 files changed, 200 insertions(+)
 create mode 100644 keyboards/bananasplit/keymaps/coloneljesus/Makefile
 create mode 100644 keyboards/bananasplit/keymaps/coloneljesus/config.h
 create mode 100644 keyboards/bananasplit/keymaps/coloneljesus/keymap.c
 create mode 100644 keyboards/bananasplit/keymaps/coloneljesus/readme.md

diff --git a/keyboards/bananasplit/bananasplit.h b/keyboards/bananasplit/bananasplit.h
index f1025b9be1..aeb27da100 100644
--- a/keyboards/bananasplit/bananasplit.h
+++ b/keyboards/bananasplit/bananasplit.h
@@ -44,6 +44,15 @@
     { K30, KC_NO, K32, K33,   K34, K35, K36, K37,   K38, K39, K3A, K3B, K3C, K3D   }, \
     { K40, K41,   K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, K4A, K4B, K4C, KC_NO }  \
 }
+/* Here is the above keymap filled with KC_TRNS. It's a useful starting point when defining layers.
+KEYMAP( \
+    ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
+    ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
+    ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
+    ______,         ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,\
+    ______, ______, ______,         ______, ______, ______,         ______, ______, ______, ______, ______  \
+)
+*/
 
 /*
 -------------------------------------------------------------------------------------------
diff --git a/keyboards/bananasplit/keymaps/coloneljesus/Makefile b/keyboards/bananasplit/keymaps/coloneljesus/Makefile
new file mode 100644
index 0000000000..7d09c322e5
--- /dev/null
+++ b/keyboards/bananasplit/keymaps/coloneljesus/Makefile
@@ -0,0 +1,37 @@
+# Copyright 2017 Balz Guenat
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+# QMK Build Options
+#   change to "no" to disable the options, or define them in the Makefile in 
+#   the appropriate keymap folder that will get included automatically
+#
+# BOOTMAGIC_ENABLE = no       # Virtual DIP switch configuration(+1000)
+# MOUSEKEY_ENABLE = yes       # Mouse keys(+4700)
+# EXTRAKEY_ENABLE = yes       # Audio control and System control(+450)
+# CONSOLE_ENABLE = no         # Console for debug(+400)
+# COMMAND_ENABLE = yes        # Commands for debug and configuration
+# NKRO_ENABLE = yes           # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+# BACKLIGHT_ENABLE = no       # Enable keyboard backlight functionality
+# MIDI_ENABLE = no            # MIDI support (+2400 to 4200, depending on config)
+# AUDIO_ENABLE = no           # Audio output on port C6
+# UNICODE_ENABLE = no         # Unicode
+# BLUETOOTH_ENABLE = no       # Enable Bluetooth with the Adafruit EZ-Key HID
+# RGBLIGHT_ENABLE = no        # Enable WS2812 RGB underlight.  Do not enable this with audio at the same time.
+# SLEEP_LED_ENABLE = no       # Breathing sleep LED during USB suspend
+
+ifndef QUANTUM_DIR
+	include ../../../../Makefile
+endif
diff --git a/keyboards/bananasplit/keymaps/coloneljesus/config.h b/keyboards/bananasplit/keymaps/coloneljesus/config.h
new file mode 100644
index 0000000000..060f5922f2
--- /dev/null
+++ b/keyboards/bananasplit/keymaps/coloneljesus/config.h
@@ -0,0 +1,24 @@
+/* Copyright 2017 Balz Guenat
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+// place overrides here
+
+#endif
diff --git a/keyboards/bananasplit/keymaps/coloneljesus/keymap.c b/keyboards/bananasplit/keymaps/coloneljesus/keymap.c
new file mode 100644
index 0000000000..8a704612bb
--- /dev/null
+++ b/keyboards/bananasplit/keymaps/coloneljesus/keymap.c
@@ -0,0 +1,97 @@
+/* Copyright 2017 Balz Guenat
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "bananasplit.h"
+
+#define ______ KC_TRNS
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/*
+-------------------------------------------------------------------------------------------
+|GvEsc|  1  |  2  |  3  |  4  |  5  |  6  |  7  |  8  |  9  |  0  |  -  |  =  | Backspace |
+-------------------------------------------------------------------------------------------
+|  Tab   |  Q  |  W  |  E  |  R  |  T  |  Y  |  U  |  I  |  O  |  P  |  [  |  ]  |   \    |
+-------------------------------------------------------------------------------------------
+|   Fn1   |  A  |  S  |  D  |  F  |  G  |  H  |  J  |  K  |  L  |  ;  |  '  |    Enter    |
+-------------------------------------------------------------------------------------------
+|    Shift    |  Z  |  X  |  C  |  V  |  B  |  N  |  M  |  ,  |  .  |  /  |     Shift     |
+-------------------------------------------------------------------------------------------
+| Ctrl  |  GUI  |  Alt  |   Space    |  Fn1  |   Space    |  Alt  |  GUI  |  App  | Ctrl  |
+-------------------------------------------------------------------------------------------
+*/
+[0] = KEYMAP( \
+    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_NO,\
+    KC_LCTL, KC_LGUI, KC_LALT,       KC_SPC, MO(1), KC_SPC,       KC_RALT, KC_RGUI, KC_NO,   KC_APP,  KC_RCTL \
+),
+/*
+-------------------------------------------------------------------------------------------
+|     | F1  | F2  | F3  | F4  | F5  | F6  | F7  | F8  | F9  | F10 | F11 | F12 |           |
+-------------------------------------------------------------------------------------------
+| CpsLck |Prev |Vol+ |Next |PgUp | Ins |Home |WrdL |WrdR | End |     |     |     | PrtSc  |
+-------------------------------------------------------------------------------------------
+|  TRNS   |Mute |Vol- |Play |PgDn | Del |Left |Down | Up  |Right|     |     |             |
+-------------------------------------------------------------------------------------------
+|             |     |     |     |     |     |DelWL|DelWR|     |     |     |               |
+-------------------------------------------------------------------------------------------
+|       |       |       |            | TRNS  |            |       |       |       | Reset |
+-------------------------------------------------------------------------------------------
+*/
+[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 \
+),
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+  // MACRODOWN only works in this function
+      switch(id) {
+        case 0:
+          if (record->event.pressed) {
+            register_code(KC_RSFT);
+          } else {
+            unregister_code(KC_RSFT);
+          }
+        break;
+      }
+    return MACRO_NONE;
+};
+
+
+void matrix_init_user(void) {
+
+}
+
+void matrix_scan_user(void) {
+
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+  return true;
+}
+
+void led_set_user(uint8_t usb_led) {
+
+}
diff --git a/keyboards/bananasplit/keymaps/coloneljesus/readme.md b/keyboards/bananasplit/keymaps/coloneljesus/readme.md
new file mode 100644
index 0000000000..b9ce5f44a1
--- /dev/null
+++ b/keyboards/bananasplit/keymaps/coloneljesus/readme.md
@@ -0,0 +1,33 @@
+# /u/Coloneljesus's keymap for the Bananasplit
+
+Default layer:
+
+```
+-------------------------------------------------------------------------------------------
+|GvEsc|  1  |  2  |  3  |  4  |  5  |  6  |  7  |  8  |  9  |  0  |  -  |  =  | Backspace |
+-------------------------------------------------------------------------------------------
+|  Tab   |  Q  |  W  |  E  |  R  |  T  |  Y  |  U  |  I  |  O  |  P  |  [  |  ]  |   \    |
+-------------------------------------------------------------------------------------------
+|   Fn1   |  A  |  S  |  D  |  F  |  G  |  H  |  J  |  K  |  L  |  ;  |  '  |    Enter    |
+-------------------------------------------------------------------------------------------
+|    Shift    |  Z  |  X  |  C  |  V  |  B  |  N  |  M  |  ,  |  .  |  /  |     Shift     |
+-------------------------------------------------------------------------------------------
+| Ctrl  |  GUI  |  Alt  |   Space    |  Fn1  |   Space    |  Alt  |  GUI  |  App  | Ctrl  |
+-------------------------------------------------------------------------------------------
+```
+
+Fn1 layer:
+
+```
+-------------------------------------------------------------------------------------------
+|     | F1  | F2  | F3  | F4  | F5  | F6  | F7  | F8  | F9  | F10 | F11 | F12 |           |
+-------------------------------------------------------------------------------------------
+| CpsLck |Prev |Vol+ |Next |PgUp | Ins |Home |WrdL |WrdR | End |     |     |     | PrtSc  |
+-------------------------------------------------------------------------------------------
+|  TRNS   |Mute |Vol- |Play |PgDn | Del |Left |Down | Up  |Right|     |     |             |
+-------------------------------------------------------------------------------------------
+|             |     |     |     |     |     |DelWL|DelWR|     |     |     |               |
+-------------------------------------------------------------------------------------------
+|       |       |       |            | TRNS  |            |       |       |       | Reset |
+-------------------------------------------------------------------------------------------
+```
\ No newline at end of file

From 308bec28bb76f4305d0f084252d7cf207f1b3d83 Mon Sep 17 00:00:00 2001
From: Balz Guenat <balz.guenat@gmail.com>
Date: Fri, 4 Aug 2017 04:16:39 +0200
Subject: [PATCH 3/4] Add language-switch for locking switch

---
 .../bananasplit/keymaps/coloneljesus/keymap.c | 31 +++++++++----------
 1 file changed, 15 insertions(+), 16 deletions(-)

diff --git a/keyboards/bananasplit/keymaps/coloneljesus/keymap.c b/keyboards/bananasplit/keymaps/coloneljesus/keymap.c
index 8a704612bb..5d67079f81 100644
--- a/keyboards/bananasplit/keymaps/coloneljesus/keymap.c
+++ b/keyboards/bananasplit/keymaps/coloneljesus/keymap.c
@@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 -------------------------------------------------------------------------------------------
 |   Fn1   |  A  |  S  |  D  |  F  |  G  |  H  |  J  |  K  |  L  |  ;  |  '  |    Enter    |
 -------------------------------------------------------------------------------------------
-|    Shift    |  Z  |  X  |  C  |  V  |  B  |  N  |  M  |  ,  |  .  |  /  |     Shift     |
+|    Shift    |  Z  |  X  |  C  |  V  |  B  |  N  |  M  |  ,  |  .  |  /  |  Shift  |M(0) |
 -------------------------------------------------------------------------------------------
 | Ctrl  |  GUI  |  Alt  |   Space    |  Fn1  |   Space    |  Alt  |  GUI  |  App  | Ctrl  |
 -------------------------------------------------------------------------------------------
@@ -35,7 +35,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, KC_NO,\
+    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_LCTL, KC_LGUI, KC_LALT,       KC_SPC, MO(1), KC_SPC,       KC_RALT, KC_RGUI, KC_NO,   KC_APP,  KC_RCTL \
 ),
 /*
@@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 -------------------------------------------------------------------------------------------
 |  TRNS   |Mute |Vol- |Play |PgDn | Del |Left |Down | Up  |Right|     |     |             |
 -------------------------------------------------------------------------------------------
-|             |     |     |     |     |     |DelWL|DelWR|     |     |     |               |
+|             |     |     |     |     |     |DelWL|DelWR|     |     |     |         |     |
 -------------------------------------------------------------------------------------------
 |       |       |       |            | TRNS  |            |       |       |       | Reset |
 -------------------------------------------------------------------------------------------
@@ -64,19 +64,18 @@ const uint16_t PROGMEM fn_actions[] = {
 
 };
 
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
-  // MACRODOWN only works in this function
-      switch(id) {
-        case 0:
-          if (record->event.pressed) {
-            register_code(KC_RSFT);
-          } else {
-            unregister_code(KC_RSFT);
-          }
-        break;
-      }
-    return MACRO_NONE;
+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;
 };
 
 

From 3961e142097d3a04a086daba4f7fed5c694aca8d Mon Sep 17 00:00:00 2001
From: Balz Guenat <balz.guenat@gmail.com>
Date: Mon, 7 Aug 2017 22:26:32 +0200
Subject: [PATCH 4/4] remove duplicate readme

---
 keyboards/bananasplit/readme.md | 28 ----------------------------
 1 file changed, 28 deletions(-)
 delete mode 100644 keyboards/bananasplit/readme.md

diff --git a/keyboards/bananasplit/readme.md b/keyboards/bananasplit/readme.md
deleted file mode 100644
index b4fac7ac9f..0000000000
--- a/keyboards/bananasplit/readme.md
+++ /dev/null
@@ -1,28 +0,0 @@
-Bananasplit keyboard firmware
-======================
-
-The BananaSplit60 is a custom 60% keyboard with a split space bar. It was conceived by Arhipio and evangs. It was ported to QMK by Coloneljesus.
-
-## Quantum MK Firmware
-
-For the full Quantum feature list, see [the parent readme](/).
-
-## Building
-
-Download or clone the whole firmware and navigate to the keyboards/bananasplit folder. Once your dev env is set up, you'll be able to type `make` to generate your .hex which can then be flashed to the keyboard.
-
-### Default
-
-To build with the default keymap, simply run `make default`.
-
-### Other Keymaps
-
-You are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files.
-
-To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
-
-```
-$ make [default|jack|<name>]
-```
-
-Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.