--- /dev/null
+#----------------------------------------------------------------------------\r
+# On command line:\r
+#\r
+# make all = Make software.\r
+#\r
+# make clean = Clean out built project files.\r
+#\r
+# make coff = Convert ELF to AVR COFF.\r
+#\r
+# make extcoff = Convert ELF to AVR Extended COFF.\r
+#\r
+# make program = Download the hex file to the device.\r
+# Please customize your programmer settings(PROGRAM_CMD)\r
+#\r
+# make teensy = Download the hex file to the device, using teensy_loader_cli.\r
+# (must have teensy_loader_cli installed).\r
+#\r
+# make dfu = Download the hex file to the device, using dfu-programmer (must\r
+# have dfu-programmer installed).\r
+#\r
+# make flip = Download the hex file to the device, using Atmel FLIP (must\r
+# have Atmel FLIP installed).\r
+#\r
+# make dfu-ee = Download the eeprom file to the device, using dfu-programmer\r
+# (must have dfu-programmer installed).\r
+#\r
+# make flip-ee = Download the eeprom file to the device, using Atmel FLIP\r
+# (must have Atmel FLIP installed).\r
+#\r
+# make debug = Start either simulavr or avarice as specified for debugging, \r
+# with avr-gdb or avr-insight as the front end for debugging.\r
+#\r
+# make filename.s = Just compile filename.c into the assembler code only.\r
+#\r
+# make filename.i = Create a preprocessed source file for use in submitting\r
+# bug reports to the GCC project.\r
+#\r
+# To rebuild project do "make clean" then "make all".\r
+#----------------------------------------------------------------------------\r
+\r
+# MCU name\r
+#MCU = at90usb1287\r
+MCU = atmega32u4\r
+\r
+# Processor frequency.\r
+# This will define a symbol, F_CPU, in all source code files equal to the\r
+# processor frequency in Hz. You can then use this symbol in your source code to\r
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done\r
+# automatically to create a 32-bit value in your source code.\r
+#\r
+# This will be an integer division of F_USB below, as it is sourced by\r
+# F_USB after it has run through any CPU prescalers. Note that this value\r
+# does not *change* the processor frequency - it should merely be updated to\r
+# reflect the processor speed set externally so that the code can use accurate\r
+# software delays.\r
+F_CPU = 16000000\r
+\r
+\r
+#\r
+# LUFA specific\r
+#\r
+# Target architecture (see library "Board Types" documentation).\r
+ARCH = AVR8\r
+\r
+# Input clock frequency.\r
+# This will define a symbol, F_USB, in all source code files equal to the\r
+# input clock frequency (before any prescaling is performed) in Hz. This value may\r
+# differ from F_CPU if prescaling is used on the latter, and is required as the\r
+# raw input clock is fed directly to the PLL sections of the AVR for high speed\r
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'\r
+# at the end, this will be done automatically to create a 32-bit value in your\r
+# source code.\r
+#\r
+# If no clock division is performed on the input clock inside the AVR (via the\r
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
+F_USB = $(F_CPU)\r
+\r
+# Interrupt driven control endpoint task(+60)\r
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT\r
+\r
+\r
+# Boot Section Size in *bytes*\r
+# Teensy halfKay 512\r
+# Teensy++ halfKay 1024\r
+# Atmel DFU loader 4096\r
+# LUFA bootloader 4096\r
+# USBaspLoader 2048\r
+OPT_DEFS += -DBOOTLOADER_SIZE=4096\r
+\r
+\r
+# Build Options\r
+# comment out to disable the options.\r
+#\r
+BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)\r
+MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)\r
+EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)\r
+# CONSOLE_ENABLE ?= yes # Console for debug(+400)\r
+# COMMAND_ENABLE ?= yes # Commands for debug and configuration\r
+KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key\r
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE\r
+# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend\r
+NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work\r
+# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality\r
+# MIDI_ENABLE ?= YES # MIDI controls\r
+# UNICODE_ENABLE ?= YES # Unicode\r
+# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID\r
+RGBLIGHT_ENABLE ?= yes # Enable RGB Underglow\r
+\r
+ifndef QUANTUM_DIR\r
+ include ../../../../Makefile\r
+endif\r
+\r
--- /dev/null
+/*\r
+Copyright 2012 Jun Wako <wakojun@gmail.com>\r
+\r
+This program is free software: you can redistribute it and/or modify\r
+it under the terms of the GNU General Public License as published by\r
+the Free Software Foundation, either version 2 of the License, or\r
+(at your option) any later version.\r
+\r
+This program is distributed in the hope that it will be useful,\r
+but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+GNU General Public License for more details.\r
+\r
+You should have received a copy of the GNU General Public License\r
+along with this program. If not, see <http://www.gnu.org/licenses/>.\r
+*/\r
+\r
+#ifndef CONFIG_H\r
+#define CONFIG_H\r
+\r
+#include "config_common.h"\r
+\r
+/* USB Device descriptor parameter */\r
+#define VENDOR_ID 0xFEED\r
+#define PRODUCT_ID 0x6060\r
+#define DEVICE_VER 0x0001\r
+#define MANUFACTURER geekhack\r
+#define PRODUCT GH60\r
+#define DESCRIPTION t.m.k. keyboard firmware for GH60\r
+\r
+/* key matrix size */\r
+#define MATRIX_ROWS 5\r
+#define MATRIX_COLS 14\r
+\r
+/*\r
+ * Keyboard Matrix Assignments\r
+ *\r
+ * Change this to how you wired your keyboard\r
+ * COLS: AVR pins used for columns, left to right\r
+ * ROWS: AVR pins used for rows, top to bottom\r
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)\r
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)\r
+ *\r
+*/\r
+ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 }\r
+// Rev A\r
+// #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B0, B5, B4, D7, D6, B3 }\r
+// Rev B/C\r
+ #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 }\r
+#define UNUSED_PINS\r
+\r
+/* COL2ROW or ROW2COL */\r
+#define DIODE_DIRECTION COL2ROW\r
+\r
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */\r
+#define DEBOUNCING_DELAY 5\r
+\r
+/* define if matrix has ghost (lacks anti-ghosting diodes) */\r
+//#define MATRIX_HAS_GHOST\r
+\r
+/* number of backlight levels */\r
+#define BACKLIGHT_LEVELS 3\r
+\r
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */\r
+#define LOCKING_SUPPORT_ENABLE\r
+/* Locking resynchronize hack */\r
+#define LOCKING_RESYNC_ENABLE\r
+\r
+/*\r
+ * Force NKRO\r
+ *\r
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved\r
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the\r
+ * makefile for this to work.)\r
+ *\r
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)\r
+ * until the next keyboard reset.\r
+ *\r
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is\r
+ * fully operational during normal computer usage.\r
+ *\r
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)\r
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by\r
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a\r
+ * power-up.\r
+ *\r
+ */\r
+//#define FORCE_NKRO\r
+\r
+/*\r
+ * Magic Key Options\r
+ *\r
+ * Magic keys are hotkey commands that allow control over firmware functions of\r
+ * the keyboard. They are best used in combination with the HID Listen program,\r
+ * found here: https://www.pjrc.com/teensy/hid_listen.html\r
+ *\r
+ * The options below allow the magic key functionality to be changed. This is\r
+ * useful if your keyboard/keypad is missing keys and you want magic key support.\r
+ *\r
+ */\r
+\r
+/* key combination for magic key command */\r
+#define IS_COMMAND() ( \\r
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \\r
+)\r
+\r
+/* control how magic key switches layers */\r
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true\r
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true\r
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false\r
+\r
+/* override magic key keymap */\r
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS\r
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS\r
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM\r
+//#define MAGIC_KEY_HELP1 H\r
+//#define MAGIC_KEY_HELP2 SLASH\r
+//#define MAGIC_KEY_DEBUG D\r
+//#define MAGIC_KEY_DEBUG_MATRIX X\r
+//#define MAGIC_KEY_DEBUG_KBD K\r
+//#define MAGIC_KEY_DEBUG_MOUSE M\r
+//#define MAGIC_KEY_VERSION V\r
+//#define MAGIC_KEY_STATUS S\r
+//#define MAGIC_KEY_CONSOLE C\r
+//#define MAGIC_KEY_LAYER0_ALT1 ESC\r
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE\r
+//#define MAGIC_KEY_LAYER0 0\r
+//#define MAGIC_KEY_LAYER1 1\r
+//#define MAGIC_KEY_LAYER2 2\r
+//#define MAGIC_KEY_LAYER3 3\r
+//#define MAGIC_KEY_LAYER4 4\r
+//#define MAGIC_KEY_LAYER5 5\r
+//#define MAGIC_KEY_LAYER6 6\r
+//#define MAGIC_KEY_LAYER7 7\r
+//#define MAGIC_KEY_LAYER8 8\r
+//#define MAGIC_KEY_LAYER9 9\r
+//#define MAGIC_KEY_BOOTLOADER PAUSE\r
+//#define MAGIC_KEY_LOCK CAPS\r
+//#define MAGIC_KEY_EEPROM E\r
+//#define MAGIC_KEY_NKRO N\r
+//#define MAGIC_KEY_SLEEP_LED Z\r
+\r
+/*\r
+ * Feature disable options\r
+ * These options are also useful to firmware size reduction.\r
+ */\r
+\r
+/* disable debug print */\r
+//#define NO_DEBUG\r
+\r
+/* disable print */\r
+//#define NO_PRINT\r
+\r
+/* disable action features */\r
+//#define NO_ACTION_LAYER\r
+//#define NO_ACTION_TAPPING\r
+//#define NO_ACTION_ONESHOT\r
+//#define NO_ACTION_MACRO\r
+//#define NO_ACTION_FUNCTION\r
+\r
+/*\r
+ * RGB Underglow\r
+ * These settings are for the F4 by default:\r
+ * \r
+ *\r
+ * #define ws2812_PORTREG PORTF\r
+ * #define ws2812_DDRREG DDRF\r
+ * #define ws2812_pin PF4\r
+ * #define RGBLED_NUM 14 // Number of LEDs\r
+ * #define RGBLIGHT_HUE_STEP 10\r
+ * #define RGBLIGHT_SAT_STEP 17\r
+ * #define RGBLIGHT_VAL_STEP 17\r
+ *\r
+ * The firmware supports 5 different light effects, and the color (hue, saturation, brightness) can be customized in most effects. \r
+ * To control the underglow, you need to modify your keymap file to assign those functions to some keys/key combinations. \r
+ * For details, please check this keymap. keyboard/planck/keymaps/yang/keymap.c\r
+*/\r
+\r
+/* Deprecated code below\r
+#define ws2812_PORTREG PORTF \r
+#define ws2812_DDRREG DDRF\r
+#define ws2812_pin PF4\r
+*/ \r
+#define RGB_DI_PIN F4\r
+#define RGBLIGHT_TIMER\r
+#define RGBLED_NUM 8 // Number of LEDs\r
+#define RGBLIGHT_HUE_STEP 8\r
+#define RGBLIGHT_SAT_STEP 8\r
+#define RGBLIGHT_VAL_STEP 8\r
+#endif\r
--- /dev/null
+#include "gh60.h"
+#include "action_layer.h"
+
+#define _BL 0
+#define _AL 1
+#define _FL 2
+#define _UL 3
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /*
+ * Base layer, pretty standard ANSI layout.
+ * ,-----------------------------------------------------------.
+ * |FN12| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |
+ * |-----------------------------------------------------------|
+ * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|
+ * |-----------------------------------------------------------|
+ * |Caps/Fn| A| S| D| F| G| H| J| K| L| ;| '|Return |
+ * |-----------------------------------------------------------|
+ * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |
+ * |-----------------------------------------------------------|
+ * |Ctrl|Gui |Alt | Space |Alt |Fn |Menu|Ctrl|
+ * `-----------------------------------------------------------'
+ */
+ [_BL] = KEYMAP(
+ FN12,1,2,3,4,5,6,7,8,9,0,MINS,EQL,BSPC, \
+ TAB,Q,W,E,R,T,Y,U,I,O,P,LBRC,RBRC,BSLS, \
+ FN2,A,S,D,F,G,H,J,K,L,SCLN,QUOT,NO,ENT, \
+ LSFT,NO,Z,X,C,V,B,N,M,COMM,DOT,SLSH,NO,RSFT, \
+ LCTL,LGUI,LALT, SPC, NO,RALT,FN0,APP, RCTL),
+
+ /*
+ * Locking arrow keys to WASD for when you need dedicated arrow keys
+ * ,-----------------------------------------------------------.
+ * | | | | | | | | | | | | | | |
+ * |-----------------------------------------------------------|
+ * | | |Up | | | | | | | | | | | |
+ * |-----------------------------------------------------------|
+ * | |Left|Down|Rght| | | | | | | | | |
+ * |-----------------------------------------------------------|
+ * | | | | | | | | | | | | |
+ * |-----------------------------------------------------------|
+ * | | | | | | | | |
+ * `-----------------------------------------------------------'
+ */
+ [_AL] = KEYMAP(
+ TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
+ TRNS,TRNS,UP,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
+ TRNS,LEFT,DOWN,RGHT,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
+ TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
+ TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS),
+
+
+ /*
+ * Primary function layer, mostly the same as the traditional Pok3r layout.
+ * ,-------------------------------------------------------------.
+ * |`~ | F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12|DEL |
+ * |-------------------------------------------------------------|
+ * | |_AL| | | | |Calc|PgUp|Up|PgDn|Ptscn|Srlck|Pause| |
+ * |-------------------------------------------------------------|
+ * | | | | | | |Home|Left|Down|Rght|Ins| | |
+ * |-------------------------------------------------------------|
+ * | |_UL| | | | | | | | | | |
+ * |-------------------------------------------------------------|
+ * | | | | | | | | |
+ * `-------------------------------------------------------------'
+ */
+ [_FL] = KEYMAP(
+ GRAVE,F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12, DELETE, \
+ TRNS,FN1,TRNS,TRNS,TRNS,TRNS,CALC,PGUP,UP,PGDN,PSCR,SLCK,PAUS,TRNS, \
+ TRNS,MUTE,_VOLDOWN,_VOLUP,TRNS,TRNS,HOME,LEFT,DOWN,RGHT,INS,TRNS,TRNS,TRNS, \
+ TRNS,TRNS,FN3,TRNS,TRNS,TRNS,TRNS,END,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
+ TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS),
+
+ /*
+ * Locking layer for controlling the underglow.
+ *
+ * ,-----------------------------------------------------------.
+ * | | | | | | | | | | | | | | |
+ * |-----------------------------------------------------------|
+ * | | | | | | | | | | | | | | |
+ * |-----------------------------------------------------------|
+ * | |On|Mode| | | | | | | | | | |
+ * |-----------------------------------------------------------|
+ * | | |Hue+|Hue-|Sat+|Sat-|Val+|Val-| | | | |
+ * |-----------------------------------------------------------|
+ * | | | | | | | | |
+ * `-----------------------------------------------------------'
+ */
+ [_UL] = KEYMAP(
+ TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
+ TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
+ TRNS,FN4,FN5,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
+ TRNS,TRNS,TRNS,FN6,FN7,FN8,FN9,FN10,FN11,TRNS,TRNS,TRNS,TRNS,TRNS, \
+ TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS),
+};
+
+enum function_id {
+ RGBLED_TOGGLE,
+ RGBLED_STEP_MODE,
+ RGBLED_INCREASE_HUE,
+ RGBLED_DECREASE_HUE,
+ RGBLED_INCREASE_SAT,
+ RGBLED_DECREASE_SAT,
+ RGBLED_INCREASE_VAL,
+ RGBLED_DECREASE_VAL,
+ SHIFT_ESC,
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+ [0] = ACTION_LAYER_MOMENTARY(2), // Momentary Fn overlay
+ [1] = ACTION_LAYER_TOGGLE(1), // Toggle Arrow Layer overlay
+ [2] = ACTION_LAYER_TAP_KEY(2, KC_CAPS), // Tap to toggle caps lock and hold to activate function layer
+ [3] = ACTION_LAYER_TOGGLE(3), // Toggle Underglow Layer overlay
+ [4] = ACTION_FUNCTION(RGBLED_TOGGLE), //Turn on/off underglow
+ [5] = ACTION_FUNCTION(RGBLED_STEP_MODE), // Change underglow mode
+ [6] = ACTION_FUNCTION(RGBLED_INCREASE_HUE),
+ [7] = ACTION_FUNCTION(RGBLED_DECREASE_HUE),
+ [8] = ACTION_FUNCTION(RGBLED_INCREASE_SAT),
+ [9] = ACTION_FUNCTION(RGBLED_DECREASE_SAT),
+ [10] = ACTION_FUNCTION(RGBLED_INCREASE_VAL),
+ [11] = ACTION_FUNCTION(RGBLED_DECREASE_VAL),
+ [12] = ACTION_FUNCTION(SHIFT_ESC),
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+ // MACRODOWN only works in this function
+ // This is some kind of macro code, haven't quite figured it out yet.
+ // Todo: Figure out macro coding here
+ switch(id) {
+ case 0:
+ if (record->event.pressed) {
+ register_code(KC_RSFT);
+ } else {
+ unregister_code(KC_RSFT);
+ }
+ break;
+ }
+ return MACRO_NONE;
+};
+
+void matrix_scan_user(void) {
+
+// Layer LED indicators
+// ESC led on when in function layer, WASD cluster leds enabled when on arrow cluster
+// Todo: Caps lock led on when caps lock is enabled
+ uint32_t layer = layer_state;
+ if (layer & (1<<1)) {
+ gh60_wasd_leds_on();
+ } else {
+ gh60_wasd_leds_off();
+ }
+
+ if (layer & (1<<2)) {
+ gh60_esc_led_on();
+ } else {
+ gh60_esc_led_off();
+ }
+};
+
+#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
+
+void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
+ switch (id) {
+ case RGBLED_TOGGLE:
+ //led operations
+ if (record->event.pressed) {
+ rgblight_toggle();
+ }
+ break;
+ case RGBLED_INCREASE_HUE:
+ if (record->event.pressed) {
+ rgblight_increase_hue();
+ }
+ break;
+ case RGBLED_DECREASE_HUE:
+ if (record->event.pressed) {
+ rgblight_decrease_hue();
+ }
+ break;
+ case RGBLED_INCREASE_SAT:
+ if (record->event.pressed) {
+ rgblight_increase_sat();
+ }
+ break;
+ case RGBLED_DECREASE_SAT:
+ if (record->event.pressed) {
+ rgblight_decrease_sat();
+ }
+ break;
+ case RGBLED_INCREASE_VAL:
+ if (record->event.pressed) {
+ rgblight_increase_val();
+ }
+ break;
+ case RGBLED_DECREASE_VAL:
+ if (record->event.pressed) {
+ rgblight_decrease_val();
+ }
+ break;
+ case RGBLED_STEP_MODE:
+ if (record->event.pressed) {
+ rgblight_step();
+ }
+ break;
+ static uint8_t shift_esc_shift_mask;
+ 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;
+ }
+};