Adds Hyper key, tweaks ErgoDox EZ default keymap

This commit is contained in:
Erez Zukerman 2015-10-29 00:16:53 +02:00
parent ea0e1169e6
commit 4b0c54324a
4 changed files with 34 additions and 244 deletions

View file

@ -13,16 +13,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ,--------------------------------------------------. ,--------------------------------------------------.
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | Del | Q | W | E | R | T | Tab | | : | Y | U | I | O | P | \ |
* | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2| ' |
* |--------+------+------+------+------+------| : | | L1 |------+------+------+------+------+--------|
* |--------+------+------+------+------+------| Hypr | | Hypr |------+------+------+------+------+--------|
* | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |Grv/L1|AltSft| TAB | Left | Right| | Up | Down | [ | ] | ~L1 |
* |Grv/L1|AltSft| TAB | Left | Right| | Up | Down | [ | ] | ~L1 |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | Rclk | LGui | | Alt |Ctrl/Esc|
* | App | LGui | | Alt |Ctrl/Esc|
* ,------|------|------| |------+--------+------.
* | | | Home | | PgUp | | |
* | Space|Backsp|------| |------| Tab |Enter |
@ -34,19 +34,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[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, KC_TAB,
KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1),
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, KC_COLN,
KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
LT(SYMB,KC_GRV),LALT(KC_LSFT),KC_TAB, KC_LEFT,KC_RGHT,
KC_MENU,KC_LGUI,
KC_APP, KC_LGUI,
KC_HOME,
KC_SPC,KC_BSPC,KC_END,
// right hand
KC_RGHT,KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
KC_COLN,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,
TG(1), 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_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
TG(1), 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,
ALL_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),
KC_PGUP,
KC_PGDN,KC_TAB, KC_ENT
@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | : | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
@ -77,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// 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_COLN,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
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,
@ -98,13 +98,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | MsUp | | | | | | | | | | | | |
* | | | | MsUp | | | | | | | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | |MsLeft|MsDown|MsRght| | |------| |------| | | | Play | | Mute |
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | | Prev | Next | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | Lclk | Rclk | |VolUp |VolDn | | | |
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
@ -117,8 +117,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// MEDIA AND MOUSE
KEYMAP(
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_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_BTN3, KC_BTN2,
KC_TRNS, KC_TRNS,
@ -127,9 +127,9 @@ KEYMAP(
// 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_MPLY, KC_TRNS, KC_MUTE,
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_TRNS, 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

View file

@ -1,211 +0,0 @@
// TODO: Move all of this stuff into the default keymap, and then get rid of this file.
#include "action_util.h"
#include "action_layer.h"
#define KC_SW0 KC_FN0
#define DEBUG_ACTION
static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | Del | Q | W | E | R | T | Up | | Up | Y | U | I | O | P | \ |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2| ' |
* |--------+------+------+------+------+------| L1 | | L1 |------+------+------+------+------+--------|
* | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |Grv/L1| ~L1 | TAB | Left | Right| | Up | Down | [ | ] | ~L1 |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | Rclk | LGui | | Alt |Ctrl/Esc|
* ,------|------|------| |------+--------+------.
* | | | Home | | PgUp | | |
* | Space| Enter|------| |------| Tab |Enter |
* | | | End | | PgDn | | |
* `--------------------' `----------------------'
*/
// Basic layer
KEYMAP(
EQL, 1, 2, 3, 4, 5, LEFT,
DEL, Q, W, E, R, T, UP,
BSPC, A, S, D, F, G,
LSFT, FN29, X, C, V, B, FN1,
FN30, FN4, TAB, LEFT, RIGHT,
BTN2,LGUI,
HOME,
SPC, ENT, END,
//RIGHT
RIGHT,6, 7, 8, 9, 0, MINS,
UP, Y, U, I, O, P, BSLS,
H, J, K, L, FN31, QUOT,
FN1, N, M, COMM, DOT, FN28, RSFT,
UP, DOWN, LBRC, RBRC, FN4,
LALT, FN27,
PGUP,
PGDN, TAB, ENT
),
/* Keymap 1: Symbol Layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | Flash | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | : | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | . | 0 | = | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// SYMBOLS
KEYMAP(
FN0, F1, F2, F3, F4, F5, TRNS,
TRNS, FN7, FN8, FN23, FN24, FN18, TRNS,
FN22, FN9, FN10, FN15, FN16, GRV,
TRNS, FN11, FN12, LBRC, RBRC, FN17, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, TRNS,
TRNS,
TRNS, TRNS, TRNS,
// right hand
TRNS, F6, F7, F8, F9, F10, F11,
TRNS, UP, 7, 8, 9, FN14, F12,
DOWN, 4, 5, 6, FN26, TRNS,
TRNS, FN13, 1, 2, 3, BSLS, TRNS,
TRNS,DOT, 0, EQL, TRNS,
TRNS, TRNS,
TRNS,
TRNS, TRNS, TRNS
),
/* Keymap 2: Media and mouse keys
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | MsUp | | | | | | | | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | |MsLeft|MsDown|MsRght| | |------| |------| | | | Play | | Mute |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | | Prev | Next | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | Lclk | Rclk | |VolUp |VolDn | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// MEDIA AND MOUSE
KEYMAP(
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, TRNS, MS_U, TRNS, TRNS, TRNS, TRNS,
TRNS, MS_L, MS_D, MS_R, TRNS, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS, BTN3, BTN2,
TRNS, TRNS,
TRNS,
TRNS, TRNS, TRNS,
// right hand
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS, MPLY, TRNS, TRNS,
TRNS, TRNS, TRNS, MPRV, MNXT, TRNS, TRNS,
VOLU, VOLD, TRNS, TRNS, TRNS,
TRNS, TRNS,
TRNS,
TRNS, TRNS, WBAK
),
};
/* id for user defined functions */
enum function_id {
TEENSY_KEY,
};
/*
* Fn action definition
*/
static const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key
[1] = ACTION_LAYER_INVERT(1, ON_RELEASE), // FN1 - Toggle 1
[2] = ACTION_LAYER_TOGGLE(2), // FN2 - Toggle 2
[3] = ACTION_LAYER_TOGGLE(3), // FN3 - Toggle 3
[4] = ACTION_LAYER_TAP_TOGGLE(1), // FN4 - Momentary Layer 1
[5] = ACTION_LAYER_MOMENTARY(2), // FN5 - Momentary L2
// SYMBOLS
ACTION_MODS_KEY(MOD_LSFT, KC_QUOT), // FN6 - "
ACTION_MODS_KEY(MOD_LSFT, KC_1), // FN7 - !
ACTION_MODS_KEY(MOD_LSFT, KC_2), // FN8 - @
ACTION_MODS_KEY(MOD_LSFT, KC_3), // FN9 - #
ACTION_MODS_KEY(MOD_LSFT, KC_4), // FN10 - $
ACTION_MODS_KEY(MOD_LSFT, KC_5), // FN11 - %
ACTION_MODS_KEY(MOD_LSFT, KC_6), // FN12 - ^
ACTION_MODS_KEY(MOD_LSFT, KC_7), // FN13 - &
ACTION_MODS_KEY(MOD_LSFT, KC_8), // FN14 - *
ACTION_MODS_KEY(MOD_LSFT, KC_9), // FN15 - (
ACTION_MODS_KEY(MOD_LSFT, KC_0), // FN16 - )
ACTION_MODS_KEY(MOD_LSFT, KC_GRV), // FN17 - ~
ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), // FN18 - |
ACTION_MODS_KEY(MOD_LSFT, KC_MINS), // FN19 - _
ACTION_MODS_KEY(MOD_LSFT, KC_COMM), // FN20 - <
ACTION_MODS_KEY(MOD_LSFT, KC_DOT), // FN21 - >
ACTION_MODS_KEY(MOD_LSFT, KC_SCLN), // FN22 - :
ACTION_MODS_KEY(MOD_LSFT, KC_LBRC), // FN23 - {
ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), // FN24 - }
ACTION_MODS_KEY(MOD_LSFT, KC_SLSH), // FN25 - ?
ACTION_MODS_KEY(MOD_LSFT, KC_EQL), // FN26 - +
ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ESC), // FN27 - Control/esc on tap
ACTION_MODS_TAP_KEY(MOD_LCTL, KC_SLSH), // FN28 - slash becomes Ctrl when held (right pinky)
ACTION_MODS_TAP_KEY(MOD_LCTL, KC_Z), // FN29 - z becomes Ctrl when held (left pinky)
// Fancy tapping/toggling
ACTION_LAYER_TAP_KEY(1, KC_GRV), // FN30 - Layer 1 when holding backtick key
ACTION_LAYER_TAP_KEY(2, KC_SCLN), // FN31 - Layer 2 when holding semicolon key
};
void action_function(keyrecord_t *event, uint8_t id, uint8_t opt)
{
print("action_function called\n");
print("id = "); phex(id); print("\n");
print("opt = "); phex(opt); print("\n");
if (id == TEENSY_KEY) {
clear_keyboard();
print("\n\nJump to bootloader... ");
_delay_ms(250);
bootloader_jump(); // should not return
print("not supported.\n");
}
}
void * matrix_init_user(void) {
};
void * matrix_scan_user(void) {
};

View file

@ -16,14 +16,14 @@
:1000F0001E00140004001D71E1044D001F001A00D1
:1001000016001B002B002A00200008000700060034
:1001100050002C0021001500090019004F004A0072
:10012000220017000A0005000000760050002B0096
:10013000000033020000E3004F00330200000154CE
:10012000220017000A00050000006500500001547D
:100130000000007F0000E3004F0001540000007F3A
:100140000000E20023001C000B00110000002971D8
:10015000240018000D00100052004B0025000C0078
:100160000E00360051002800260012000F00370054
:100170002F002B00270013003382387130004E000F
:100180002D0031003400E500C10000000100010035
:1001900033020100010000003A001E022002220288
:1001900001000100010000003A001E0220022202BC
:1001A000010001003B001F022102230201000100A7
:1001B0003C002F0226022F00010001003D0030020A
:1001C00027023000010001003E00380235003502F0
@ -34,16 +34,16 @@
:1002100042002600230020002700010043002502A1
:100220002E0231002E0001004400450001000100B3
:1002300001000000010001000100010001000000B8
:1002400001000100F2000100010001000100F000C6
:10025000F10001000100010001000100F3000100B4
:10026000F60001000100010001000100F50001009D
:1002400001000100010001000100010001000100A6
:10025000F2000100010001000100F000F1000100C6
:10026000F600010001000100F3000100F5000100AB
:100270000100010001000100000001000100010077
:100280000000010000000100010001000000010069
:100290000000010001000100010001000000010058
:1002A0000100010001000100A9000100010001009E
:1002B0000100AC00AA00B60001000100AE00AB00D6
:1002C0000100010001000100010001000100010026
:1002D00001000100A8000100010000000A00253013
:1002B0000100AC00AA00B600010001000100AB0083
:1002C000A80001000100010001000100010001007F
:1002D00001000100AE000100010000000A0025300D
:1002E000313662003A200025303258000A722F63FE
:1002F0002030313233343536373839414243444582
:10030000460A000A002530325800626F756E636538
@ -185,9 +185,9 @@
:100B80004F4F544D41474943204D4F5553454B45D9
:100B9000592045585452414B455920434F4E534FCD
:100BA0004C4520434F4D4D414E44203531320A00D3
:100BB0004255494C443A20643364623864362D64AB
:100BC00069727479202830343A31363A3137204FFF
:100BD00063742032382032303135290A00564944B6
:100BB0004255494C443A20656130653131362D64E7
:100BC00069727479202830303A31343A3339204F01
:100BD00063742032392032303135290A00564944B5
:100BE0003A20307846454544284572676F446F780F
:100BF00020455A29205049443A2030783133303743
:100C0000284572676F446F7820455A29205645520F

View file

@ -188,6 +188,7 @@ extern const uint16_t fn_actions[];
#define SFT_T(kc) MT(0x2, kc)
#define ALT_T(kc) MT(0x4, kc)
#define GUI_T(kc) MT(0x8, kc)
#define ALL_T(kc) MT(0xF, kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/
// L-ayer, T-ap - 256 keycode max, 16 layer max
#define LT(layer, kc) (kc | 0x8000 | ((layer & 0xF) << 8))