From a486aec34cc7f3413f389b8eb0d83887c7bb1e78 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Mon, 26 Apr 2021 13:16:16 +0100 Subject: [PATCH] Add a qwerty layer --- keyboard/ergodox/keymap_max.c | 64 +++++++++++++++++++++++++++++++---- 1 file changed, 57 insertions(+), 7 deletions(-) diff --git a/keyboard/ergodox/keymap_max.c b/keyboard/ergodox/keymap_max.c index fe1eb26d..e1fe2ec8 100644 --- a/keyboard/ergodox/keymap_max.c +++ b/keyboard/ergodox/keymap_max.c @@ -40,11 +40,11 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | LAlt | Home | BkSp | | Del | End | RAlt | | RCtrl | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | | | | PgUp | PgDn | + * | | L1 | | PgUp | PgDn | * ,------|------|------| |------+------+------. * | | | | | RAlt | | | * |Space | LCtrl|------| |------| LAlt | Enter| - * | | | LGui | | ~L1 | | | + * | | | LGui | | ~L2 | | | * `--------------------' `--------------------' */ @@ -55,7 +55,7 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LSFT,A, R, S, T, D, NUBS,Z, X, C, V, B, NO, NO, NO, LALT, HOME ,BSPC, - NO, NO, + NO, FN1, NO, SPC,LCTL, LGUI, // right hand @@ -66,11 +66,60 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { DEL, END, RALT,NO, RCTL, PGUP,PGDN, RALT, - FN1,LALT, ENT + FN2,LALT, ENT ), /* - * Layer 1: Function keys + * Keymap 1: Default qwerty Layer + * + * This is a general purpose Colemak layout which should serve as a good + * basis for your own custom layout. Mac users may want to swap the + * position of the Alt and GUI keys. + * + * ,--------------------------------------------------. ,-------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | ~# | | | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | + | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | LShift | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | \ | Z | X | C | V | B | | | | N | M | , | . | / | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | LAlt | Home | BkSp | | Del | End | RAlt | | RCtrl | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | L0 | | PgUp | PgDn | + * ,------|------|------| |------+------+------. + * | | | | | RAlt | | | + * |Space | LCtrl|------| |------| LAlt | Enter| + * | | | LGui | | ~L2 | | | + * `--------------------' `--------------------' + */ + + KEYMAP( + // left hand + ESC, 1, 2, 3, 4, 5, NUHS, + TAB, Q, W, E, R, T, LBRC, + LSFT,A, S, D, F, G, + NUBS,Z, X, C, V, B, NO, + NO, NO, LALT, HOME ,BSPC, + NO, FN0, + NO, + SPC,LCTL, LGUI, + // right hand + NO, 6, 7, 8, 9, 0, MINS, + RBRC,Y, U, I, O, P, EQL, + H, J, K, L, SCLN,QUOT, + NO, N, M, COMM,DOT, SLSH,RSFT, + DEL, END, RALT,NO, RCTL, + PGUP,PGDN, + RALT, + FN2,LALT, ENT + ), + + + /* + * Layer 2: Function keys * * This layer contains function keys, and media keys. * * Most of the non-modifier keys are marked as NO, so it's immediately @@ -116,6 +165,7 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS, TRNS,TRNS,TRNS ) + }; /* id for user defined functions */ @@ -129,8 +179,8 @@ enum function_id { const action_t PROGMEM fn_actions[] = { // Layer shifting [0] = ACTION_LAYER_SET(0, ON_PRESS), // Switch to Layer 0 - [1] = ACTION_LAYER_MOMENTARY(1), // Momentarily switch to layer 1 - [2] = ACTION_LAYER_SET(2, ON_PRESS), // Switch to Layer 2 + [1] = ACTION_LAYER_SET(1, ON_PRESS), // Switch to Layer 1 + [2] = ACTION_LAYER_MOMENTARY(2), // Momentarily switch to layer 2 // Teensy [31] = ACTION_FUNCTION(TEENSY_KEY), -- 2.46.2