Keymap: Improvements to Maxr1998's Contra keymap (#3535)
* Add image * Improvements to my Contra layout * Quick fix for Level3 layer
This commit is contained in:
parent
bb86d8a00c
commit
9d016767e8
3 changed files with 20 additions and 49 deletions
|
@ -20,19 +20,13 @@
|
||||||
enum contra_layers {
|
enum contra_layers {
|
||||||
_QWERTZ,
|
_QWERTZ,
|
||||||
_FUNC,
|
_FUNC,
|
||||||
_NUMPAD,
|
|
||||||
_NUMROW
|
_NUMROW
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define KC_I3 LM(_NUMROW, MOD_LALT)
|
||||||
|
#define KC_NR MO(_NUMROW)
|
||||||
|
#define NR_L3 SAFE_RANGE
|
||||||
#define FUN MO(_FUNC)
|
#define FUN MO(_FUNC)
|
||||||
#define NPK TT(_NUMPAD)
|
|
||||||
//#define SPEC_S LM(_NUMROW, (KC_LSFT))
|
|
||||||
//#define SPEC_L3 LM(_NUMROW, (DE_ALGR))
|
|
||||||
|
|
||||||
enum custom_keycodes {
|
|
||||||
SPEC_S = SAFE_RANGE,
|
|
||||||
SPEC_L3
|
|
||||||
};
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
@ -44,21 +38,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
* | Shift| Y | X | C | V | B | N | M | , | . | Up | Shift|
|
* | Shift| Y | X | C | V | B | N | M | , | . | Up | Shift|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | Ctrl | Sup | Alt | NumP | Spec | Space | Sp_A | Fun | Left | Down | Right|
|
* | Ctrl | Sup | Alt | i3 | NumR | Space | Spec | Fun | Left | Down | Right|
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_QWERTZ] = {
|
[_QWERTZ] = {
|
||||||
{KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
|
{KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
|
||||||
{KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_PLUS, KC_ENT },
|
{KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_PLUS, KC_ENT },
|
||||||
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSFT},
|
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSFT},
|
||||||
{KC_LCTL, KC_LGUI, KC_LALT, NPK, SPEC_S, KC_SPC, KC_SPC, SPEC_L3, FUN, KC_LEFT, KC_DOWN, KC_RGHT}
|
{KC_LCTL, KC_LGUI, KC_LALT, KC_I3, KC_NR, KC_SPC, KC_SPC, NR_L3, FUN, KC_LEFT, KC_DOWN, KC_RGHT}
|
||||||
},
|
},
|
||||||
|
|
||||||
/* Function layer
|
/* Function layer
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
* | | | | | | | | Ü | | Ö | | Del |
|
* | | | | | | | | Ü | | Ö | | Del |
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
* | Lock | Ä | | | | | | RGBS | RGBB | RGBS | | |
|
* | Lock | Ä | ß | | | | | RGBS | RGBB | RGBS | | |
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
* | | | | | | | | RGBH-| RGBT | RGBH+| PgUp | |
|
* | | | | | | | | RGBH-| RGBT | RGBH+| PgUp | |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
@ -67,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
*/
|
*/
|
||||||
[_FUNC] = {
|
[_FUNC] = {
|
||||||
{_______, _______, _______, _______, _______, _______, _______, DE_UE, _______, DE_OE, _______, KC_DEL },
|
{_______, _______, _______, _______, _______, _______, _______, DE_UE, _______, DE_OE, _______, KC_DEL },
|
||||||
{KC_LOCK, DE_AE, _______, _______, _______, _______, _______, RGB_M_P, RGB_M_B, RGB_M_SW,_______, _______},
|
{KC_LOCK, DE_AE, DE_SS, _______, _______, _______, _______, RGB_M_P, RGB_M_B, RGB_M_SW,_______, _______},
|
||||||
{_______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_TOG, RGB_HUI, KC_PGUP, _______},
|
{_______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_TOG, RGB_HUI, KC_PGUP, _______},
|
||||||
{_______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_END }
|
{_______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_END }
|
||||||
},
|
},
|
||||||
|
@ -76,51 +70,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
* | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ß |
|
* | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ß |
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
* | | | | | | | | | | | | |
|
* | | | | | | | | | | | #' | |
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
* | | ><| | | | | | | | | | _ - | |
|
* | | <> | | | | | | | | | | -_ | |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | | | | ---- | ---- | | | ---- | ---- | | | |
|
* | | | | ---- | ---- | | | ---- | ---- | | | |
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_NUMROW] = {
|
[_NUMROW] = {
|
||||||
{_______, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, DE_SS },
|
{_______, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, DE_SS },
|
||||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DE_HASH, _______},
|
||||||
{_______, DE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______},
|
{_______, DE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______},
|
||||||
{_______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______}
|
{_______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______}
|
||||||
},
|
|
||||||
|
|
||||||
/* Numpad layer
|
|
||||||
* ,-----------------------------------------------------------------------------------.
|
|
||||||
* | | + | 7 | 8 | 9 | | | | | | | |
|
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
|
||||||
* | | - | 4 | 5 | 6 | | | | | | | |
|
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
|
||||||
* | | * | 1 | 2 | 3 | | | | | | | |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | | / | 0 | ---- | ---- | | | ---- | ---- | | | |
|
|
||||||
* `-----------------------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
[_NUMPAD] = {
|
|
||||||
{DEBUG, KC_PPLS, KC_P7, KC_P8, KC_P9, _______, _______, _______, _______, _______, _______, _______},
|
|
||||||
{_______, KC_PMNS, KC_P4, KC_P5, KC_P6, _______, _______, _______, _______, _______, _______, _______},
|
|
||||||
{_______, KC_PAST, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, _______, _______, _______},
|
|
||||||
{_______, KC_PSLS, KC_P0, _______, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
switch (keycode) {
|
if (keycode == NR_L3) {
|
||||||
case SPEC_S:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
register_code(KC_LSFT);
|
|
||||||
layer_on(_NUMROW);
|
|
||||||
} else {
|
|
||||||
layer_off(_NUMROW);
|
|
||||||
unregister_code(KC_LSFT);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
case SPEC_L3:
|
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
register_code(DE_ALGR);
|
register_code(DE_ALGR);
|
||||||
layer_on(_NUMROW);
|
layer_on(_NUMROW);
|
||||||
|
@ -129,9 +95,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
unregister_code(DE_ALGR);
|
unregister_code(DE_ALGR);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
default:
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void led_set_user(uint8_t usb_led) {
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
# Contra Layout by Maxr1998
|
# Contra Layout by Maxr1998
|
||||||
|
![img](https://i.imgur.com/dVnnRDT.jpg)
|
|
@ -1,8 +1,13 @@
|
||||||
RGBLIGHT_ENABLE = yes
|
RGBLIGHT_ENABLE = yes
|
||||||
KEY_LOCK_ENABLE = yes
|
KEY_LOCK_ENABLE = yes
|
||||||
|
|
||||||
|
EXTRAFLAGS += -flto
|
||||||
|
UNICODE_ENABLE = no
|
||||||
|
MOUSEKEY_ENABLE = no
|
||||||
|
|
||||||
### Debugging ###
|
### Debugging ###
|
||||||
#CONSOLE_ENABLE = yes
|
CONSOLE_ENABLE = no # yes
|
||||||
|
COMMAND_ENABLE = no
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
ifndef QUANTUM_DIR
|
||||||
include ../../../../Makefile
|
include ../../../../Makefile
|
||||||
|
|
Loading…
Reference in a new issue