]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Merge branch 'master' into don_left_leds
authorDon Armstrong <don@donarmstrong.com>
Mon, 9 Jul 2018 04:01:06 +0000 (21:01 -0700)
committerDon Armstrong <don@donarmstrong.com>
Mon, 9 Jul 2018 04:01:06 +0000 (21:01 -0700)
14 files changed:
1  2 
docs/feature_advanced_keycodes.md
keyboards/ckeys/nakey/rules.mk
keyboards/ergodox_ez/ergodox_ez.c
keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c
keyboards/handwired/woodpad/keymaps/drashna/rules.mk
keyboards/helix/rev1/keymaps/default/config.h
keyboards/kona_classic/keymaps/ansi/rules.mk
keyboards/orthodox/keymaps/drashna/config.h
keyboards/orthodox/keymaps/xyverz/config.h
keyboards/ps2avrGB/bmini_x2/keymaps/default/keymap.c
keyboards/ps2avrGB/matrix.c
keyboards/tada68/tada68.h
keyboards/xd75/keymaps/emilyh/config.h
quantum/quantum.c

diff --cc docs/feature_advanced_keycodes.md
index d49efdc1a121a6cf7522143dd943d975f1feee8e,a4b681ec1429270c8ff43e899a7b7c9e27010dcf..0000000000000000000000000000000000000000
deleted file mode 100644,100644
+++ /dev/null
@@@ -1,169 -1,205 +1,0 @@@
--# Advanced Keycodes
--
--Your keymap can include keycodes that are more advanced than normal, for example shifted keys. This page documents the functions that are available to you.
--
--### Assigning Custom Names
--
--People often define custom names using `#define`. For example:
--
--```c
--#define FN_CAPS LT(_FL, KC_CAPSLOCK)
--#define ALT_TAB LALT(KC_TAB)
--```
--
--This will allow you to use `FN_CAPS` and `ALT_TAB` in your `KEYMAP()`, keeping it more readable.
--
- ### Limits of these aliases
 -### Limits of These Aliases
--
- Currently, the keycodes able to used with these functions are limited to the [Basic Keycodes](keycodes_basic.html), meaning you can't use keycodes like `KC_TILD`, or anything greater than 0xFF. For a full list of the keycodes able to be used see [Basic Keycodes](keycodes_basic.html).
 -Currently, the keycodes able to used with these functions are limited to the [Basic Keycodes](keycodes_basic.md), meaning you can't use keycodes like `KC_TILD`, or anything greater than 0xFF. For a full list of the keycodes able to be used see [Basic Keycodes](keycodes_basic.md).
--
- # Switching and toggling layers
 -# Switching and Toggling Layers
--
- These functions allow you to activate layers in various ways.
 -These functions allow you to activate layers in various ways. Note that layers are not generally independent layouts -- multiple layers can be activated at once, and it's typical for layers to use `KC_TRNS` to allow keypresses to pass through to lower layers. For a detailed explanation of layers, see [Keymap Overview](keymap.md#keymap-and-layers)
--
- * `MO(layer)` - momentary switch to *layer*. As soon as you let go of the key, the layer is deactivated and you pop back out to the previous layer.
- * `LT(layer, kc)` - momentary switch to *layer* when held, and *kc* when tapped.
- * `TG(layer)` - toggles a layer on or off.
- * `TO(layer)` - Goes to a layer. This code is special, because it lets you go either up or down the stack -- just goes directly to the layer you want. So while other codes only let you go _up_ the stack (from layer 0 to layer 3, for example), `TO(2)` is going to get you to layer 2, no matter where you activate it from -- even if you're currently on layer 5. This gets activated on keydown (as soon as the key is pressed).
- * `TT(layer)` - Layer Tap-Toggle. If you hold the key down, the layer becomes active, and then deactivates when you let go. And if you tap it, the layer simply becomes active (toggles on). It needs 5 taps by default, but you can set it by defining `TAPPING_TOGGLE`, for example, `#define TAPPING_TOGGLE 2` for just two taps.
 -* `DF(layer)` - switches the default layer. The default layer is the always-active base layer that other layers stack on top of. See below for more about the default layer. This might be used to switch from QWERTY to Dvorak layout. (Note that this is a temporary switch that only persists until the keyboard loses power. To modify the default layer in a persistent way requires deeper customization, such as calling the `set_single_persistent_default_layer` function inside of [process_record_user](custom_quantum_functions.md#programming-the-behavior-of-any-keycode).)
 -* `MO(layer)` - momentarily activates *layer*. As soon as you let go of the key, the layer is deactivated. 
 -* `LM(layer, mod)` - Momentarily activates *layer* (like `MO`), but with modifier(s) *mod* active. Only supports layers 0-15 and the left modifiers.
 -* `LT(layer, kc)` - momentarily activates *layer* when held, and sends *kc* when tapped.
 -* `TG(layer)` - toggles *layer*, activating it if it's inactive and vice versa
 -* `TO(layer)` - activates *layer* and de-activates all other layers (except your default layer). This function is special, because instead of just adding/removing one layer to your active layer stack, it will completely replace your current active layers, uniquely allowing you to replace higher layers with a lower one. This is activated on keydown (as soon as the key is pressed).
 -* `TT(layer)` - Layer Tap-Toggle. If you hold the key down, *layer* is activated, and then is de-activated when you let go (like `MO`). If you repeatedly tap it, the layer will be toggled on or off (like `TG`). It needs 5 taps by default, but you can change this by defining `TAPPING_TOGGLE` -- for example, `#define TAPPING_TOGGLE 2` to toggle on just two taps.
--
- # Working With Layers
 -# Working with Layers
--
--Care must be taken when switching layers, it's possible to lock yourself into a layer with no way to deactivate that layer (without unplugging your keyboard.) We've created some guidelines to help users avoid the most common problems.
--
--### Beginners
--
--If you are just getting started with QMK you will want to keep everything simple. Follow these guidelines when setting up your layers:
--
- * Setup layer 0 as your "base" layer. This is your normal typing layer, and could be whatever layout you want (qwerty, dvorak, colemak, etc.)
 -* Setup layer 0 as your default, "base" layer. This is your normal typing layer, and could be whatever layout you want (qwerty, dvorak, colemak, etc.). It's important to set this as the lowest layer since it will typically have most or all of the keyboard's keys defined, so would block other layers from having any effect if it were above them (i.e., had a higher layer number). 
--* Arrange your layers in a "tree" layout, with layer 0 as the root. Do not try to enter the same layer from more than one other layer.
- * Never try to stack a higher numbered layer on top of a lower numbered layer. Doing so is tricky and error prone.
 -* In a layer's keymap, only reference higher-numbered layers. Because layers are processed from the highest-numbered (topmost) active layer down, modifying the state of lower layers can be tricky and error-prone.
--
--### Intermediate Users
--
- Sometimes you need more than one base layer. For example, if you want to switch between QWERTY and Dvorak, switch between layouts for different countries, or switch your layout for different videogames. Your base layers should always be the lowest numbered layers. When you have multiple base layers you should always treat them as mutually exclusive. When one base layer is on the others are off. 
 -Sometimes you need more than one base layer. For example, if you want to switch between QWERTY and Dvorak, switch between layouts for different countries, or switch your layout for different videogames. Your base layers should always be the lowest numbered layers. When you have multiple base layers you should always treat them as mutually exclusive. When one base layer is on the others are off.
--
--### Advanced Users
--
--Once you have a good feel for how layers work and what you can do, you can get more creative. The rules listed in the beginner section will help you be successful by avoiding some of the tricker details but they can be constraining, especially for ultra-compact keyboard users. Understanding how layers work will allow you to use them in more advanced ways.
--
--Layers stack on top of each other in numerical order. When determining what a keypress does, QMK scans the layers from the top down, stopping when it reaches the first active layer that is not set to `KC_TRNS`. As a result if you activate a layer that is numerically lower than your current layer, and your current layer (or another layer that is active and higher than your target layer) has something other than `KC_TRNS`, that is the key that will be sent, not the key on the layer you just activated. This is the cause of most people's "why doesn't my layer get switched" problem.
--
- Sometimes, you might want to switch between layers in a macro or as part of a tap dance routine. `layer_on` activates a layer, and `layer_off` deactivates it. More layer-related functions can be found in [action_layer.h](../tmk_core/common/action_layer.h).
 -Sometimes, you might want to switch between layers in a macro or as part of a tap dance routine. `layer_on` activates a layer, and `layer_off` deactivates it. More layer-related functions can be found in [action_layer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_layer.h).
--
- # Modifier keys
 -# Modifier Keys
--
--These functions allow you to combine a mod with a keycode. When pressed the keydown for the mod will be sent first, and then *kc* will be sent. When released the keyup for *kc* will be sent and then the mod will be sent.
--
--* `LSFT(kc)` or `S(kc)` - applies left Shift to *kc* (keycode)
--* `RSFT(kc)` - applies right Shift to *kc*
--* `LCTL(kc)` - applies left Control to *kc*
--* `RCTL(kc)` - applies right Control to *kc*
--* `LALT(kc)` - applies left Alt to *kc*
--* `RALT(kc)` - applies right Alt to *kc*
--* `LGUI(kc)` - applies left GUI (command/win) to *kc*
--* `RGUI(kc)` - applies right GUI (command/win) to *kc*
--* `HYPR(kc)` - applies Hyper (all modifiers) to *kc*
--* `MEH(kc)`  - applies Meh (all modifiers except Win/Cmd) to *kc*
--* `LCAG(kc)` - applies CtrlAltGui to *kc*
--
--You can also chain these, like this:
--
--    LALT(LCTL(KC_DEL)) -- this makes a key that sends Alt, Control, and Delete in a single keypress.
--
--# Shifted Keycodes
--
--The following shortcuts automatically add `LSFT()` to keycodes to get commonly used symbols.
--
- |Name|Description|
- |----|-----------|
- | KC_TILD | ~ |
- | KC_EXLM | ! |
- | KC_QUES | ? |
- | KC_AT | @ |
- | KC_HASH | # |
- | KC_DLR  | $ |
- | KC_PERC | % |
- | KC_CIRC | ^ |
- | KC_AMPR | & |
- | KC_ASTR | * |
- | KC_LPRN | ( |
- | KC_RPRN | ) |
- | KC_UNDS | _ |
- | KC_PLUS | + |
- | KC_DQUO | " |
- | KC_LCBR | { |
- | KC_RCBR | } |
- | KC_LABK | < |
- | KC_RABK | > |
- | KC_PIPE | &#x7C; |
- | KC_COLN | : |
 -|Key                     |Aliases           |Description        |
 -|------------------------|------------------|-------------------|
 -|`KC_TILDE`              |`KC_TILD`         |`~`                |
 -|`KC_EXCLAIM`            |`KC_EXLM`         |`!`                |
 -|`KC_AT`                 |                  |`@`                |
 -|`KC_HASH`               |                  |`#`                |
 -|`KC_DOLLAR`             |`KC_DLR`          |`$`                |
 -|`KC_PERCENT`            |`KC_PERC`         |`%`                |
 -|`KC_CIRCUMFLEX`         |`KC_CIRC`         |`^`                |
 -|`KC_AMPERSAND`          |`KC_AMPR`         |`&`                |
 -|`KC_ASTERISK`           |`KC_ASTR`         |`*`                |
 -|`KC_LEFT_PAREN`         |`KC_LPRN`         |`(`                |
 -|`KC_RIGHT_PAREN`        |`KC_RPRN`         |`)`                |
 -|`KC_UNDERSCORE`         |`KC_UNDS`         |`_`                |
 -|`KC_PLUS`               |                  |`+`                |
 -|`KC_LEFT_CURLY_BRACE`   |`KC_LCBR`         |`{`                |
 -|`KC_RIGHT_CURLY_BRACE`  |`KC_RCBR`         |`}`                |
 -|`KC_PIPE`               |                  |<code>&#124;</code>|
 -|`KC_COLON`              |`KC_COLN`         |`:`                |
 -|`KC_DOUBLE_QUOTE`       |`KC_DQT`/`KC_DQUO`|`"`                |
 -|`KC_LEFT_ANGLE_BRACKET` |`KC_LT`/`KC_LABK` |`<`                |
 -|`KC_RIGHT_ANGLE_BRACKET`|`KC_GT`/`KC_RABK` |`>`                |
 -|`KC_QUESTION`           |`KC_QUES`         |`?`                |
--
--# Mod Tap
--
--`MT(mod, kc)` - is *mod* (modifier key - MOD_LCTL, MOD_LSFT) when held, and *kc* when tapped. In other words, you can have a key that sends Esc (or the letter O or whatever) when you tap it, but works as a Control key or a Shift key when you hold it down.
--
--These are the values you can use for the `mod` in `MT()` and `OSM()`:
--
--  * MOD_LCTL
--  * MOD_LSFT
--  * MOD_LALT
--  * MOD_LGUI
--  * MOD_RCTL
--  * MOD_RSFT
--  * MOD_RALT
--  * MOD_RGUI
--  * MOD_HYPR
--  * MOD_MEH
--
- These can also be combined like `MOD_LCTL | MOD_LSFT` e.g. `MT(MOD_LCTL | MOD_LSFT, KC_ESC)` which would activate Control and Shift when held, and send Escape when tapped. Note however, that you cannot mix right and left side modifiers.
 -These can also be combined like `MOD_LCTL | MOD_LSFT` e.g. `MT(MOD_LCTL | MOD_LSFT, KC_ESC)` which would activate Control and Shift when held, and send Escape when tapped.
--
--We've added shortcuts to make common modifier/tap (mod-tap) mappings more compact:
--
--  * `CTL_T(kc)` - is LCTL when held and *kc* when tapped
--  * `SFT_T(kc)` - is LSFT when held and *kc* when tapped
--  * `ALT_T(kc)` - is LALT when held and *kc* when tapped
--  * `ALGR_T(kc)` - is AltGr when held and *kc* when tapped
--  * `GUI_T(kc)` - is LGUI when held and *kc* when tapped
--  * `ALL_T(kc)` - is Hyper (all mods) when held and *kc* when tapped. To read more about what you can do with a Hyper key, see [this blog post by Brett Terpstra](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)
--  * `LCAG_T(kc)` - is CtrlAltGui when held and *kc* when tapped
--  * `MEH_T(kc)` - is like Hyper, but not as cool -- does not include the Cmd/Win key, so just sends Alt+Ctrl+Shift.
 -
 -?> Due to the way that keycodes are structured, any modifiers specified as part of `kc`, such as `LCTL()` or `KC_LPRN`, will only activate when held instead of tapped.
 -
 -?> Additionally, if there is at least one right modifier, any other modifiers will turn into their right equivalents, so it is not possible to "mix and match" the two.
--
--# One Shot Keys
--
- One shot keys are keys that remain active until the next key is pressed, and then are releasd. This allows you to type keyboard combinations without pressing more than one key at a time.
 -One shot keys are keys that remain active until the next key is pressed, and then are released. This allows you to type keyboard combinations without pressing more than one key at a time. These keys are usually called "Sticky keys" or "Dead keys".
--
--For example, if you define a key as `OSM(MOD_LSFT)`, you can type a capital A character by first pressing and releasing shift, and then pressing and releasing A. Your computer will see the shift key being held the moment shift is pressed, and it will see the shift key being released immediately after A is released.
--
--One shot keys also work as normal modifiers. If you hold down a one shot key and type other keys, your one shot will be released immediately after you let go of the key.
--
--You can control the behavior of one shot keys by defining these in `config.h`:
--
--```c
--#define ONESHOT_TAP_TOGGLE 5  /* Tapping this number of times holds the key until tapped this number of times again. */
--#define ONESHOT_TIMEOUT 5000  /* Time (in ms) before the one shot key is released */
--```
--
--* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](#mod-tap), not the `KC_*` codes.
--* `OSL(layer)` - momentary switch to *layer*.
--
- Sometimes, you want to activate a one-shot layer as part of a macro or tap dance routine. To do this, you need to call `set_oneshot_layer(LAYER, ONESHOT_START)` on key down, and `set_oneshot_layer(ONESHOT_PRESSED)` on key up. If you want to cancel the oneshot, call `reset_oneshot_layer()`. For more complicated actions, take a look at the oneshot implementation in [`process_record`](../tmk_core/common/action.c#L429).
 -Sometimes, you want to activate a one-shot layer as part of a macro or tap dance routine. To do this, you need to call `set_oneshot_layer(LAYER, ONESHOT_START)` on key down, and `set_oneshot_layer(ONESHOT_PRESSED)` on key up. If you want to cancel the oneshot, call `reset_oneshot_layer()`. For more complicated actions, take a look at the oneshot implementation in [`process_record`](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action.c#L429).
--
- ## Permissive Hold
 -If you're having issues with OSM translating over Remote Desktop Connection, this can be fixed by opening the settings, going to the "Local Resources" tap, and in the keyboard section, change the drop down to "On this Computer".  This will fix the issue and allow OSM to function properly over Remote Desktop.
 -
 -# Permissive Hold
--
--As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new `config.h` option:
--
--```
--#define PERMISSIVE_HOLD
--```
--
--This makes it easier for fast typists to use dual-function keys. Without this, if you let go of a held key inside the tapping term, it won't register.
--
--Example: (Tapping Term = 200ms)
--
--- SHFT_T(KC_A) Down
--- KC_X Down
--- KC_X Up
--- SHFT_T(KC_A) Up
--
--With defaults, if above is typed within tapping term, this will emit `ax`. With permissive hold, if above is typed within tapping term, this will emit `X` (so, Shift+X).
 -
 -# Mod tap interrupt
 -
 -When a dual role key used for a modifier is quickly followed by another keys, it is interpreted as held even before the tapping term elapsed.  This is a problem if a key is used for example inside a rolling combo because the second key will be pressed before the first key is released.
 -
 -For example, when trying to type the rolling combo "zx" and z being configured to send Ctrl when hold, z rapidly followed by x actually sends Ctrl-x. That's bad.
 -
 -You can disable this behavior by defining `IGNORE_MOD_TAP_INTERRUPT` in `config.h`.
 -
 -Note that this only concerns modifiers and not layer switching keys.
 -
 -# Hold after tap
 -
 -When the user holds a key after tap, this repeats the tapped key rather to hold a modifier key.  This allows to use auto repeat for the tapped key.  If you prefer to hold a modifier instead, define `TAPPING_FORCE_HOLD` in `config.h`.
 -
 -Example:
 -
 -- SHFT_T(KC_A) Down
 -- SHFT_T(KC_A) Up
 -- SHFT_T(KC_A) Down
 -- wait more than tapping term...
 -- SHFT_T(KC_A) Up
 -
 -With default settings, `a` will be sent on the first release, then `a` will be sent on the second press allowing the computer to trigger its auto repeat function.
 -
 -With `TAPPING_FORCE_HOLD`, the second press will be interpreted as a Shift, allowing to use it as a modifier shortly after having used it as a tap.
 -
 -!> `TAPPING_FORCE_HOLD` will break anything that uses tapping toggles (Such as the `TT` layer keycode, and the One Shot Tapping Toggle).
index 0000000000000000000000000000000000000000,a3571e8deb0eb7d2a57d25af7f99ffbb5205f535..45eb6ee3766f0540cc0a68165f6f59c31c5b274e
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,68 +1,68 @@@
 -OPT_DEFS += -DBOOTLOADER_SIZE=512
+ # MCU name
+ #MCU = at90usb1286
+ 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
 -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 ?= yes        # Console for debug(+400)
 -COMMAND_ENABLE ?= yes        # Commands for debug and configuration
++OPT_DEFS += -DBOOTLOADER_SIZE=4096
+ # Build Options
+ #   change yes to no to disable
+ #
 -SLEEP_LED_ENABLE ?= no       # Breathing sleep LED during USB suspend
++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 = 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
 -NKRO_ENABLE ?= no            # USB Nkey Rollover
 -BACKLIGHT_ENABLE ?= no       # 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
++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 = no       # 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
index 8ada551aea1d7df0daa8bb9a299193790e7a5303,61f910711ac0f26582cbea2ed040d5c985af22f5..24f94f6f2e371a36b6872eaf07277be569450424
@@@ -134,14 -134,14 +134,18 @@@ uint8_t init_mcp23018(void) 
      // - unused  : on  : 1
      // - input   : on  : 1
      // - driving : off : 0
-     mcp23018_status = i2c_start(I2C_ADDR_WRITE);    if (mcp23018_status) goto out;
-     mcp23018_status = i2c_write(GPPUA);             if (mcp23018_status) goto out;
-     mcp23018_status = i2c_write(0b00000000);        if (mcp23018_status) goto out;
-     mcp23018_status = i2c_write(0b00111111);        if (mcp23018_status) goto out;
+     mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT);    if (mcp23018_status) goto out;
+     mcp23018_status = i2c_write(GPPUA, ERGODOX_EZ_I2C_TIMEOUT);             if (mcp23018_status) goto out;
+     mcp23018_status = i2c_write(0b00000000, ERGODOX_EZ_I2C_TIMEOUT);        if (mcp23018_status) goto out;
+     mcp23018_status = i2c_write(0b00111111, ERGODOX_EZ_I2C_TIMEOUT);        if (mcp23018_status) goto out;
  
  out:
-     i2c_stop();
+     i2c_stop(ERGODOX_EZ_I2C_TIMEOUT);
++#ifdef LEFT_LEDS
++    if (!mcp23018_status) mcp23018_status = ergodox_left_leds_update();
++#endif // LEFT_LEDS
 +
  #ifdef LEFT_LEDS
      if (!mcp23018_status) mcp23018_status = ergodox_left_leds_update();
  #endif // LEFT_LEDS
index c79f1612322cab1067673d3e2d850101731d1eda,088449e2fefc45defc188d7e502230908c3c3cad..8cdef783592f46e875cafa053453e687e3a2dab9
@@@ -63,97 -85,142 +85,149 @@@ enum custom_keycodes 
  #define SCREEN_8 20
  #define SCREEN_9 21
  #define SCREEN_DETACH 22
- #define SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND 30
+ #define SCREEN_UP_JUMP 23
+ #define SCREEN_DOWN_JUMP 24
+ #define SCREEN_READREG_1 25
+ #define SCREEN_READREG_2 26
+ #define SCREEN_READREG_3 27
+ #define SCREEN_PASTEREG_1 28
+ #define SCREEN_PASTEREG_2 29
+ #define SCREEN_PASTEREG_3 30
+ #define SHELL_WRITE_LOGPATTERN 31
+ #define SHELL_WRITE_TRANPATTERN 32
+ #define SHELL_EXPAND_PATTERN 33
  
  
+ #define MACRO_SCREEN_NUM(MACRO_NAME,NUM) \
+         case MACRO_NAME:\
+              if (record->event.pressed) {\
+                 return MACRO( D(LCTL), T(A), U(LCTL), T(NUM), END);\
+             }\
+         break;\
+ #define MACRO_SCREEN_REG(MACRO_NAME,NUM) \
+         case MACRO_NAME:\
+              if (record->event.pressed) {\
+                 return MACRO( D(LCTL), T(A), U(LCTL), D(LSFT), T(SCOLON), U(LSFT),\
+                               T(R),\
+                               T(E),\
+                               T(A),\
+                               T(D),\
+                               T(R),\
+                               T(E),\
+                                                         T(G),\
+                               T(SPC),\
+                                                         T(NUM),\
+                                                         T(ENTER),\
+                              END);\
+             }\
+         break;\
+ #define MACRO_SCREEN_PASTE(MACRO_NAME,NUM)\
+         case MACRO_NAME:\
+              if (record->event.pressed) {\
+                 return MACRO( D(LCTL), T(A), U(LCTL), D(LSFT), T(SCOLON), U(LSFT),\
+                               T(P),\
+                               T(A),\
+                               T(S),\
+                               T(T),\
+                               T(E),\
+                               T(SPC),\
+                                                         T(NUM),\
+                                                         T(ENTER),\
+                              END);\
+             }\
+         break;\
 +#define MACRO_SCREEN_NUM(MACRO_NAME,NUM) \
 +        case MACRO_NAME:\
 +             if (record->event.pressed) {\
 +                return MACRO( D(LCTL), T(A), U(LCTL), T(NUM), END);\
 +            }\
 +        break;\
 +
  const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  
-   [BASE] = KEYMAP(
-         // left hand
-         KC_ESC,            KC_F1,         KC_F2,      KC_F3,        KC_F4,   KC_F5,   KC_F6,
-         KC_TAB,            KC_QUOTE,      KC_COMMA,   KC_DOT,       KC_P,    KC_Y,    MEH(KC_2),
-         OSL(SHELL_NAV),    KC_A,          KC_O,       KC_E,         KC_U,    KC_I,
-         OSL(SHELL_SCREEN), KC_SCOLON,     KC_Q,       KC_J,         KC_K,    KC_X,    MEH(KC_3),
-         MEH(KC_1),         OSM(MOD_LSFT), OSM(MOD_LCTL), M(MOUSE_TOGGLE), MO(KEYSEL),
-         
-         // left thumb cluster
-                   MEH(KC_4),      MEH(KC_5),
-                                   MEH(KC_6),
-         MO(COMBINED),MO(KEYNAV),  OSM(MOD_LALT),
-         
-         // right hand
-         KC_F7,     KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MEH(KC_9),
-         MEH(KC_7), KC_F,  KC_G,  KC_C,   KC_R,   KC_L,   MEH(KC_F1),
-                            KC_D,  KC_H,  KC_T,   KC_N,   KC_S,   MEH(KC_F2),
-         MEH(KC_8), KC_B,  KC_M,  KC_W,   KC_V,   KC_Z,   MEH(KC_F3),
-         KC_BSPC,   RCTL(KC_BSPC), KC_CAPSLOCK, OSM(MOD_LSFT),MEH(KC_F4),
-     
-         // right thumb cluster
-         MEH(KC_F5),MEH(KC_F6),MEH(KC_F7),MEH(KC_F8),KC_ENTER,KC_SPACE
-   
+   [BASE] = LAYOUT_ergodox(
+       // left hand
+       KC_ESC,            KC_F1,         KC_F2,      KC_F3,        KC_F4,   KC_F5,   KC_F6,
+       OSL(SCREEN_NAV),   KC_QUOTE,      KC_COMMA,   KC_DOT,       KC_P,    KC_Y,    MEH(KC_2),
+       OSL(SHELL_NAV),    KC_A,          KC_O,       KC_E,         KC_U,    KC_I,
+       OSL(SHELL_SCREEN), KC_SCOLON,     KC_Q,       KC_J,         KC_K,    KC_X,    MEH(KC_3),
+       MEH(KC_1),         OSM(MOD_LSFT), OSM(MOD_LCTL), MO(KEYSEL), MO(BROWSER_CONTROL),
+       // left thumb cluster
+                 MEH(KC_4),      MEH(KC_5),
+                                 MEH(KC_6),
+       MO(COMBINED),MO(KEYNAV),  OSM(MOD_LALT),
+       // right hand
+       KC_F7,     KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MEH(KC_9),
+       MEH(KC_7), KC_F,  KC_G,  KC_C,   KC_R,   KC_L,   KC_TAB,
+                  KC_D,  KC_H,  KC_T,   KC_N,   KC_S,   RCTL(KC_BSPC),
+       MEH(KC_8), KC_B,  KC_M,  KC_W,   KC_V,   KC_Z,   MEH(KC_F3),
+       KC_BSPC,   RCTL(KC_BSPC), KC_CAPSLOCK, OSM(MOD_LSFT),MEH(KC_F4),
+       // right thumb cluster
+       MEH(KC_F5),MEH(KC_F6),MEH(KC_F7),MEH(KC_F8),KC_ENTER,KC_SPACE
    ),
-   
-   [KEYNAV] = KEYMAP(
-       // left hand
-       KC_TRNS,KC_TRNS,     KC_TRNS,     KC_TRNS,      KC_TRNS,    KC_TRNS,     KC_TRNS,
-       KC_TRNS,KC_ESC,      MEH(KC_F9),  RCTL(KC_Z),   RCTL(KC_S), MEH(KC_F10), KC_TRNS,
-       KC_TRNS,MEH(KC_F11), MEH(KC_F12), RSFT(KC_TAB), KC_TAB,     MEH(KC_A),
-       KC_TRNS,MEH(KC_B),   MEH(KC_C),   MEH(KC_D),    MEH(KC_E),  MEH(KC_F),   KC_TRNS,
-       KC_TRNS,KC_TRNS,     KC_TRNS,     KC_TRNS,      KC_TRNS,
-       // left thumb cluster
-       KC_TRNS,KC_TRNS,KC_TRNS,TO(MOUSE),KC_TRNS,KC_TRNS,
-       
-       // right hand
-       KC_TRNS,KC_TRNS,       KC_TRNS,    KC_TRNS,         KC_TRNS,    KC_TRNS,         MEH(KC_G),
-       KC_TRNS,KC_NO,         KC_HOME,    KC_UP,           KC_END,     KC_PGUP,         MEH(KC_H),
-               LCTL(KC_LEFT), KC_LEFT,    KC_DOWN,         KC_RIGHT,   LCTL(KC_RIGHT),  MEH(KC_I),
-       KC_TRNS,KC_NO,         RCTL(KC_C), RCTL(KC_X),      RCTL(KC_V), KC_PGDOWN,       MEH(KC_J),
-                              KC_BSPC,   RCTL(KC_BSPC),    KC_DELETE,  LCTL(KC_DELETE), MEH(KC_K),
-       
-       // right thumb cluster
-       KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS
-   ),  
-   
-       // key selection layer
-       [KEYSEL] = KEYMAP(
-                  // left hand
-                  KC_TRNS,KC_TRNS,   KC_TRNS,  KC_TRNS,   KC_TRNS,   KC_TRNS,   KC_TRNS,
-                  KC_TRNS,MEH(KC_G), MEH(KC_H),MEH(KC_I), MEH(KC_J), MEH(KC_K), KC_TRNS,
-                  KC_TRNS,MEH(KC_L), MEH(KC_M),MEH(KC_N), MEH(KC_O), MEH(KC_P),
-                  KC_TRNS,MEH(KC_Q), MEH(KC_R),MEH(KC_S), MEH(KC_T), MEH(KC_U), KC_TRNS,
-                                  // bottom row
-                                  KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
-                                                                                  // thumb cluster
-                                                                                  KC_TRNS,KC_TRNS,
-                                                                                                  KC_TRNS,
-                                                                  KC_TRNS,KC_TRNS,KC_TRNS,
-                  // right hand
-                  KC_TRNS,       KC_TRNS,             KC_TRNS,       KC_TRNS,       KC_TRNS,        KC_TRNS,              MEH(KC_Q),
-                  RSFT(KC_PGUP), KC_TRNS,             RSFT(KC_HOME), RSFT(KC_UP),   RSFT(KC_END),   RSFT(KC_PGUP),        MEH(KC_R),
-                                                 RSFT(RCTL(KC_LEFT)), RSFT(KC_LEFT), RSFT(KC_DOWN), RSFT(KC_RIGHT), RSFT(RCTL(KC_RIGHT)), MEH(KC_S),
-                  RSFT(KC_PGDN), KC_TRNS,             RCTL(KC_C),    RCTL(KC_X),    RCTL(KC_V),     RSFT(KC_PGDN),        MEH(KC_T),
-                                       // bottom row
-                                       KC_BSPC,   RCTL(KC_BSPC),    KC_DELETE,  LCTL(KC_DELETE),                                      MEH(KC_U),
-                  // thumb cluster
-                  KC_TRNS, KC_TRNS,
-                  KC_TRNS,
-                  KC_TRNS, KC_TRNS, KC_TRNS
-       ),  
-   
+   [KEYNAV] = LAYOUT_ergodox(
+     // left hand
+     KC_TRNS,KC_TRNS,     KC_TRNS,            KC_TRNS,         KC_TRNS,          KC_TRNS,          KC_TRNS,
+     KC_TRNS,KC_ESC,      CLOUD9_GOTO_LINE,   RCTL(KC_Z),      RCTL(KC_S),       MEH(KC_F10),      KC_TRNS,
+     KC_TRNS,KC_LSFT,     CLOUD9_GOTO_SYMBOL, RSFT(KC_TAB),    KC_TAB,           MEH(KC_A),
+     KC_TRNS,MEH(KC_B),   CLOUD9_NAVIGATE,    CLOUD9_TAB_LEFT, CLOUD9_TAB_RIGHT, CLOUD9_TAB_CLOSE, KC_TRNS,
+     KC_TRNS,KC_TRNS,     KC_TRNS,            KC_TRNS,         KC_TRNS,
+     // left thumb cluster
+     KC_TRNS,KC_TRNS,KC_TRNS,TO(MOUSE),KC_TRNS,KC_TRNS,
+     // right hand
+     KC_TRNS,KC_TRNS,       KC_TRNS,    KC_TRNS,         KC_TRNS,    KC_TRNS,         MEH(KC_G),
+     KC_TRNS,KC_NO,         KC_HOME,    KC_UP,           KC_END,     KC_PGUP,         MEH(KC_H),
+             LCTL(KC_LEFT), KC_LEFT,    KC_DOWN,         KC_RIGHT,   LCTL(KC_RIGHT),  MEH(KC_I),
+     KC_TRNS,KC_NO,         RCTL(KC_C), RCTL(KC_X),      RCTL(KC_V), KC_PGDOWN,       MEH(KC_J),
+                            KC_BSPC,   RCTL(KC_BSPC),    KC_DELETE,  LCTL(KC_DELETE), MEH(KC_K),
+     // right thumb cluster
+     KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS
+   ),
+     // key selection layer
+     [KEYSEL] = LAYOUT_ergodox(
+            // left hand
+            KC_TRNS,KC_TRNS,   KC_TRNS,  KC_TRNS,   KC_TRNS,   KC_TRNS,   KC_TRNS,
+            KC_TRNS,MEH(KC_G), MEH(KC_H),MEH(KC_I), MEH(KC_J), MEH(KC_K), KC_TRNS,
+            KC_TRNS,MEH(KC_L), MEH(KC_M),MEH(KC_N), MEH(KC_O), MEH(KC_P),
+            KC_TRNS,MEH(KC_Q), MEH(KC_R),MEH(KC_S), MEH(KC_T), MEH(KC_U), KC_TRNS,
+                    // bottom row
+                    RESET,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
+                                            // thumb cluster
+                                            KC_TRNS,KC_TRNS,
+                                                    KC_TRNS,
+                                    KC_TRNS,KC_TRNS,KC_TRNS,
+            // right hand
+            KC_TRNS,       KC_TRNS,             KC_TRNS,       KC_TRNS,       KC_TRNS,        KC_TRNS,              MEH(KC_Q),
+            RSFT(KC_PGUP), KC_TRNS,             RSFT(KC_HOME), RSFT(KC_UP),   RSFT(KC_END),   RSFT(KC_PGUP),        MEH(KC_R),
+                           RSFT(RCTL(KC_LEFT)), RSFT(KC_LEFT), RSFT(KC_DOWN), RSFT(KC_RIGHT), RSFT(RCTL(KC_RIGHT)), MEH(KC_S),
+            RSFT(KC_PGDN), KC_TRNS,             RCTL(KC_C),    RCTL(KC_X),    RCTL(KC_V),     RSFT(KC_PGDN),        MEH(KC_T),
+                     // bottom row
+                     KC_BSPC,   RCTL(KC_BSPC),    KC_DELETE,  LCTL(KC_DELETE),                                      MEH(KC_U),
+            // thumb cluster
+            KC_TRNS, KC_TRNS,
+            KC_TRNS,
+            KC_TRNS, KC_TRNS, KC_TRNS
+     ),
    // shell navigation layer
-   [SHELL_NAV] = KEYMAP(
+   [SHELL_NAV] = LAYOUT_ergodox(
         // left hand
-        KC_TRNS,KC_TRNS,           KC_TRNS,        KC_TRNS,          KC_TRNS,     KC_TRNS,    KC_TRNS,
-        KC_TRNS,KC_TRNS,           SHELL_PGREP,    SHELL_PLESS,      SHELL_LESS,  SHELL_MKE,  SHELL_H3,
-        KC_TRNS,LCTL(KC_A),        SHELL_CDPRE,    SHELL_LSLTR,      SHELL_LS,    SHELL_PWD,
-        KC_TRNS,SHELL_SCREEN_LIST, SHELL_SCREENRD, SHELL_SCREEN_NEW, SHELL_TAILF, KC_TRNS,    SHELL_AMMCOLO,
+        KC_NO,  KC_TRNS,           KC_TRNS,        KC_TRNS,          KC_TRNS,     KC_TRNS,         KC_TRNS,
+        KC_TRNS,KC_TRNS,           SHELL_PGREP,    SHELL_PLESS,      SHELL_LESS,  KC_TRNS,         SHELL_H3,
+        KC_TRNS,SHELL_MKE,         SHELL_CDPRE,    SHELL_LSLTR,      SHELL_LS,    SHELL_LSLA,
+        KC_TRNS,SHELL_SCREEN_LIST, SHELL_SCREENRD, SHELL_SCREEN_NEW, SHELL_TAILF, SHELL_HTCSTATUS, SHELL_AMMCOLO,
                 // bottom row
                 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
                                         // thumb cluster
index b6c5ed3bd5971b6f49e06e6bb18954f6d4f27119,ed7d2e7c6d4ae4e8e10ea1bc08678284be57897f..92e0244f0a9f43a9d60464de9f282c950a75189d
@@@ -4,9 -3,11 +3,13 @@@ COMMAND_ENABLE    = no  # Commands for 
  RGBLIGHT_ENABLE   = yes
  MIDI_ENABLE       = no
  CONSOLE_ENABLE    = no
+ NKRO_ENABLE       = yes
+ MOUSEKEY_ENABLE   = no
+ EXTRAFLAGS        = -flto
  
 +EXTRAFLAGS        = -flto
 +
  ifndef QUANTUM_DIR
        include ../../../../Makefile
  endif
index 0000000000000000000000000000000000000000,7f33a43630aaf7d722fca4a09939869b4a01d23e..5a6261c4f7cf5ce0b43a63c978c7c2805357a3a8
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,37 +1,37 @@@
 -// #define _MASTER_RIGHT
+ /*
+ This is the c configuration file for the keymap
+ Copyright 2012 Jun Wako <wakojun@gmail.com>
+ Copyright 2015 Jack Humbert
+ 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"
+ /* Use I2C or Serial, not both */
+ #define USE_SERIAL
+ // #define USE_I2C
+ /* Select hand configuration */
+ #define MASTER_LEFT
 -#endif
++// #define MASTER_RIGHT
+ // #define EE_HANDS
++#endif
diff --cc keyboards/kona_classic/keymaps/ansi/rules.mk
index 38c23a1b897a4f98365e4391a6eea2215f857147,38c23a1b897a4f98365e4391a6eea2215f857147..0000000000000000000000000000000000000000
deleted file mode 100644,100644
+++ /dev/null
@@@ -1,37 -1,37 +1,0 @@@
--# Copyright 2013 Jun Wako <wakojun@gmail.com>
--#
--# 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 = yes      # 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 = yes       # 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
index fc483b08e63cfdc59372b2d87be136c69bddb5e7,8c283e7ca4e24ee3c3230d7c30ccaf8326fee335..d79f0f3035adc4fe1546aef9e34302d4998a8ec7
@@@ -35,11 -35,7 +35,16 @@@ along with this program.  If not, see <
  // #define MASTER_RIGHT
  #define EE_HANDS
  
- #ifndef TAPPING_TERM
- #define TAPPING_TERM 200
++/* key combination for command */
++#ifdef IS_COMMAND
++#undef IS_COMMAND
 +#endif
++#define IS_COMMAND() ( \
++    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT)) \
++)
 +
 +
  /* key combination for command */
  #ifdef IS_COMMAND
  #undef IS_COMMAND
index 0000000000000000000000000000000000000000,fc6d5d23b5a29f671096bb118c1d14a325fccbfc..7975a6fc9aa61fa62d329957063671672f4e6b3c
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,38 +1,38 @@@
 -// #define _MASTER_RIGHT
+ /*
+ This is the c configuration file for the keymap
+ Copyright 2012 Jun Wako <wakojun@gmail.com>
+ Copyright 2015 Jack Humbert
+ Copyright 2017 Art Ortenburger
+ 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"
+ /* Use I2C or Serial, not both */
+ #define USE_SERIAL
+ // #define USE_I2C
+ /* Select hand configuration */
+ #define MASTER_LEFT
++// #define MASTER_RIGHT
+ // #define EE_HANDS
+ #endif
index 325ec3665dea685ae746294c5e38bd3233041ee2,0000000000000000000000000000000000000000..5c52e1d9b687ddaa781d82ef5f34f7016323b774
mode 100644,000000..100644
--- /dev/null
@@@ -1,37 -1,0 +1,37 @@@
- #include "bmini_x2.h"
 +/*
 +Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
 +
 +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 "bmini.h"
 +
 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 +    [0] = KEYMAP(
 +        KC_ESC, 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_PSCR,KC_HOME,KC_END,
 +        KC_GRV, 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_DEL,
 +        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_INS,
 +        MO(0), 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_PGUP,
 +        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_UP,  KC_PGDN,
 +        KC_LCTL,KC_LALT,KC_LGUI,                KC_SPC,                                 KC_RGUI,KC_RALT,KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT
 +    ),
 +    [1] = KEYMAP(
 +        KC_TRNS,RGB_TOG,RGB_MOD,RGB_HUI,RGB_SAI,RGB_VAI,RGB_HUD,RGB_SAD,RGB_VAD,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_END,
 +        KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,        KC_DEL,
 +        KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,        KC_INS,
 +        KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,                KC_TRNS,
 +        KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,                KC_TRNS,KC_TRNS,
 +        KC_TRNS,KC_TRNS,KC_TRNS,                KC_TRNS,                                KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_RGHT
 +    ),
 +};
Simple merge
index bb41865ba0fa10f84fcc2ce6650595a11e2a5e92,fc1bea98bfd729aac0f30822770ec63bedde449f..ae9d3ea56606ba8b510f1e0b5dc1b60ffa7af683
  // The first section contains all of the arguments
  // The second converts the arguments into a two-dimensional array
  
- #define KEYMAP_ANSI( \
+ #define LAYOUT_ansi( \
      k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \
-       k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \
-       k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b,      k2d, k2e, \
-       k30,      k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \
-       k40, k41, k42,           k45,                k49, k4a, k4b, k4c, k4d, k4e  \
+     k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \
+     k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b,      k2d, k2e, \
+     k30,      k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \
+     k40, k41, k42,           k45,                k49, k4a, k4b, k4c, k4d, k4e  \
  ) \
  { \
-       {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \
-       {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e}, \
-       {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, k2e}, \
-       {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \
-       {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4a, k4b, k4c, k4d, k4e}  \
+     {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \
+     {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e}, \
+     {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, k2e}, \
+     {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \
+     {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4a, k4b, k4c, k4d, k4e}  \
+ }
+ /* TADA68 ISO layout
+    * ,----------------------------------------------------------------.
+    * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d    | 0e |
+    * |----------------------------------------------------------------|
+    * | 10  | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c|     | 1e |
+    * |------------------------------------------------------.    -----|
+    * | 20   | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2c|  2d| 2e |
+    * |----------------------------------------------------------------|
+    * | 30 | 31| 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b|    3c| 3d| 3e |
+    * |----------------------------------------------------------------|
+    * | 40 | 41 | 42 |        45             | 49| 4a|  4b| 4c| 4d| 4e |
+    * `----------------------------------------------------------------'
+  */
+ // The first section contains all of the arguments
+ // The second converts the arguments into a two-dimensional array
+ #define LAYOUT_iso( \
+     k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \
+     k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c,      k1e, \
+     k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \
+     k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \
+     k40, k41, k42,           k45,                k49, k4a, k4b, k4c, k4d, k4e  \
+ ) \
+ { \
+     {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \
+     {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, XXX, k1e}, \
+     {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e}, \
+     {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \
+     {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4a, k4b, k4c, k4d, k4e}  \
+ }
+ /* TADA68 ANSI layout with Split Enter key
+    * ,----------------------------------------------------------------.
+    * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d    | 0e |
+    * |----------------------------------------------------------------|
+    * | 10  | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c|  1d | 1e |
+    * |----------------------------------------------------------------|
+    * | 20   | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2c|  2d| 2e |
+    * |----------------------------------------------------------------|
+    * | 30     | 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b|    3c| 3d| 3e |
+    * |----------------------------------------------------------------|
+    * | 40 | 41 | 42 |        45              | 49| 4a| 4b| 4c| 4d| 4e |
+    * `----------------------------------------------------------------'
+  */
+ // The first section contains all of the arguments
+ // The second converts the arguments into a two-dimensional array
+ #define LAYOUT_ansi_split_enter( \
+     k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \
+     k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \
+     k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \
+     k30,      k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \
+     k40, k41, k42,           k45,                k49, k4a, k4b, k4c, k4d, k4e  \
+ ) \
+ { \
+     {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \
+     {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e}, \
+     {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e}, \
+     {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \
+     {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4a, k4b, k4c, k4d, k4e}  \
  }
  
 +/* TADA68 ISO layout
 +   * ,----------------------------------------------------------------.
 +   * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d    | 0e |
 +   * |----------------------------------------------------------------|
 +   * | 10  | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c|  1d | 1e |
 +   * |----------------------------------------------------------------|
 +   * | 20    | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2c| 2d| 2e |
 +   * |----------------------------------------------------------------|
 +   * | 30     | 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b|    3c| 3d| 3e |
 +   * |----------------------------------------------------------------|
 +   * | 40 | 41 | 42 |        45             | 49| 4a|  4b| 4c| 4d| 4e |
 +   * `----------------------------------------------------------------'
 + */
 +// The first section contains all of the arguments
 +// The second converts the arguments into a two-dimensional array
 +
 +#define KEYMAP_ISO( \
 +    k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \
 +      k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \
 +      k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \
 +      k30,      k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \
 +      k40, k41, k42,           k45,                k49, k4a, k4b, k4c, k4d, k4e  \
 +) \
 +{ \
 +      {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \
 +      {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e}, \
 +      {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e}, \
 +      {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \
 +      {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4a, k4b, k4c, k4d, k4e}  \
 +}
 +
  void matrix_init_user(void);
  void matrix_scan_user(void);
  
index 0000000000000000000000000000000000000000,f52a97bbc8653a337e8c17f4e292273151f5bbec..0aa9e9e81b5976bd0d2dae387f817c0d1a676128
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,24 +1,24 @@@
 -#include "../../config.h"
+ /* Copyright 2017 REPLACE_WITH_YOUR_NAME
+  *
+  * 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_common.h"
+ // place overrides here
+ #endif
index 23873852f5b5efab601351f30fff08d60ad9ba41,5abd222d19e6e4dc844b9ac08c9555107c8e8c6d..59c38c713cca5815a65e9fc630df5db78073f287
@@@ -285,23 -316,28 +316,40 @@@ bool process_record_quantum(keyrecord_
        rgblight_toggle();
      }
      return false;
-   case RGB_MOD:
+   case RGB_MODE_FORWARD:
      if (record->event.pressed) {
-       rgblight_step();
+       uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT));
+       if(shifted) {
+         rgblight_step_reverse();
+       }
+       else {
+         rgblight_step();
+       }
+     }
+     return false;
+   case RGB_MODE_REVERSE:
+     if (record->event.pressed) {
+       uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT));
+       if(shifted) {
+         rgblight_step();
+       }
+       else {
+         rgblight_step_reverse();
+       }
      }
      return false;
 +  case RGB_SMOD:
 +    // same as RBG_MOD, but if shift is pressed, it will use the reverese direction instead.
 +    if (record->event.pressed) {
 +      uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT));
 +      if(shifted) {
 +        rgblight_step_reverse();
 +      }
 +      else {
 +        rgblight_step();
 +      }
 +    }
 +    return false;
    case RGB_HUI:
      if (record->event.pressed) {
        rgblight_increase_hue();