Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to my keymaps and userspace #4447

Merged
merged 9 commits into from
Nov 18, 2018
27 changes: 19 additions & 8 deletions keyboards/niu_mini/keymaps/spacebarracecar/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

enum layers {
_BASE,
_LOWER,
_RAISE
_RAISE,
_LOWER
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
Expand Down Expand Up @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_LOWER] = LAYOUT_ortho_4x12(
DE_TILD, DE_EXLM, DE_DQOT, DE_HASH, DE_DLR, DE_PERC, CU_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, _______,
_______, DE_AT, CTRLX, CTRLC, CTRLV, XXXXXXX, XXXXXXX, DE_UNDS, DE_PLUS, DE_LCBR, DE_RCBR, DE_PIPE,
_______, DE_EURO, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______,
_______, DE_EURO, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DE_MINS, CU_EQL, CU_LBRC, CU_RBRC, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),

Expand All @@ -64,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_RAISE] = LAYOUT_ortho_4x12(
CU_GRV, DE_1, DE_2, CU_3, DE_4, DE_5, CU_6, CU_7, CU_8, CU_9, CU_0, _______,
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DE_MINS, CU_EQL, CU_LBRC, CU_RBRC, CU_BSLS,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),

Expand All @@ -89,21 +89,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

/* Navigation
,-----------------------------------------------------------------------------------------------------------------------.
|ESCT |PageDown |Up |PageUp |Home | | | |Win+Up | | |Del |
|ALT F4 |PageDown |Up |PageUp |Home | | | |Win+Up | | |Del |
|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
| |Left |Down |Right |End | | |Win+Left |Win+Down |Win+Right| |Enter |
|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
| |Prev |Pause |Next |LowerVol |RaiseVol |Mute | | | | | |
|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
|RESET | | | | | | | | | | |Game |
|RESET |ESCT | | | | | | | | | |Game |
`-----------------------------------------------------------------------------------------------------------------------'
*/

[_NAV] = LAYOUT_ortho_4x12(
CU_ESCT, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL,
ALTF4, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL,
_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, GUIL, GUID, GUIR, RGB_M_P, KC_ENT,
_______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, RGB_TOG, RGB_MOD, RGB_HUI, CU_RGBV, _______,
RESET, _______, _______, _______, _______, KC_SPC, KC_ENT, _______, _______, _______, _______, CU_GAME
RESET, CU_ESCT, _______, _______, _______, KC_SPC, KC_ENT, _______, _______, _______, _______, CU_GAME
)

};
Expand All @@ -121,6 +121,17 @@ switch (keycode) {
} else {
return true;
}
case KC_LALT:
if (game) {
if (record->event.pressed){
layer_on(_RAISE);
} else {
layer_off(_RAISE);
}
return false;
} else {
return true;
}
default:
return true;
}
Expand Down
25 changes: 18 additions & 7 deletions keyboards/planck/keymaps/spacebarracecar/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

enum layers {
_BASE,
_LOWER,
_RAISE,
_LOWER,
_MUSICMODE
};

Expand Down Expand Up @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_LOWER] = LAYOUT_ortho_4x12(
DE_TILD, DE_EXLM, DE_DQOT, DE_HASH, DE_DLR, DE_PERC, CU_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, _______,
_______, DE_AT, CTRLX, CTRLC, CTRLV, XXXXXXX, XXXXXXX, DE_UNDS, DE_PLUS, DE_LCBR, DE_RCBR, DE_PIPE,
_______, DE_EURO, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______,
_______, DE_EURO, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DE_MINS, CU_EQL, CU_LBRC, CU_RBRC, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),

Expand All @@ -65,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_RAISE] = LAYOUT_ortho_4x12(
CU_GRV, DE_1, DE_2, CU_3, DE_4, DE_5, CU_6, CU_7, CU_8, CU_9, CU_0, _______,
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DE_MINS, CU_EQL, CU_LBRC, CU_RBRC, CU_BSLS,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),

Expand Down Expand Up @@ -97,21 +97,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

/* Navigation
,-----------------------------------------------------------------------------------------------------------------------.
|ESCT |PageDown |Up |PageUp |Home | | | |Win+Up | | |Del |
|ALT F4 |PageDown |Up |PageUp |Home | | | |Win+Up | | |Del |
|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
| |Left |Down |Right |End | | |Win+Left |Win+Down |Win+Right| |Enter |
|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
| |Prev |Pause |Next |LowerVol |RaiseVol |Mute | | | | | |
|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------|
|RESET | | | | | | | | | | |Game |
|RESET |ESCT | | | | | | | | | |Game |
`-----------------------------------------------------------------------------------------------------------------------'
*/

[_NAV] = LAYOUT_ortho_4x12(
CU_ESCT, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL,
ALTF4, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL,
_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, GUIL, GUID, GUIR, XXXXXXX, KC_ENT,
_______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, MU_ON, XXXXXXX, XXXXXXX, XXXXXXX, _______,
RESET, _______, _______, _______, _______, KC_SPC, KC_ENT, _______, _______, _______, _______, CU_GAME
RESET, CU_ESCT, _______, _______, _______, KC_SPC, KC_ENT, _______, _______, _______, _______, CU_GAME
)

};
Expand All @@ -129,6 +129,17 @@ switch (keycode) {
} else {
return true;
}
case KC_LALT:
if (game) {
if (record->event.pressed){
layer_on(_RAISE);
} else {
layer_off(_RAISE);
}
return false;
} else {
return true;
}
case MU_ON:
if(record->event.pressed) {
layer_off(_LOWER);
Expand Down
Loading