1
0
Fork 0

dz60 iso split - cleaned up the readme and replaced normal key with numpad key on numpad layer (#9339)

* README cleanup

* replaced "normal" numbers with "keypad" numbers:
KC_P4 replaced by KC_KP_P4

* replaced "normal" keys on Numpad Layer with the "KeyPad" keys
KC_1 replaced by KC_P1 etc.
This commit is contained in:
mcarni 2020-06-13 09:29:22 +02:00 committed by GitHub
parent 400423d10b
commit 1f42071238
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 95 additions and 61 deletions

View file

@ -112,12 +112,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------'
*/
[NL] = LAYOUT_60_iso_split(
// 1 2 3 4 5 6 7 8 9 10 11 12 13 14
TG(NL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, _______,
_______, KC_4, KC_5, KC_6, KC_PAST, KC_PSLS, _______, KC_4, KC_5, KC_6, KC_PAST, KC_PSLS, _______,
_______, KC_7, KC_8, KC_9, KC_PPLS, KC_PMNS, _______, KC_1, KC_2, KC_3, KC_PPLS, KC_PMNS, _______, _______,
_______, KC_0, KC_COMM, KC_DOT, KC_EQL, _______, _______, _______, KC_0, KC_COMM, KC_DOT, KC_EQL, _______,
_______, _______, _______, _______, MO(FL), _______, _______, _______, TG(RL), _______),
// 1 2 3 4 5 6 7 8 9 10 11 12 13 14
TG(NL), KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_PPLS, KC_PMNS, _______,
_______, KC_P4, KC_P5, KC_P6, KC_PAST, KC_PSLS, _______, KC_P4, KC_P5, KC_P6, KC_PAST, KC_PSLS, _______,
_______, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_PMNS, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PMNS, _______, _______,
_______, KC_P0, KC_COMM, KC_DOT, KC_PEQL, KC_PSLS, KC_PMNS, _______, KC_P0, KC_COMM, KC_DOT, KC_PEQL, _______,
_______, _______, _______, _______, MO(FL), _______, _______, _______, TG(RL), _______),
/* Keymap RL: RGB Layer
*
@ -150,6 +150,23 @@ void persistent_default_layer_set(uint16_t default_layer) {
default_layer_set(default_layer);
}
// always enable num lock on layer NL and disable on other layers
// thanks to spidey3 & Erovia on discord
layer_state_t layer_state_set_user(layer_state_t state) {
switch (get_highest_layer(state)) {
case NL:
if (!host_keyboard_led_state().num_lock) {
tap_code16(KC_NLCK);
}
break;
default: // for any other layers, or the default layer
if (host_keyboard_led_state().num_lock) {
tap_code16(KC_NLCK);
}
break;
}
return state;
}
// layer-activated RGB underglow
@ -172,11 +189,11 @@ void matrix_scan_user(void) {
break;
case NL:
RGB_NL_MODE;
// RGB_NL_LIGHT;
RGB_NL_LIGHT;
break;
case RL:
RGB_RL_MODE;
// RGB_RL_LIGHT;
RGB_RL_LIGHT;
break;
}