Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
| 
						 | 
				
			
			@ -4,163 +4,7 @@ DIY/Assembled ortholinear 60% keyboard by [Ortholinear Keyboards](http://ortholi
 | 
			
		|||
 | 
			
		||||
## Quantum MK Firmware
 | 
			
		||||
 | 
			
		||||
You have access to a bunch of goodies! Check out the Makefile to enable/disable some of the features. Uncomment the `#` to enable them. Setting them to `no` does nothing and will only confuse future you.
 | 
			
		||||
 | 
			
		||||
    BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
 | 
			
		||||
    MIDI_ENABLE = yes      # MIDI controls
 | 
			
		||||
    # UNICODE_ENABLE = yes # Unicode support - this is commented out, just as an example. You have to use #, not //
 | 
			
		||||
    BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
 | 
			
		||||
 | 
			
		||||
## Quick aliases to common actions
 | 
			
		||||
 | 
			
		||||
Your keymap can include shortcuts to common operations (called "function actions" in tmk).
 | 
			
		||||
 | 
			
		||||
### Switching and toggling 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. When you apply this to a key, that same key must be set as `KC_TRNS` on the destination layer. Otherwise, you won't make it back to the original layer when you release the key (and you'll get a keycode sent). You can only switch to layers *above* your current layer. If you're on layer 0 and you use `MO(1)`, that will switch to layer 1 just fine. But if you include `MO(3)` on layer 5, that won't do anything for you -- because layer 3 is lower than layer 5 on the stack.
 | 
			
		||||
 | 
			
		||||
`LT(layer, kc)` - momentary switch to *layer* when held, and *kc* when tapped. Like `MO()`, this only works upwards in the layer stack (`layer` must be higher than the current layer).
 | 
			
		||||
 | 
			
		||||
`TG(layer)` - toggles a layer on or off. As with `MO()`, you should set this key as `KC_TRNS` in the destination layer so that tapping it again actually toggles back to the original layer. Only works upwards in the layer stack.
 | 
			
		||||
 | 
			
		||||
### Fun with modifier keys
 | 
			
		||||
 | 
			
		||||
* `LSFT(kc)` - applies left Shift to *kc* (keycode) - `S(kc)` is an alias
 | 
			
		||||
* `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*
 | 
			
		||||
 | 
			
		||||
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.
 | 
			
		||||
 | 
			
		||||
The following shortcuts automatically add `LSFT()` to keycodes to get commonly used symbols. Their long names are also available and documented in `/quantum/keymap_common.h`.
 | 
			
		||||
 | 
			
		||||
    KC_TILD  ~
 | 
			
		||||
    KC_EXLM  !
 | 
			
		||||
    KC_AT    @
 | 
			
		||||
    KC_HASH  #
 | 
			
		||||
    KC_DLR   $
 | 
			
		||||
    KC_PERC  %
 | 
			
		||||
    KC_CIRC  ^
 | 
			
		||||
    KC_AMPR  &
 | 
			
		||||
    KC_ASTR  *
 | 
			
		||||
    KC_LPRN  (
 | 
			
		||||
    KC_RPRN  )
 | 
			
		||||
    KC_UNDS  _
 | 
			
		||||
    KC_PLUS  +
 | 
			
		||||
    KC_LCBR  {
 | 
			
		||||
    KC_RCBR  }
 | 
			
		||||
    KC_PIPE  |
 | 
			
		||||
    KC_COLN  :
 | 
			
		||||
 | 
			
		||||
`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()` (right-hand modifiers are not available):
 | 
			
		||||
 | 
			
		||||
  * MOD_LCTL
 | 
			
		||||
  * MOD_LSFT
 | 
			
		||||
  * MOD_LALT
 | 
			
		||||
  * MOD_LGUI
 | 
			
		||||
 | 
			
		||||
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 
 | 
			
		||||
  * `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/)
 | 
			
		||||
 | 
			
		||||
### Temporarily setting the default layer 
 | 
			
		||||
 | 
			
		||||
`DF(layer)` - sets default layer to *layer*. The default layer is the one at the "bottom" of the layer stack - the ultimate fallback layer. This currently does not persist over power loss. When you plug the keyboard back in, layer 0 will always be the default. It is theoretically possible to work around that, but that's not what `DF` does.
 | 
			
		||||
 | 
			
		||||
### Remember: These are just aliases
 | 
			
		||||
 | 
			
		||||
These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action).
 | 
			
		||||
 | 
			
		||||
Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them.
 | 
			
		||||
 | 
			
		||||
## Macro shortcuts: Send a whole string when pressing just one key
 | 
			
		||||
 | 
			
		||||
Instead of using the `ACTION_MACRO` function, you can simply use `M(n)` to access macro *n* - *n* will get passed into the `action_get_macro` as the `id`, and you can use a switch statement to trigger it. This gets called on the keydown and keyup, so you'll need to use an if statement testing `record->event.pressed` (see keymap_default.c).
 | 
			
		||||
 | 
			
		||||
```c
 | 
			
		||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // this is the function signature -- just copy/paste it into your keymap file as it is.
 | 
			
		||||
{
 | 
			
		||||
  switch(id) {
 | 
			
		||||
    case 0: // this would trigger when you hit a key mapped as M(0)
 | 
			
		||||
      if (record->event.pressed) {
 | 
			
		||||
        return MACRO( I(255), T(H), T(E), T(L), T(L), W(255), T(O), END  ); // this sends the string 'hello' when the macro executes
 | 
			
		||||
      } 
 | 
			
		||||
      break;
 | 
			
		||||
  }
 | 
			
		||||
  return MACRO_NONE;
 | 
			
		||||
};
 | 
			
		||||
```
 | 
			
		||||
A macro can include the following commands:
 | 
			
		||||
 | 
			
		||||
* I() change interval of stroke in milliseconds.
 | 
			
		||||
* D() press key.
 | 
			
		||||
* U() release key.
 | 
			
		||||
* T() type key(press and release).
 | 
			
		||||
* W() wait (milliseconds).
 | 
			
		||||
* END end mark.
 | 
			
		||||
 | 
			
		||||
So above you can see the stroke interval changed to 255ms between each keystroke, then a bunch of keys being typed, waits a while, then the macro ends.
 | 
			
		||||
 | 
			
		||||
Note: Using macros to have your keyboard send passwords for you is a bad idea.
 | 
			
		||||
 | 
			
		||||
### Additional keycode aliases for software-implemented layouts (Colemak, Dvorak, etc)
 | 
			
		||||
 | 
			
		||||
Everything is assuming you're in Qwerty (in software) by default, but there is built-in support for using a Colemak or Dvorak layout by including this at the top of your keymap:
 | 
			
		||||
 | 
			
		||||
   #include "keymap_<layout>.h"
 | 
			
		||||
 | 
			
		||||
Where <layout> is "colemak" or "dvorak". After including this line, you will get access to:
 | 
			
		||||
 
 | 
			
		||||
 * `CM_*` for all of the Colemak-equivalent characters
 | 
			
		||||
 * `DV_*` for all of the Dvorak-equivalent characters
 | 
			
		||||
 
 | 
			
		||||
These implementations assume you're using Colemak or Dvorak on your OS, not on your keyboard - this is referred to as a software-implemented layout. If your computer is in Qwerty and your keymap is in Colemak or Dvorak, this is referred to as a firmware-implemented layout, and you won't need these features. 
 | 
			
		||||
 | 
			
		||||
To give an example, if you're using software-implemented Colemak, and want to get an `F`, you would use `CM_F` - `KC_F` under these same circumstances would result in `T`.
 | 
			
		||||
 | 
			
		||||
## Additional language support
 | 
			
		||||
 | 
			
		||||
In `quantum/keymap_extras/`, you'll see various language files - these work the same way as the alternative layout ones do. Most are defined by their two letter country/language code followed by an underscore and a 4-letter abbreviation of its name. `FR_UGRV` which will result in a `ù` when using a software-implemented AZERTY layout. It's currently difficult to send such characters in just the firmware (but it's being worked on - see Unicode support).
 | 
			
		||||
 | 
			
		||||
## Unicode support
 | 
			
		||||
 | 
			
		||||
You can currently send 4 hex digits with your OS-specific modifier key (RALT for OSX with the "Unicode Hex Input" layout) - this is currently limited to supporting one OS at a time, and requires a recompile for switching. 8 digit hex codes are being worked on. The keycode function is `UC(n)`, where *n* is a 4 digit hexidecimal. Enable from the Makefile.
 | 
			
		||||
 | 
			
		||||
## Other firmware shortcut keycodes
 | 
			
		||||
 | 
			
		||||
* `RESET` - puts the MCU in DFU mode for flashing new firmware (with `make dfu`)
 | 
			
		||||
* `DEBUG` - the firmware into debug mode - you'll need hid_listen to see things
 | 
			
		||||
* `BL_ON` - turns the backlight on
 | 
			
		||||
* `BL_OFF` - turns the backlight off
 | 
			
		||||
* `BL_<n>` - sets the backlight to level *n*
 | 
			
		||||
* `BL_INC` - increments the backlight level by one
 | 
			
		||||
* `BL_DEC` - decrements the backlight level by one
 | 
			
		||||
* `BL_TOGG` - toggles the backlight
 | 
			
		||||
* `BL_STEP` - steps through the backlight levels
 | 
			
		||||
 | 
			
		||||
Enable the backlight from the Makefile.
 | 
			
		||||
 | 
			
		||||
## MIDI functionalty
 | 
			
		||||
 | 
			
		||||
This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile.
 | 
			
		||||
 | 
			
		||||
## Bluetooth functionality
 | 
			
		||||
 | 
			
		||||
This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboards/comments/3psx0q/the_planck_keyboard_with_bluetooth_guide_and/?ref=search_posts), but can be enabled via the Makefile. The firmware will still output characters via USB, so be aware of this when charging via a computer. It would make sense to have a switch on the Bluefruit to turn it off at will.
 | 
			
		||||
For the full Quantum feature list, see [the parent README.md](/README.md).
 | 
			
		||||
 | 
			
		||||
## Building
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -93,7 +93,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=512
 | 
			
		|||
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)
 | 
			
		||||
# CONSOLE_ENABLE   = yes # Console for debug(+400)
 | 
			
		||||
COMMAND_ENABLE   = yes # Commands for debug and configuration
 | 
			
		||||
CUSTOM_MATRIX    = yes # Custom matrix file for the ErgoDox EZ
 | 
			
		||||
SLEEP_LED_ENABLE = yes  # Breathing sleep LED during USB suspend
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
		 Before Width: | Height: | Size: 180 KiB After Width: | Height: | Size: 189 KiB  | 
| 
		 Before Width: | Height: | Size: 753 KiB After Width: | Height: | Size: 1.4 MiB  | 
| 
						 | 
				
			
			@ -14,7 +14,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
			
		|||
 * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
 | 
			
		||||
 * | Del    |   Q  |   W  |   E  |   R  |   T  |  L1  |           |  L1  |   Y  |   U  |   I  |   O  |   P  |   \    |
 | 
			
		||||
 * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
 | 
			
		||||
 * | BkSp   |   A  |   S  |   D  |   F  |   G  |------|           |------|   H  |   J  |   K  |   L  |; / L2|   '    |
 | 
			
		||||
 * | BkSp   |   A  |   S  |   D  |   F  |   G  |------|           |------|   H  |   J  |   K  |   L  |; / L2|' / Cmd |
 | 
			
		||||
 * |--------+------+------+------+------+------| Hyper|           | Meh  |------+------+------+------+------+--------|
 | 
			
		||||
 * | LShift |Z/Ctrl|   X  |   C  |   V  |   B  |      |           |      |   N  |   M  |   ,  |   .  |//Ctrl| RShift |
 | 
			
		||||
 * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
 | 
			
		||||
| 
						 | 
				
			
			@ -43,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
			
		|||
        // right hand
 | 
			
		||||
             KC_RGHT,     KC_6,   KC_7,   KC_8,   KC_9,   KC_0,             KC_MINS,
 | 
			
		||||
             TG(SYMB),    KC_Y,   KC_U,   KC_I,   KC_O,   KC_P,             KC_BSLS,
 | 
			
		||||
                          KC_H,   KC_J,   KC_K,   KC_L,   LT(MDIA, KC_SCLN),KC_QUOT,
 | 
			
		||||
                          KC_H,   KC_J,   KC_K,   KC_L,   LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
 | 
			
		||||
             MEH_T(KC_NO),KC_N,   KC_M,   KC_COMM,KC_DOT, CTL_T(KC_SLSH),   KC_RSFT,
 | 
			
		||||
                                  KC_UP,  KC_DOWN,KC_LBRC,KC_RBRC,          KC_FN1,
 | 
			
		||||
             KC_LALT,        CTL_T(KC_ESC),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,10 @@
 | 
			
		|||
# ErgoDox EZ Default Configuration
 | 
			
		||||
 | 
			
		||||
## Changelog
 | 
			
		||||
 | 
			
		||||
* Feb 2, 2016 (V1.1): 
 | 
			
		||||
  * Made the right-hand quote key double as Cmd/Win on hold. So you get ' when you tap it, " when you tap it with Shift, and Cmd or Win when you hold it. You can then use it as a modifier, or just press and hold it for a moment (and then let go) to send a single Cmd or Win keystroke (handy for opening the Start menu on Windows).
 | 
			
		||||
 | 
			
		||||
This is what we ship with out of the factory. :) The image says it all:
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,3 +1,4 @@
 | 
			
		|||
#include <keymap_extras/keymap_colemak.h>
 | 
			
		||||
#include "ergodox_ez.h"
 | 
			
		||||
#include "debug.h"
 | 
			
		||||
#include "action_layer.h"
 | 
			
		||||
| 
						 | 
				
			
			@ -38,14 +39,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
			
		|||
// Otherwise, it needs KC_*
 | 
			
		||||
[BASE] = KEYMAP(  // layer 0 : default
 | 
			
		||||
        // left hand
 | 
			
		||||
        KC_EQL,         KC_1,         KC_2,   KC_3,   KC_4,   KC_5,   KC_LEFT,
 | 
			
		||||
        KC_DELT,        KC_Q,         KC_W,   KC_E,   KC_R,   KC_T,   TG(SYMB),
 | 
			
		||||
        KC_BSPC,        KC_A,         KC_S,   KC_D,   KC_F,   KC_G,
 | 
			
		||||
        KC_LSFT,        CTL_T(KC_Z),  KC_X,   KC_C,   KC_V,   KC_B,   ALL_T(KC_NO),
 | 
			
		||||
        LT(SYMB,KC_GRV),KC_QUOT,      LALT(KC_LSFT),  KC_LEFT,KC_RGHT,
 | 
			
		||||
                                              ALT_T(KC_APP),  KC_LGUI,
 | 
			
		||||
                                                              KC_HOME,
 | 
			
		||||
                                               KC_SPC,KC_BSPC,KC_END,
 | 
			
		||||
        KC_EQL,         KC_1,         KC_2,   KC_3,   KC_4,    KC_5,   KC_LEFT,
 | 
			
		||||
        KC_DELT,        KC_Q,         KC_W,   KC_E,   KC_R,    KC_T,   TG(SYMB),
 | 
			
		||||
        KC_BSPC,        KC_A,         KC_S,   KC_D,   KC_F,    KC_G,
 | 
			
		||||
        KC_LSFT,        CTL_T(KC_Z),  KC_X,   KC_C,   KC_V,    KC_B,   ALL_T(KC_NO),
 | 
			
		||||
        LT(SYMB,KC_GRV),KC_QUOT,      LALT(KC_LSFT),  KC_LEFT, KC_RGHT,
 | 
			
		||||
                                              ALT_T(KC_APP),   KC_LGUI,
 | 
			
		||||
                                                               KC_HOME,
 | 
			
		||||
                                               KC_SPC,TG(SYMB),KC_END,
 | 
			
		||||
        // right hand
 | 
			
		||||
             KC_RGHT,     KC_6,KC_7,       KC_8,   KC_9,   KC_0,            KC_MINS,
 | 
			
		||||
             TG(SYMB),    KC_Y,KC_U,       KC_I,   KC_O,   KC_P,            KC_BSLS,
 | 
			
		||||
| 
						 | 
				
			
			@ -54,20 +55,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
			
		|||
                               KC_UP,      KC_DOWN,KC_LBRC,KC_RBRC,         KC_FN1,
 | 
			
		||||
             KC_LALT,        CTL_T(KC_ESC),
 | 
			
		||||
             KC_PGUP,
 | 
			
		||||
             KC_PGDN,KC_TAB, KC_ENT
 | 
			
		||||
             KC_PGDN,LT(SYMB, KC_TAB), KC_ENT
 | 
			
		||||
    ),
 | 
			
		||||
/* Keymap 1: Symbol Layer
 | 
			
		||||
 *
 | 
			
		||||
 * ,--------------------------------------------------.           ,--------------------------------------------------.
 | 
			
		||||
 * |        |  F1  |  F2  |  F3  |  F4  |  F5  |      |           |      |  F6  |  F7  |  F8  |  F9  |  F10 |   F11  |
 | 
			
		||||
 * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
 | 
			
		||||
 * |        |   !  |   @  |   {  |   }  |   |  |      |           |      |   Up |   7  |   8  |   9  |   *  |   F12  |
 | 
			
		||||
 * |        |   1  |   2  |   3  |   4  |      |      |           |      |      |      |   =  |      |      |   F12  |
 | 
			
		||||
 * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
 | 
			
		||||
 * |        |   #  |   $  |   (  |   )  |   `  |------|           |------| Down |   4  |   5  |   6  |   +  |        |
 | 
			
		||||
 * |        |   5  |   6  |   7  |   8  |   9  |------|           |------|   &  |   -  |   _  |   ;  |   +  |        |
 | 
			
		||||
 * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
 | 
			
		||||
 * |        |   %  |   ^  |   [  |   ]  |   ~  |      |           |      |   &  |   1  |   2  |   3  |   \  |        |
 | 
			
		||||
 * |        |   (  |   )  |   [  |   ]  |   0  |      |           |      |   |  |   (  |   )  |      |      |        |
 | 
			
		||||
 * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
 | 
			
		||||
 *   |      |      |      |      |      |                                       |      |    . |   0  |   =  |      |
 | 
			
		||||
 *   |      |      |      |      |      |                                       |      |      |      |      |      |
 | 
			
		||||
 *   `----------------------------------'                                       `----------------------------------'
 | 
			
		||||
 *                                        ,-------------.       ,-------------.
 | 
			
		||||
 *                                        |      |      |       |      |      |
 | 
			
		||||
| 
						 | 
				
			
			@ -80,20 +81,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
			
		|||
// SYMBOLS
 | 
			
		||||
[SYMB] = KEYMAP(
 | 
			
		||||
       // left hand
 | 
			
		||||
       KC_TRNS,KC_F1,  KC_F2,  KC_F3,  KC_F4,  KC_F5,  KC_TRNS,
 | 
			
		||||
       KC_TRNS,KC_EXLM,KC_AT,  KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
 | 
			
		||||
       KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
 | 
			
		||||
       KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
 | 
			
		||||
       KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
 | 
			
		||||
                                       KC_TRNS,KC_TRNS,
 | 
			
		||||
                                               KC_TRNS,
 | 
			
		||||
                               KC_TRNS,KC_TRNS,KC_TRNS,
 | 
			
		||||
       // right hand
 | 
			
		||||
       KC_TRNS, KC_F1,  KC_F2,  KC_F3,         KC_F4,        KC_F5,   KC_TRNS,
 | 
			
		||||
       KC_TRNS, KC_1,   KC_2,   KC_3,          KC_4,         KC_TRNS, KC_TRNS,
 | 
			
		||||
       KC_TRNS, KC_5,   KC_6,   KC_7,          KC_8,         KC_9,
 | 
			
		||||
       KC_TRNS, KC_LPRN,KC_RPRN,KC_LBRC,       KC_RBRC,      KC_0,    KC_TRNS,
 | 
			
		||||
       KC_TRNS, KC_TRNS,KC_TRNS,LCTL(KC_PGUP), LCTL(KC_PGDN),
 | 
			
		||||
                                                                              KC_TRNS,KC_TRNS,
 | 
			
		||||
                                                                                      KC_TRNS,
 | 
			
		||||
                                                                      KC_TRNS,KC_TRNS,KC_TRNS,
 | 
			
		||||
               // right hand
 | 
			
		||||
       KC_TRNS, KC_F6,   KC_F7,  KC_F8,   KC_F9,   KC_F10,  KC_F11,
 | 
			
		||||
       KC_TRNS, KC_UP,   KC_7,   KC_8,    KC_9,    KC_ASTR, KC_F12,
 | 
			
		||||
                KC_DOWN, KC_4,   KC_5,    KC_6,    KC_PLUS, KC_TRNS,
 | 
			
		||||
       KC_TRNS, KC_AMPR, KC_1,   KC_2,    KC_3,    KC_BSLS, KC_TRNS,
 | 
			
		||||
                         KC_TRNS,KC_DOT,  KC_0,    KC_EQL,  KC_TRNS,
 | 
			
		||||
       KC_TRNS, KC_TRNS, KC_TRNS,KC_EQL,  KC_TRNS, KC_TRNS, KC_F12,
 | 
			
		||||
                KC_AMPR, KC_MINS,KC_UNDS, CM_SCLN, KC_PLUS, KC_TRNS,
 | 
			
		||||
       KC_TRNS, KC_PIPE, KC_LPRN,KC_RPRN, KC_3,    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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,6 +4,16 @@ This is my personal layout which I use to test out ideas which may or may not ma
 | 
			
		|||
 | 
			
		||||
Changelog:
 | 
			
		||||
 | 
			
		||||
## Feb 5, 2016:
 | 
			
		||||
 | 
			
		||||
* A whole new design for the symbol layer. Specifically:
 | 
			
		||||
  * Put the minus, underscore, and semicolon right in the homerow for the right hand
 | 
			
		||||
  * Parens are in better places for me
 | 
			
		||||
  * The arrow keys now send Ctrl-PgUp and Ctrl-PgDn, for switching browser tabs with the arrows when in symbol layer
 | 
			
		||||
  * Tab (right-hand outer thumb key) now does double duty to toggle symbol layer when held down
 | 
			
		||||
  * Backspace (left-hand outer thumb key) now just toggles symbol layer (I wasn't using it as a backspace)
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
## Jan 19, 2016:
 | 
			
		||||
 | 
			
		||||
* Made J into dual-action key (Alt when held down), to make Alt-tab more ergonomic.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										34
									
								
								keyboard/ergodox_ez/keymaps/jacobono/README.md
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,34 @@
 | 
			
		|||
# Default Layer #
 | 
			
		||||
 | 
			
		||||
I'm using the colemak layer -- customized a bit to work a bit better when using spacemacs as my editor.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
## Special Keys ##
 | 
			
		||||
 | 
			
		||||
`SC1` => `LGUI + TAB`
 | 
			
		||||
 | 
			
		||||
`SC2` => `LGUI + SPACE + TAB`
 | 
			
		||||
 | 
			
		||||
`L1` => Switch to QWERTY Layout
 | 
			
		||||
 | 
			
		||||
`T(L2)` => Toggle Symbol Layer
 | 
			
		||||
 | 
			
		||||
`T(L3)` =>  Toggle Number and D-Pad Layer
 | 
			
		||||
 | 
			
		||||
# QWERTY #
 | 
			
		||||
 | 
			
		||||
Nothing special here -- just need this layer tucked away for the `WASD`.  Which is literally the only reason I use it.
 | 
			
		||||
Just have the same button to toggle back to colemak.
 | 
			
		||||
 | 
			
		||||
# Symbol Layer #
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
This is just putting matching closing symbols next to each other -- useful when editing lisp.
 | 
			
		||||
 | 
			
		||||
# Number and D-Pad Layer #
 | 
			
		||||
 | 
			
		||||
Just a basic number layer with a D-PAD on the other side.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
| 
		 After Width: | Height: | Size: 69 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								keyboard/ergodox_ez/keymaps/jacobono/img/number-dpad-layer.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 45 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								keyboard/ergodox_ez/keymaps/jacobono/img/symbol-layer.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 48 KiB  | 
							
								
								
									
										1142
									
								
								keyboard/ergodox_ez/keymaps/jacobono/jacobono.hex
									
										
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										273
									
								
								keyboard/ergodox_ez/keymaps/jacobono/keymap.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
						 | 
				
			
			@ -0,0 +1,273 @@
 | 
			
		|||
#include "ergodox_ez.h"
 | 
			
		||||
#include "debug.h"
 | 
			
		||||
#include "action_layer.h"
 | 
			
		||||
 | 
			
		||||
#define COLEMAK 0 // new colemak layout
 | 
			
		||||
#define QWERTY 1 // default layer
 | 
			
		||||
#define SYMB 2 // symbols
 | 
			
		||||
#define NUMPAD 3 // number pad
 | 
			
		||||
#define MDIA 4 // media keys
 | 
			
		||||
 | 
			
		||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
			
		||||
	/* Keymap 0: Basic COLEMAK layer
 | 
			
		||||
	 *
 | 
			
		||||
	 * ,--------------------------------------------------.           ,--------------------------------------------------.
 | 
			
		||||
	 * |        |   1  |   2  |   3  |   4  |   5  | LEFT |           | RIGHT|   6  |   7  |   8  |   9  |   0  |        |
 | 
			
		||||
	 * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
 | 
			
		||||
	 * | Tab    |   Q  |   W  |   F  |   P  |   G  |      |           |      |   J  |   L  |   U  |   Y  |   ;  |  TAB   |
 | 
			
		||||
	 * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
 | 
			
		||||
	 * | BkSp   |   A  |   R  |   S  |   T  |   D  |------|           |------|   H  |   N  |   E  |   I  |   O  |  DEL   |
 | 
			
		||||
	 * |--------+------+------+------+------+------|      |          LGUI(TAB)------+------+------+------+------+--------|
 | 
			
		||||
	 * | LShift |Z/Ctrl|   X  |   C  |   V  |   B  |      |           |      |   K  |   M  |   ,  |   .  |//Ctrl| RShift |
 | 
			
		||||
	 * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
 | 
			
		||||
	 *   |  L1  |      |      | UP   |MO(L2)|                                       |MO(L2)| Down |      |  ALT | RGUI   |
 | 
			
		||||
	 *   `----------------------------------'                                       `------------------------------------'
 | 
			
		||||
	 *                                        ,-------------.       ,---------------.
 | 
			
		||||
	 *                                        | LGUI | App  |       |Ctrl/Esc|  Alt |
 | 
			
		||||
	 *                                 ,------|------|------|       |--------+--------+------.
 | 
			
		||||
	 *                                 |      |      |QUKSL |       |  QUKSL |        |      |
 | 
			
		||||
   *                                 |Space |ENTER |------|       |--------| ENTER  |Space |
 | 
			
		||||
	 *                                 |      |      |MO(L3)|       | MO(L3) |        |      |
 | 
			
		||||
	 *                                 `--------------------'       `------------------------'
 | 
			
		||||
	 */
 | 
			
		||||
 | 
			
		||||
	// If it accepts an argument (i.e, is a function), it doesn't need KC_.
 | 
			
		||||
	// Otherwise, it needs KC_*
 | 
			
		||||
	[COLEMAK] = KEYMAP(  // layer 0 : Colemak layout default layer
 | 
			
		||||
	    // left hand
 | 
			
		||||
            KC_TRNS,        KC_1,         KC_2,   KC_3,   KC_4,    KC_5,   KC_LEFT,
 | 
			
		||||
            KC_TAB,         KC_Q,         KC_W,   KC_F,   KC_P,    KC_G,   KC_TRNS,
 | 
			
		||||
            KC_BSPC,        KC_A,         KC_R,   KC_S,   KC_T,    KC_D,
 | 
			
		||||
            KC_LSFT,        CTL_T(KC_Z),  KC_X,   KC_C,   KC_V,    KC_B,   KC_TRNS,
 | 
			
		||||
            TG(QWERTY),     KC_TRNS,      KC_TRNS,KC_UP,  MO(SYMB),
 | 
			
		||||
            KC_LGUI,        KC_APP,
 | 
			
		||||
            LGUI(S(KC_SPC)),
 | 
			
		||||
            KC_SPC,KC_ENT,MO(NUMPAD),
 | 
			
		||||
	    // right hand
 | 
			
		||||
            KC_RGHT,      KC_6,    KC_7,    KC_8,    KC_9,   KC_0,              KC_DELT,
 | 
			
		||||
            KC_TRNS,      KC_J,    KC_L,    KC_U,    KC_Y,   KC_SCLN,           KC_TAB,
 | 
			
		||||
            KC_H,         KC_N,    KC_E,    KC_I,    KC_O,   KC_DEL,
 | 
			
		||||
            LGUI(KC_TAB), KC_K,    KC_M,    KC_COMM, KC_DOT, CTL_T(KC_SLSH),    KC_RSFT,
 | 
			
		||||
            MO(SYMB),     KC_DOWN, KC_TRNS, KC_RALT, KC_RGUI,
 | 
			
		||||
            CTL_T(KC_ESC), KC_LALT,
 | 
			
		||||
            LGUI(S(KC_SPC)),
 | 
			
		||||
            MO(NUMPAD), KC_ENT, KC_SPC),
 | 
			
		||||
 | 
			
		||||
	/* Keymap 1: Basic QWERTY layer
 | 
			
		||||
	 *
 | 
			
		||||
	 * ,--------------------------------------------------.           ,--------------------------------------------------.
 | 
			
		||||
	 * | BkSp   |   1  |   2  |   3  |   4  |   5  | LEFT |           | RIGHT|   6  |   7  |   8  |   9  |   0  |   DEL  |
 | 
			
		||||
	 * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
 | 
			
		||||
	 * | Tab    |   Q  |   W  |   E  |   R  |   T  |  L0  |           |  L0  |   Y  |   U  |   I  |   O  |   P  |   \    |
 | 
			
		||||
	 * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
 | 
			
		||||
   * | Ctrl   |   A  |   S  |   D  |   F  |   G  |------|           |------|   H  |   J  |   K  |   L  |; / L4|  CTRL  |
 | 
			
		||||
   * |--------+------+------+------+------+------| Alt  |           | Alt  |------+------+------+------+------+--------|
 | 
			
		||||
   * | LShift |Z/Ctrl|   X  |   C  |   V  |   B  |      |           |      |   N  |   M  |   ,  |   .  |//Ctrl| RShift |
 | 
			
		||||
   * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
 | 
			
		||||
   *   |Grv/L3|  '"  |AltShf| Left |MO(L2)|                                       |MO(L2)| Down |   [  |   ]  | ~L3  |
 | 
			
		||||
   *   `----------------------------------'                                       `----------------------------------'
 | 
			
		||||
   *                                        ,-------------.       ,---------------.
 | 
			
		||||
   *                                        | Tab  | BkSp |       | Alt  |Ctrl/Esc|
 | 
			
		||||
   *                                 ,------|------|------|       |------+--------+------.
 | 
			
		||||
   *                                 |      |      | Home |       | PgUp |        |      |
 | 
			
		||||
   *                                 | Space| LGUI |------|       |------|  RGUI  |Enter |
 | 
			
		||||
   *                                 |      |      | End  |       | PgDn |        |      |
 | 
			
		||||
   *                                `--------------------'       `----------------------'
 | 
			
		||||
   */
 | 
			
		||||
	// If it accepts an argument (i.e, is a function), it doesn't need KC_.
 | 
			
		||||
	// Otherwise, it needs KC_*
 | 
			
		||||
	[QWERTY] = KEYMAP(  // layer 1
 | 
			
		||||
	    // left hand
 | 
			
		||||
	    KC_BSPC,           KC_1,         KC_2,   KC_3,   KC_4,    KC_5,   KC_LEFT,
 | 
			
		||||
	    KC_TAB,            KC_Q,         KC_W,   KC_E,   KC_R,    KC_T,   KC_TRNS,
 | 
			
		||||
	    KC_LCTRL,          KC_A,         KC_S,   KC_D,   KC_F,    KC_G,
 | 
			
		||||
	    KC_LSFT,           CTL_T(KC_Z),  KC_X,   KC_C,   KC_V,    KC_B,   KC_LALT,
 | 
			
		||||
	    KC_TRNS, KC_QUOT,  LALT(KC_LSFT),  KC_LEFT, MO(SYMB),
 | 
			
		||||
	    KC_TAB,  KC_DELT,
 | 
			
		||||
	    KC_HOME,
 | 
			
		||||
	    KC_SPC, KC_LGUI, KC_END,
 | 
			
		||||
	    // right hand
 | 
			
		||||
	    KC_RGHT,      KC_6,    KC_7,    KC_8,    KC_9,              KC_0,           KC_DELT,
 | 
			
		||||
	    KC_TRNS,      KC_Y,    KC_U,    KC_I,    KC_O,              KC_P,           KC_BSLS,
 | 
			
		||||
	    KC_H,         KC_J,    KC_K,    KC_L,    LT(MDIA, KC_SCLN), KC_RCTRL,
 | 
			
		||||
	    KC_RALT,      KC_N,    KC_M,    KC_COMM, KC_DOT,            CTL_T(KC_SLSH), KC_RSFT,
 | 
			
		||||
	    MO(SYMB),     KC_DOWN, KC_LBRC, KC_RBRC, KC_FN1,
 | 
			
		||||
	    KC_LALT, CTL_T(KC_ESC),
 | 
			
		||||
	    KC_PGUP,
 | 
			
		||||
	    KC_PGDN, KC_RGUI, KC_ENT),
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	/* Keymap 2: Symbol Layer
 | 
			
		||||
	 *
 | 
			
		||||
	 * ,--------------------------------------------------.           ,--------------------------------------------------.
 | 
			
		||||
	 * |        |  F1  |  F2  |  F3  |  F4  |  F5  |      |           |      |  F6  |  F7  |  F8  |  F9  |  F10 |   F11  |
 | 
			
		||||
	 * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
 | 
			
		||||
	 * |        |      |   @  |   *  |   =  |   _  |      |           |      |   ~  |   {  |   }  |   #  |   :  |   F12  |
 | 
			
		||||
	 * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
 | 
			
		||||
	 * |        |   |  |   !  |   +  |   -  |   "  |------|           |------|   "  |   (  |   )  |   '  |   `  |        |
 | 
			
		||||
	 * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
 | 
			
		||||
	 * |        |      |   %  |   ^  |   $  |   &  |      |           |      |   ;  |   [  |   ]  |   \  |   /  |        |
 | 
			
		||||
	 * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
 | 
			
		||||
	 *   |      |      |      |      |      |                                       |      |      |      |      |      |
 | 
			
		||||
	 *   `----------------------------------'                                       `----------------------------------'
 | 
			
		||||
	 *                                        ,-------------.       ,-------------.
 | 
			
		||||
	 *                                        |      |      |       |      |      |
 | 
			
		||||
	 *                                 ,------|------|------|       |------+------+------.
 | 
			
		||||
	 *                                 |      |      |      |       |      |      |      |
 | 
			
		||||
	 *                                 |      |      |------|       |------|      |      |
 | 
			
		||||
	 *                                 |      |      |      |       |      |      |      |
 | 
			
		||||
	 *                                 `--------------------'       `--------------------'
 | 
			
		||||
	 */
 | 
			
		||||
	// SYMBOL
 | 
			
		||||
	[SYMB] = KEYMAP(
 | 
			
		||||
	    // left hand
 | 
			
		||||
	    KC_TRNS, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_TRNS,
 | 
			
		||||
	    KC_TRNS, KC_TRNS, KC_AT,   KC_ASTR, KC_EQL,  KC_UNDS, KC_TRNS,
 | 
			
		||||
	    KC_TRNS, KC_PIPE, KC_EXLM, KC_PLUS, KC_MINS, S(KC_QUOTE),
 | 
			
		||||
	    KC_TRNS, KC_TRNS, KC_PERC, KC_CIRC, KC_DLR,  KC_AMPR, KC_TRNS,
 | 
			
		||||
	    KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
 | 
			
		||||
	    KC_TRNS, KC_TRNS,
 | 
			
		||||
	    KC_TRNS,
 | 
			
		||||
	    KC_TRNS, KC_TRNS, KC_TRNS,
 | 
			
		||||
 | 
			
		||||
	    // right hand
 | 
			
		||||
	    KC_TRNS, KC_F6,      KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,
 | 
			
		||||
	    KC_TRNS, KC_TILD,    KC_LCBR, KC_RCBR, KC_HASH, S(KC_SCLN), KC_F12,
 | 
			
		||||
	    S(KC_QUOTE),KC_LPRN, KC_RPRN, KC_QUOTE, KC_GRV, KC_TRNS,
 | 
			
		||||
	    KC_TRNS, KC_SCLN,    KC_LBRC, KC_RBRC, KC_BSLS, KC_SLSH, KC_TRNS,
 | 
			
		||||
	    KC_TRNS, KC_TRNS,    KC_TRNS, KC_TRNS, KC_TRNS,
 | 
			
		||||
	    KC_TRNS, KC_TRNS,
 | 
			
		||||
	    KC_TRNS,
 | 
			
		||||
	    KC_TRNS, KC_TRNS, KC_TRNS),
 | 
			
		||||
 | 
			
		||||
	/* Keymap 3: Numpad Layer
 | 
			
		||||
	 *
 | 
			
		||||
	 * ,--------------------------------------------------.           ,--------------------------------------------------.
 | 
			
		||||
	 * |        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
 | 
			
		||||
	 * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
 | 
			
		||||
	 * |        |      |      |  UP  |      |      |      |           |      |   $  |   7  |   8  |   9  |   +  |        |
 | 
			
		||||
	 * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
 | 
			
		||||
	 * |        |      | LEFT | DOWN | RIGHT|      |------|           |------|   =  |   4  |   5  |   6  |   -  |        |
 | 
			
		||||
	 * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
 | 
			
		||||
	 * |        |      |      |      |      |      |      |           |      |      |   1  |   2  |   3  |   *  |        |
 | 
			
		||||
	 * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
 | 
			
		||||
	 *   |      |      |      |      |      |                                       |   ,  |   0  |   .  |   /  |      |
 | 
			
		||||
	 *   `----------------------------------'                                       `----------------------------------'
 | 
			
		||||
	 *                                        ,-------------.       ,-------------.
 | 
			
		||||
	 *                                        |      |      |       |      |      |
 | 
			
		||||
	 *                                 ,------|------|------|       |------+------+------.
 | 
			
		||||
	 *                                 |      |      |      |       |      |      |      |
 | 
			
		||||
	 *                                 |      |      |------|       |------|      |      |
 | 
			
		||||
	 *                                 |      |      |      |       |      |      |      |
 | 
			
		||||
	 *                                 `--------------------'       `--------------------'
 | 
			
		||||
	 */
 | 
			
		||||
	// Numpad
 | 
			
		||||
	[NUMPAD] = KEYMAP(
 | 
			
		||||
	    // left hand
 | 
			
		||||
	    KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
 | 
			
		||||
	    KC_TRNS,KC_TRNS,KC_TRNS,KC_UP,KC_TRNS,KC_TRNS,KC_TRNS,
 | 
			
		||||
	    KC_TRNS,KC_TRNS,KC_LEFT,KC_DOWN,KC_RIGHT,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,
 | 
			
		||||
	    // right hand
 | 
			
		||||
	    KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,  KC_TRNS,
 | 
			
		||||
	    KC_TRNS, KC_DLR,  KC_7,    KC_8,    KC_9,    KC_PLUS,  KC_TRNS,
 | 
			
		||||
	             KC_EQL,  KC_4,    KC_5,    KC_6,    KC_MINS,  KC_TRNS,
 | 
			
		||||
	    KC_TRNS, KC_AMPR, KC_1,    KC_2,    KC_3,    KC_ASTR,  KC_TRNS,
 | 
			
		||||
	                      KC_COMMA,KC_0,    KC_DOT,  KC_SLSH,  KC_TRNS,
 | 
			
		||||
	    KC_TRNS, KC_TRNS,
 | 
			
		||||
	    KC_TRNS,
 | 
			
		||||
	    KC_TRNS, KC_TRNS, KC_TRNS),
 | 
			
		||||
 | 
			
		||||
	/* Keymap 4: Media and mouse keys
 | 
			
		||||
	 *
 | 
			
		||||
	 * ,--------------------------------------------------.           ,--------------------------------------------------.
 | 
			
		||||
	 * |        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
 | 
			
		||||
	 * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
 | 
			
		||||
	 * |        |      |      | MsUp |      |      |      |           |      |      |      |      |      |      |        |
 | 
			
		||||
	 * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
 | 
			
		||||
	 * |        |      |MsLeft|MsDown|MsRght|      |------|           |------|      |      |      |      |      |  Play  |
 | 
			
		||||
	 * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
 | 
			
		||||
	 * |        |      |      |      |      |      |      |           |      |      |      | Prev | Next |      |        |
 | 
			
		||||
	 * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
 | 
			
		||||
	 *   |      |      |      | Lclk | Rclk |                                       |VolUp |VolDn | Mute |      |      |
 | 
			
		||||
	 *   `----------------------------------'                                       `----------------------------------'
 | 
			
		||||
	 *                                        ,-------------.       ,-------------.
 | 
			
		||||
	 *                                        |      |      |       |      |      |
 | 
			
		||||
	 *                                 ,------|------|------|       |------+------+------.
 | 
			
		||||
	 *                                 |      |      |      |       |      |      |Brwser|
 | 
			
		||||
	 *                                 |      |      |------|       |------|      |Back  |
 | 
			
		||||
	 *                                 |      |      |      |       |      |      |      |
 | 
			
		||||
	 *                                 `--------------------'       `--------------------'
 | 
			
		||||
	 */
 | 
			
		||||
	// MEDIA AND MOUSE
 | 
			
		||||
	KEYMAP(
 | 
			
		||||
	    KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
 | 
			
		||||
	    KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
 | 
			
		||||
	    KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
 | 
			
		||||
	    KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
 | 
			
		||||
	    KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
 | 
			
		||||
	    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, 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_MPLY,
 | 
			
		||||
	    KC_TRNS,  KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
 | 
			
		||||
	    KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
 | 
			
		||||
	    KC_TRNS, KC_TRNS,
 | 
			
		||||
	    KC_TRNS,
 | 
			
		||||
	    KC_TRNS, KC_TRNS, KC_WBAK),
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const uint16_t PROGMEM fn_actions[] = {
 | 
			
		||||
	[1] = ACTION_LAYER_TAP_TOGGLE(SYMB)                // FN1 - Momentary Layer 1 (Symbols)
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
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;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
// Runs just one time when the keyboard initializes.
 | 
			
		||||
void * matrix_init_user(void) {
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
// Runs constantly in the background, in a loop.
 | 
			
		||||
void * matrix_scan_user(void) {
 | 
			
		||||
 | 
			
		||||
	uint8_t layer = biton32(layer_state);
 | 
			
		||||
 | 
			
		||||
	ergodox_board_led_off();
 | 
			
		||||
	ergodox_right_led_1_off();
 | 
			
		||||
	ergodox_right_led_2_off();
 | 
			
		||||
	ergodox_right_led_3_off();
 | 
			
		||||
	switch (layer) {
 | 
			
		||||
		// TODO: Make this relevant to the ErgoDox EZ.
 | 
			
		||||
		case 1:
 | 
			
		||||
			ergodox_right_led_1_on();
 | 
			
		||||
			break;
 | 
			
		||||
		case 2:
 | 
			
		||||
			ergodox_right_led_2_on();
 | 
			
		||||
			break;
 | 
			
		||||
		default:
 | 
			
		||||
			// none
 | 
			
		||||
			break;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
| 
						 | 
				
			
			@ -14,6 +14,7 @@ If you're using homebrew, you can use the following commands:
 | 
			
		|||
 | 
			
		||||
    brew tap osx-cross/avr
 | 
			
		||||
    brew install avr-libc
 | 
			
		||||
    brew install dfu-programmer
 | 
			
		||||
 | 
			
		||||
Otherwise, these instructions will work:
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,163 +4,7 @@ DIY/Assembled compact ortholinear 40% keyboard by [Ortholinear Keyboards](http:/
 | 
			
		|||
 | 
			
		||||
## Quantum MK Firmware
 | 
			
		||||
 | 
			
		||||
You have access to a bunch of goodies! Check out the Makefile to enable/disable some of the features. Uncomment the `#` to enable them. Setting them to `no` does nothing and will only confuse future you.
 | 
			
		||||
 | 
			
		||||
    BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
 | 
			
		||||
    MIDI_ENABLE = yes      # MIDI controls
 | 
			
		||||
    # UNICODE_ENABLE = yes # Unicode support - this is commented out, just as an example. You have to use #, not //
 | 
			
		||||
    BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
 | 
			
		||||
 | 
			
		||||
## Quick aliases to common actions
 | 
			
		||||
 | 
			
		||||
Your keymap can include shortcuts to common operations (called "function actions" in tmk).
 | 
			
		||||
 | 
			
		||||
### Switching and toggling 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. When you apply this to a key, that same key must be set as `KC_TRNS` on the destination layer. Otherwise, you won't make it back to the original layer when you release the key (and you'll get a keycode sent). You can only switch to layers *above* your current layer. If you're on layer 0 and you use `MO(1)`, that will switch to layer 1 just fine. But if you include `MO(3)` on layer 5, that won't do anything for you -- because layer 3 is lower than layer 5 on the stack.
 | 
			
		||||
 | 
			
		||||
`LT(layer, kc)` - momentary switch to *layer* when held, and *kc* when tapped. Like `MO()`, this only works upwards in the layer stack (`layer` must be higher than the current layer).
 | 
			
		||||
 | 
			
		||||
`TG(layer)` - toggles a layer on or off. As with `MO()`, you should set this key as `KC_TRNS` in the destination layer so that tapping it again actually toggles back to the original layer. Only works upwards in the layer stack.
 | 
			
		||||
 | 
			
		||||
### Fun with modifier keys
 | 
			
		||||
 | 
			
		||||
* `LSFT(kc)` - applies left Shift to *kc* (keycode) - `S(kc)` is an alias
 | 
			
		||||
* `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*
 | 
			
		||||
 | 
			
		||||
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.
 | 
			
		||||
 | 
			
		||||
The following shortcuts automatically add `LSFT()` to keycodes to get commonly used symbols. Their long names are also available and documented in `/quantum/keymap_common.h`.
 | 
			
		||||
 | 
			
		||||
    KC_TILD  ~
 | 
			
		||||
    KC_EXLM  !
 | 
			
		||||
    KC_AT    @
 | 
			
		||||
    KC_HASH  #
 | 
			
		||||
    KC_DLR   $
 | 
			
		||||
    KC_PERC  %
 | 
			
		||||
    KC_CIRC  ^
 | 
			
		||||
    KC_AMPR  &
 | 
			
		||||
    KC_ASTR  *
 | 
			
		||||
    KC_LPRN  (
 | 
			
		||||
    KC_RPRN  )
 | 
			
		||||
    KC_UNDS  _
 | 
			
		||||
    KC_PLUS  +
 | 
			
		||||
    KC_LCBR  {
 | 
			
		||||
    KC_RCBR  }
 | 
			
		||||
    KC_PIPE  |
 | 
			
		||||
    KC_COLN  :
 | 
			
		||||
 | 
			
		||||
`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()` (right-hand modifiers are not available):
 | 
			
		||||
 | 
			
		||||
  * MOD_LCTL
 | 
			
		||||
  * MOD_LSFT
 | 
			
		||||
  * MOD_LALT
 | 
			
		||||
  * MOD_LGUI
 | 
			
		||||
 | 
			
		||||
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 
 | 
			
		||||
  * `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/)
 | 
			
		||||
 | 
			
		||||
### Temporarily setting the default layer 
 | 
			
		||||
 | 
			
		||||
`DF(layer)` - sets default layer to *layer*. The default layer is the one at the "bottom" of the layer stack - the ultimate fallback layer. This currently does not persist over power loss. When you plug the keyboard back in, layer 0 will always be the default. It is theoretically possible to work around that, but that's not what `DF` does.
 | 
			
		||||
 | 
			
		||||
### Remember: These are just aliases
 | 
			
		||||
 | 
			
		||||
These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action).
 | 
			
		||||
 | 
			
		||||
Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them.
 | 
			
		||||
 | 
			
		||||
## Macro shortcuts: Send a whole string when pressing just one key
 | 
			
		||||
 | 
			
		||||
Instead of using the `ACTION_MACRO` function, you can simply use `M(n)` to access macro *n* - *n* will get passed into the `action_get_macro` as the `id`, and you can use a switch statement to trigger it. This gets called on the keydown and keyup, so you'll need to use an if statement testing `record->event.pressed` (see keymaps/default.c).
 | 
			
		||||
 | 
			
		||||
```c
 | 
			
		||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // this is the function signature -- just copy/paste it into your keymap file as it is.
 | 
			
		||||
{
 | 
			
		||||
  switch(id) {
 | 
			
		||||
    case 0: // this would trigger when you hit a key mapped as M(0)
 | 
			
		||||
      if (record->event.pressed) {
 | 
			
		||||
        return MACRO( I(255), T(H), T(E), T(L), T(L), W(255), T(O), END  ); // this sends the string 'hello' when the macro executes
 | 
			
		||||
      } 
 | 
			
		||||
      break;
 | 
			
		||||
  }
 | 
			
		||||
  return MACRO_NONE;
 | 
			
		||||
};
 | 
			
		||||
```
 | 
			
		||||
A macro can include the following commands:
 | 
			
		||||
 | 
			
		||||
* I() change interval of stroke in milliseconds.
 | 
			
		||||
* D() press key.
 | 
			
		||||
* U() release key.
 | 
			
		||||
* T() type key(press and release).
 | 
			
		||||
* W() wait (milliseconds).
 | 
			
		||||
* END end mark.
 | 
			
		||||
 | 
			
		||||
So above you can see the stroke interval changed to 255ms between each keystroke, then a bunch of keys being typed, waits a while, then the macro ends.
 | 
			
		||||
 | 
			
		||||
Note: Using macros to have your keyboard send passwords for you is a bad idea.
 | 
			
		||||
 | 
			
		||||
### Additional keycode aliases for software-implemented layouts (Colemak, Dvorak, etc)
 | 
			
		||||
 | 
			
		||||
Everything is assuming you're in Qwerty (in software) by default, but there is built-in support for using a Colemak or Dvorak layout by including this at the top of your keymap:
 | 
			
		||||
 | 
			
		||||
   #include "keymap_<layout>.h"
 | 
			
		||||
 | 
			
		||||
Where <layout> is "colemak" or "dvorak". After including this line, you will get access to:
 | 
			
		||||
 
 | 
			
		||||
 * `CM_*` for all of the Colemak-equivalent characters
 | 
			
		||||
 * `DV_*` for all of the Dvorak-equivalent characters
 | 
			
		||||
 
 | 
			
		||||
These implementations assume you're using Colemak or Dvorak on your OS, not on your keyboard - this is referred to as a software-implemented layout. If your computer is in Qwerty and your keymap is in Colemak or Dvorak, this is referred to as a firmware-implemented layout, and you won't need these features. 
 | 
			
		||||
 | 
			
		||||
To give an example, if you're using software-implemented Colemak, and want to get an `F`, you would use `CM_F` - `KC_F` under these same circumstances would result in `T`.
 | 
			
		||||
 | 
			
		||||
## Additional language support
 | 
			
		||||
 | 
			
		||||
In `quantum/keymap_extras/`, you'll see various language files - these work the same way as the alternative layout ones do. Most are defined by their two letter country/language code followed by an underscore and a 4-letter abbreviation of its name. `FR_UGRV` which will result in a `ù` when using a software-implemented AZERTY layout. It's currently difficult to send such characters in just the firmware (but it's being worked on - see Unicode support).
 | 
			
		||||
 | 
			
		||||
## Unicode support
 | 
			
		||||
 | 
			
		||||
You can currently send 4 hex digits with your OS-specific modifier key (RALT for OSX with the "Unicode Hex Input" layout) - this is currently limited to supporting one OS at a time, and requires a recompile for switching. 8 digit hex codes are being worked on. The keycode function is `UC(n)`, where *n* is a 4 digit hexidecimal. Enable from the Makefile.
 | 
			
		||||
 | 
			
		||||
## Other firmware shortcut keycodes
 | 
			
		||||
 | 
			
		||||
* `RESET` - puts the MCU in DFU mode for flashing new firmware (with `make dfu`)
 | 
			
		||||
* `DEBUG` - the firmware into debug mode - you'll need hid_listen to see things
 | 
			
		||||
* `BL_ON` - turns the backlight on
 | 
			
		||||
* `BL_OFF` - turns the backlight off
 | 
			
		||||
* `BL_<n>` - sets the backlight to level *n*
 | 
			
		||||
* `BL_INC` - increments the backlight level by one
 | 
			
		||||
* `BL_DEC` - decrements the backlight level by one
 | 
			
		||||
* `BL_TOGG` - toggles the backlight
 | 
			
		||||
* `BL_STEP` - steps through the backlight levels
 | 
			
		||||
 | 
			
		||||
Enable the backlight from the Makefile.
 | 
			
		||||
 | 
			
		||||
## MIDI functionalty
 | 
			
		||||
 | 
			
		||||
This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile.
 | 
			
		||||
 | 
			
		||||
## Bluetooth functionality
 | 
			
		||||
 | 
			
		||||
This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboards/comments/3psx0q/the_planck_keyboard_with_bluetooth_guide_and/?ref=search_posts), but can be enabled via the Makefile. The firmware will still output characters via USB, so be aware of this when charging via a computer. It would make sense to have a switch on the Bluefruit to turn it off at will.
 | 
			
		||||
For the full Quantum feature list, see [the parent README.md](/README.md).
 | 
			
		||||
 | 
			
		||||
## Building
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -171,27 +15,6 @@ Depending on which keymap you would like to use, you will have to compile slight
 | 
			
		|||
### Default
 | 
			
		||||
To build with the default keymap, simply run `make`.
 | 
			
		||||
 | 
			
		||||
## Safety Considerations
 | 
			
		||||
 | 
			
		||||
You probably don't want to "brick" your keyboard, making it impossible
 | 
			
		||||
to rewrite firmware onto it.  Here are some of the parameters to show
 | 
			
		||||
what things are (and likely aren't) too risky.
 | 
			
		||||
 | 
			
		||||
- If a keyboard map does not include RESET, then, to get into DFU
 | 
			
		||||
  mode, you will need to press the reset button on the PCB, which
 | 
			
		||||
  requires unscrewing some bits.
 | 
			
		||||
- Messing with tmk_core / common files might make the keyboard
 | 
			
		||||
  inoperable
 | 
			
		||||
- Too large a .hex file is trouble; `make dfu` will erase the block,
 | 
			
		||||
  test the size (oops, wrong order!), which errors out, failing to
 | 
			
		||||
  flash the keyboard
 | 
			
		||||
- DFU tools do /not/ allow you to write into the bootloader (unless
 | 
			
		||||
  you throw in extra fruitsalad of options), so there is little risk
 | 
			
		||||
  there.
 | 
			
		||||
- EEPROM has around a 100000 write cycle.  You shouldn't rewrite the
 | 
			
		||||
  firmware repeatedly and continually; that'll burn the EEPROM
 | 
			
		||||
  eventually.
 | 
			
		||||
 | 
			
		||||
### Other Keymaps
 | 
			
		||||
Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` and see keymap document (you can find in top README.md) and existent keymap files.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||