diff options
| author | MakotoKurauchi <pluis@me.com> | 2019-12-04 00:51:18 +0900 |
|---|---|---|
| committer | MechMerlin <30334081+mechmerlin@users.noreply.github.com> | 2019-12-03 07:51:18 -0800 |
| commit | 583be4a5f386c11c02a88f8e0869ec6a773cba7f (patch) | |
| tree | d23e82063972bcb05eb25efed516aebfc17effd1 | |
| parent | 24507ddca86069e1b1e87148a0c052bd47731476 (diff) | |
| download | qmk_firmware-583be4a5f386c11c02a88f8e0869ec6a773cba7f.tar.gz qmk_firmware-583be4a5f386c11c02a88f8e0869ec6a773cba7f.zip | |
Helix default keymap update (#7465)
* add RGBRST key into helix/pico:default keymap ADJUST layer
* update helix/rev2:default keymap's OLED display contents
* add RGBRST key to HELIX_ROWS == 4 ADJUST layer
* add CAPS key to RAISE, LOWER layer
* add layer status display on slave side oled
* add RGB LED status display on both side oled
* save stack memory size
| -rw-r--r-- | keyboards/helix/pico/keymaps/default/keymap.c | 4 | ||||
| -rw-r--r-- | keyboards/helix/rev2/keymaps/default/keymap.c | 89 |
2 files changed, 60 insertions, 33 deletions
diff --git a/keyboards/helix/pico/keymaps/default/keymap.c b/keyboards/helix/pico/keymaps/default/keymap.c index 8d1de894f..7cc3cb586 100644 --- a/keyboards/helix/pico/keymaps/default/keymap.c +++ b/keyboards/helix/pico/keymaps/default/keymap.c | |||
| @@ -146,7 +146,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 146 | 146 | ||
| 147 | /* Adjust (Lower + Raise) | 147 | /* Adjust (Lower + Raise) |
| 148 | * ,-----------------------------------------. ,-----------------------------------------. | 148 | * ,-----------------------------------------. ,-----------------------------------------. |
| 149 | * | | Reset| | | | | | | | | | | | | 149 | * | | Reset|RGBRST| | | | | | | | | | | |
| 150 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | 150 | * |------+------+------+------+------+------| |------+------+------+------+------+------| |
| 151 | * | |Aud on|Audoff|MU TOG|MU MOD| Mac | | Win |Qwerty|Colemk|Dvorak| | | | 151 | * | |Aud on|Audoff|MU TOG|MU MOD| Mac | | Win |Qwerty|Colemk|Dvorak| | | |
| 152 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | 152 | * |------+------+------+------+------+------| |------+------+------+------+------+------| |
| @@ -156,7 +156,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 156 | * `-------------------------------------------------------------------------------------------------' | 156 | * `-------------------------------------------------------------------------------------------------' |
| 157 | */ | 157 | */ |
| 158 | [_ADJUST] = LAYOUT( \ | 158 | [_ADJUST] = LAYOUT( \ |
| 159 | _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | 159 | _______, RESET, RGBRST, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ |
| 160 | _______, AU_ON, AU_OFF, MU_TOG, MU_MOD, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ | 160 | _______, AU_ON, AU_OFF, MU_TOG, MU_MOD, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ |
| 161 | _______, CK_TOGG, CK_RST, CK_UP, CK_DOWN, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ | 161 | _______, CK_TOGG, CK_RST, CK_UP, CK_DOWN, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ |
| 162 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD \ | 162 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD \ |
diff --git a/keyboards/helix/rev2/keymaps/default/keymap.c b/keyboards/helix/rev2/keymaps/default/keymap.c index 4b8b26ecd..78e3424fd 100644 --- a/keyboards/helix/rev2/keymaps/default/keymap.c +++ b/keyboards/helix/rev2/keymaps/default/keymap.c | |||
| @@ -126,7 +126,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 126 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | 126 | * |------+------+------+------+------+------| |------+------+------+------+------+------| |
| 127 | * | | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | | 127 | * | | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | |
| 128 | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| | 128 | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| |
| 129 | * | | F7 | F8 | F9 | F10 | F11 | ( | ) | F12 | | | Home | End | | | 129 | * | CAPS | F7 | F8 | F9 | F10 | F11 | ( | ) | F12 | | | Home | End | | |
| 130 | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| | 130 | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| |
| 131 | * | | | | | | | | | | | Next | Vol- | Vol+ | Play | | 131 | * | | | | | | | | | | | Next | Vol- | Vol+ | Play | |
| 132 | * `-------------------------------------------------------------------------------------------------' | 132 | * `-------------------------------------------------------------------------------------------------' |
| @@ -135,7 +135,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 135 | KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ | 135 | KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ |
| 136 | KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ | 136 | KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ |
| 137 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ | 137 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ |
| 138 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_LPRN, KC_RPRN, KC_F12, _______, _______, KC_HOME, KC_END, _______, \ | 138 | KC_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_LPRN, KC_RPRN, KC_F12, _______, _______, KC_HOME, KC_END, _______, \ |
| 139 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ | 139 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ |
| 140 | ), | 140 | ), |
| 141 | 141 | ||
| @@ -147,7 +147,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 147 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | 147 | * |------+------+------+------+------+------| |------+------+------+------+------+------| |
| 148 | * | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | | 148 | * | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | |
| 149 | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| | 149 | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| |
| 150 | * | | F7 | F8 | F9 | F10 | F11 | | | F12 | | |PageDn|PageUp| | | 150 | * | CAPS | F7 | F8 | F9 | F10 | F11 | | | F12 | | |PageDn|PageUp| | |
| 151 | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| | 151 | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| |
| 152 | * | | | | | | | | | | | Next | Vol- | Vol+ | Play | | 152 | * | | | | | | | | | | | Next | Vol- | Vol+ | Play | |
| 153 | * `-------------------------------------------------------------------------------------------------' | 153 | * `-------------------------------------------------------------------------------------------------' |
| @@ -156,7 +156,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 156 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ | 156 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ |
| 157 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ | 157 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ |
| 158 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ | 158 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ |
| 159 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, KC_F12, _______, _______, KC_PGDN, KC_PGUP, _______, \ | 159 | KC_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, KC_F12, _______, _______, KC_PGDN, KC_PGUP, _______, \ |
| 160 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ | 160 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ |
| 161 | ), | 161 | ), |
| 162 | 162 | ||
| @@ -278,7 +278,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 278 | 278 | ||
| 279 | /* Adjust (Lower + Raise) | 279 | /* Adjust (Lower + Raise) |
| 280 | * ,-----------------------------------------. ,-----------------------------------------. | 280 | * ,-----------------------------------------. ,-----------------------------------------. |
| 281 | * | | Reset| | | | | | | | | | | Del | | 281 | * | | Reset|RGBRST| | | | | | | | | | Del | |
| 282 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | 282 | * |------+------+------+------+------+------| |------+------+------+------+------+------| |
| 283 | * | | | |Aud on|Audoff| Mac | | Win |Qwerty|Colemk|Dvorak| | | | 283 | * | | | |Aud on|Audoff| Mac | | Win |Qwerty|Colemk|Dvorak| | | |
| 284 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | 284 | * |------+------+------+------+------+------| |------+------+------+------+------+------| |
| @@ -288,7 +288,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 288 | * `-------------------------------------------------------------------------------------------------' | 288 | * `-------------------------------------------------------------------------------------------------' |
| 289 | */ | 289 | */ |
| 290 | [_ADJUST] = LAYOUT( \ | 290 | [_ADJUST] = LAYOUT( \ |
| 291 | _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ | 291 | _______, RESET, RGBRST, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ |
| 292 | _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ | 292 | _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ |
| 293 | _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ | 293 | _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ |
| 294 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD \ | 294 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD \ |
| @@ -526,35 +526,37 @@ void matrix_update(struct CharacterMatrix *dest, | |||
| 526 | 526 | ||
| 527 | static void render_logo(struct CharacterMatrix *matrix) { | 527 | static void render_logo(struct CharacterMatrix *matrix) { |
| 528 | 528 | ||
| 529 | static char logo[]={ | 529 | static const char helix_logo[] PROGMEM ={ |
| 530 | 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, | 530 | 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, |
| 531 | 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, | 531 | 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, |
| 532 | 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4, | 532 | 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4, |
| 533 | 0}; | 533 | 0}; |
| 534 | matrix_write(matrix, logo); | 534 | matrix_write_P(matrix, helix_logo); |
| 535 | //matrix_write_P(&matrix, PSTR(" Split keyboard kit")); | 535 | //matrix_write_P(&matrix, PSTR(" Split keyboard kit")); |
| 536 | } | 536 | } |
| 537 | 537 | ||
| 538 | 538 | static void render_rgbled_status(bool full, struct CharacterMatrix *matrix) { | |
| 539 | 539 | #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_ANIMATIONS) | |
| 540 | void render_status(struct CharacterMatrix *matrix) { | 540 | char buf[30]; |
| 541 | 541 | if(rgblight_config.enable) { | |
| 542 | // Render to mode icon | 542 | if (full) { |
| 543 | static char logo[][2][3]={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}}; | 543 | snprintf(buf, sizeof(buf), " LED %2d: %d,%d,%d ", |
| 544 | if(keymap_config.swap_lalt_lgui==false){ | 544 | rgblight_config.mode, |
| 545 | matrix_write(matrix, logo[0][0]); | 545 | rgblight_config.hue/RGBLIGHT_HUE_STEP, |
| 546 | matrix_write_P(matrix, PSTR("\n")); | 546 | rgblight_config.sat/RGBLIGHT_SAT_STEP, |
| 547 | matrix_write(matrix, logo[0][1]); | 547 | rgblight_config.val/RGBLIGHT_VAL_STEP); |
| 548 | }else{ | 548 | } else { |
| 549 | matrix_write(matrix, logo[1][0]); | 549 | snprintf(buf, sizeof(buf), "[%2d] ",rgblight_config.mode); |
| 550 | matrix_write_P(matrix, PSTR("\n")); | 550 | } |
| 551 | matrix_write(matrix, logo[1][1]); | 551 | matrix_write(matrix, buf); |
| 552 | } | 552 | } |
| 553 | #endif | ||
| 554 | } | ||
| 553 | 555 | ||
| 556 | static void render_layer_status(struct CharacterMatrix *matrix) { | ||
| 554 | // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below | 557 | // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below |
| 555 | char buf[40]; | 558 | char buf[10]; |
| 556 | snprintf(buf,sizeof(buf), "Undef-%ld", layer_state); | 559 | matrix_write_P(matrix, PSTR("Layer: ")); |
| 557 | matrix_write_P(matrix, PSTR("\nLayer: ")); | ||
| 558 | switch (layer_state) { | 560 | switch (layer_state) { |
| 559 | case L_BASE: | 561 | case L_BASE: |
| 560 | matrix_write_P(matrix, PSTR("Default")); | 562 | matrix_write_P(matrix, PSTR("Default")); |
| @@ -570,16 +572,39 @@ void render_status(struct CharacterMatrix *matrix) { | |||
| 570 | matrix_write_P(matrix, PSTR("Adjust")); | 572 | matrix_write_P(matrix, PSTR("Adjust")); |
| 571 | break; | 573 | break; |
| 572 | default: | 574 | default: |
| 575 | matrix_write_P(matrix, PSTR("Undef-")); | ||
| 576 | snprintf(buf,sizeof(buf), "%ld", layer_state); | ||
| 573 | matrix_write(matrix, buf); | 577 | matrix_write(matrix, buf); |
| 574 | } | 578 | } |
| 579 | } | ||
| 580 | |||
| 581 | void render_status(struct CharacterMatrix *matrix) { | ||
| 582 | |||
| 583 | // Render to mode icon | ||
| 584 | static const char os_logo[][2][3] PROGMEM ={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}}; | ||
| 585 | if(keymap_config.swap_lalt_lgui==false){ | ||
| 586 | matrix_write_P(matrix, os_logo[0][0]); | ||
| 587 | matrix_write_P(matrix, PSTR("\n")); | ||
| 588 | matrix_write_P(matrix, os_logo[0][1]); | ||
| 589 | }else{ | ||
| 590 | matrix_write_P(matrix, os_logo[1][0]); | ||
| 591 | matrix_write_P(matrix, PSTR("\n")); | ||
| 592 | matrix_write_P(matrix, os_logo[1][1]); | ||
| 593 | } | ||
| 594 | |||
| 595 | matrix_write_P(matrix, PSTR(" ")); | ||
| 596 | render_layer_status(matrix); | ||
| 597 | matrix_write_P(matrix, PSTR("\n")); | ||
| 575 | 598 | ||
| 576 | // Host Keyboard LED Status | 599 | // Host Keyboard LED Status |
| 577 | char led[40]; | 600 | matrix_write_P(matrix, (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? |
| 578 | snprintf(led, sizeof(led), "\n%s %s %s", | 601 | PSTR("NUMLOCK") : PSTR(" ")); |
| 579 | (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? "NUMLOCK" : " ", | 602 | matrix_write_P(matrix, (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? |
| 580 | (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? "CAPS" : " ", | 603 | PSTR("CAPS") : PSTR(" ")); |
| 581 | (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " "); | 604 | matrix_write_P(matrix, (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? |
| 582 | matrix_write(matrix, led); | 605 | PSTR("SCLK") : PSTR(" ")); |
| 606 | matrix_write_P(matrix, PSTR("\n")); | ||
| 607 | render_rgbled_status(true, matrix); | ||
| 583 | } | 608 | } |
| 584 | 609 | ||
| 585 | 610 | ||
| @@ -597,6 +622,8 @@ void iota_gfx_task_user(void) { | |||
| 597 | render_status(&matrix); | 622 | render_status(&matrix); |
| 598 | }else{ | 623 | }else{ |
| 599 | render_logo(&matrix); | 624 | render_logo(&matrix); |
| 625 | render_rgbled_status(false, &matrix); | ||
| 626 | render_layer_status(&matrix); | ||
| 600 | } | 627 | } |
| 601 | matrix_update(&display, &matrix); | 628 | matrix_update(&display, &matrix); |
| 602 | } | 629 | } |
