Fixed issues, added unicode layer ⌬ ¯\_⩾ツ⩽_/¯

This commit is contained in:
Alex Johnstone 2016-03-27 20:14:03 -07:00
parent 2d90374912
commit d3e89b8cbd
2 changed files with 1198 additions and 1140 deletions

View File

@ -5,6 +5,7 @@
#define BASE 0 // default layer
#define SYMB 1 // symbols
#define MDIA 2 // media keys
#define UNIC 3 // unicode entry layer
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
@ -16,15 +17,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------|
* | Win | A | S | D | F | G |------| |------| H | J | K | L | :; | '" |
* |--------+------+------+------+------+------| Home | | End |------+------+------+------+------+--------|
* | LShift |Z/Alt | X | C | V | B | | | | N | M | , | . |//Alt| RShift |
* | LShift |Z/Alt | X | C | V | B | | | | N | M | , | . | Alt | RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |LCtrl | `~ | Hyper| Left | Right| | Down | Up | COPY | PASTE| RCtrl |
* |LCtrl | COPY | PASTE| Left | Right| | Down | Up |Hyper | `~ | RCtrl |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* Hyper = Ctrl+Super+Alt+Shift | Alt | F5 | | F2 | ~L2 |
* Hyper = Ctrl+Super+Alt+Shift | ~L3 | F5 | | F2 | ~L2 |
* ,------|------|------| |------+------+------.
* | | | PgUp | | Ins | | |
* | Space| BkSp |------| |------| ~L1 |Enter |
* | Enter| BkSp |------| |------| ~L1 |Space |
* | | | PgDn | | Del | | |
* `--------------------' `--------------------'
*/
@ -36,16 +37,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC,
KC_LGUI, KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSFT, ALT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_HOME,
KC_LCTRL, KC_GRV, ALL_T(KC_NO), KC_LEFT,KC_RGHT,
KC_LALT, KC_F5,
KC_LCTRL, LCTL(KC_C), LCTL(KC_V), KC_LEFT,KC_RGHT,
KC_FN3, KC_F5,
KC_PGUP,
KC_SPC,KC_BSPC,KC_PGDN,
// right hand
KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,
KC_END, KC_N, KC_M, KC_COMM,KC_DOT, ALT_T(KC_SLSH), KC_RSFT,
KC_DOWN,KC_UP, LCTL(KC_C),LCTL(KC_V), KC_RCTRL,
KC_END, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,
KC_DOWN,KC_UP, ALL_T(KC_NO),KC_GRV, KC_RCTRL,
KC_F2, KC_FN2,
KC_INS,
KC_DELT,KC_FN1, KC_ENT
@ -103,7 +104,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | | Prev | Next | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
* | | | | Lclk | Rclk | |VolDn |VolUp | Mute | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
@ -128,16 +129,61 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
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_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_WBAK
),
/* Keymap 3: Unicode Entry
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | Alt | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | + | + | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | Alt | | | E | | | | | | | 7 | 8 | 9 | + | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | Alt | A | | D | F | |------| |------| | 4 | 5 | 6 | + | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | Alt | | | C | | B | | | | | 1 | 2 | 3 | + | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | Alt | Alt | Alt | | | | 0 | 0 | 0 | + | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* WINDOWS ONLY SETUP!! | ~L3 | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | Alt | Alt |------| |------| Alt | Alt |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_*
[UNIC] = KEYMAP( // layer 3 : Unicode Entry
// left hand
KC_LALT, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6,
KC_LALT, KC_TRNS, KC_TRNS, KC_E, KC_TRNS, KC_TRNS, KC_TRNS,
KC_LALT, KC_A, KC_TRNS, KC_D, KC_F, KC_TRNS,
KC_LALT, KC_TRNS, KC_TRNS, KC_C, KC_TRNS, KC_B, KC_TRNS,
KC_LALT, KC_LALT, KC_LALT, KC_TRNS,KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_LALT,KC_LALT, KC_TRNS,
// right hand
KC_P7, KC_P8, KC_P9, KC_P0, KC_PPLS,KC_PPLS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_TRNS,
KC_TRNS, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_TRNS,
KC_P0, KC_P0, KC_P0, KC_PPLS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS,KC_LALT, KC_LALT
),
};
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB), // FN1 - Momentary Layer 1 (Symbols)
[2] = ACTION_LAYER_TAP_TOGGLE(MDIA) // FN2 - Momentary Layer 2 (Media)
[2] = ACTION_LAYER_TAP_TOGGLE(MDIA), // FN2 - Momentary Layer 2 (Media)
[3] = ACTION_LAYER_TAP_TOGGLE(UNIC) // FN3 - Momentary Layer 3 (Unicode entry)
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
@ -152,7 +198,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
}
case 3: // this would trigger when you hit a key mapped as M(3)
if (record->event.pressed) {
return MACRO( I(255), D(LALT), T(PPLS), T(P0), T(P0), T(A), T(P3), T(P0), U(LALT), END );
return MACRO( I(255), D(LALT), T(PPLS), T(P0), T(P0), T(A), T(P3), U(LALT), END );
}
break;
}
@ -160,12 +206,12 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
};
// Runs just one time when the keyboard initializes.
void * matrix_init_user(void) {
void matrix_init_user(void) {
};
// Runs constantly in the background, in a loop.
void * matrix_scan_user(void) {
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
@ -181,6 +227,9 @@ void * matrix_scan_user(void) {
case 2:
ergodox_right_led_2_on();
break;
case 3:
ergodox_right_led_3_on();
break;
default:
// none
break;

File diff suppressed because it is too large Load Diff