diff options
| author | Manna Harbour <51143715+manna-harbour@users.noreply.github.com> | 2019-11-30 10:48:11 +1100 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2019-11-29 15:48:11 -0800 |
| commit | 27bf464dc373cbc68fd166520776648e3465e014 (patch) | |
| tree | 72af1bf604da0b30ad52e520cc30e168577e999f /users/manna-harbour_miryoku | |
| parent | fb02593bd4d58c8d046673ed872d972544640a2a (diff) | |
| download | qmk_firmware-27bf464dc373cbc68fd166520776648e3465e014.tar.gz qmk_firmware-27bf464dc373cbc68fd166520776648e3465e014.zip | |
[Keymap] Add RGB keycodes to keymap, enable RGB_MATRIX on crkbd (#7499)
Diffstat (limited to 'users/manna-harbour_miryoku')
| -rw-r--r-- | users/manna-harbour_miryoku/manna-harbour_miryoku.c | 9 | ||||
| -rw-r--r-- | users/manna-harbour_miryoku/miryoku.org | 58 |
2 files changed, 61 insertions, 6 deletions
diff --git a/users/manna-harbour_miryoku/manna-harbour_miryoku.c b/users/manna-harbour_miryoku/manna-harbour_miryoku.c index a50677008..740e3830f 100644 --- a/users/manna-harbour_miryoku/manna-harbour_miryoku.c +++ b/users/manna-harbour_miryoku/manna-harbour_miryoku.c | |||
| @@ -6,7 +6,14 @@ | |||
| 6 | #define KC_NP KC_NO // key is not present | 6 | #define KC_NP KC_NO // key is not present |
| 7 | #define KC_NA KC_NO // present but not available for use | 7 | #define KC_NA KC_NO // present but not available for use |
| 8 | #define KC_NU KC_NO // available but not used | 8 | #define KC_NU KC_NO // available but not used |
| 9 | |||
| 10 | // non-KC_ keycodes | ||
| 9 | #define KC_RST RESET | 11 | #define KC_RST RESET |
| 12 | #define KC_TOG RGB_TOG | ||
| 13 | #define KC_MOD RGB_MOD | ||
| 14 | #define KC_HUI RGB_HUI | ||
| 15 | #define KC_SAI RGB_SAI | ||
| 16 | #define KC_VAI RGB_VAI | ||
| 10 | 17 | ||
| 11 | enum layers { BASE, MEDR, NAVR, MOUR, NSSL, NSL, FUNL }; | 18 | enum layers { BASE, MEDR, NAVR, MOUR, NSSL, NSL, FUNL }; |
| 12 | 19 | ||
| @@ -30,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 30 | KC_NP, KC_NP, KC_NA, KC_NA, KC_NA, KC_BTN3, KC_BTN1, KC_BTN2, KC_NP, KC_NP | 37 | KC_NP, KC_NP, KC_NA, KC_NA, KC_NA, KC_BTN3, KC_BTN1, KC_BTN2, KC_NP, KC_NP |
| 31 | ), | 38 | ), |
| 32 | [MEDR] = LAYOUT_miryoku( | 39 | [MEDR] = LAYOUT_miryoku( |
| 33 | KC_RST, KC_NA, KC_NA, KC_NA, KC_NA, KC_NU, KC_NU, KC_NU, KC_NU, KC_NU, | 40 | KC_RST, KC_NA, KC_NA, KC_NA, KC_NA, KC_TOG, KC_MOD, KC_HUI, KC_SAI, KC_VAI, |
| 34 | KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, KC_NA, KC_NU, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, | 41 | KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, KC_NA, KC_NU, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, |
| 35 | KC_NA, KC_ALGR, KC_NA, KC_NA, KC_NA, KC_NU, KC_NU, KC_NU, KC_NU, KC_NU, | 42 | KC_NA, KC_ALGR, KC_NA, KC_NA, KC_NA, KC_NU, KC_NU, KC_NU, KC_NU, KC_NU, |
| 36 | KC_NP, KC_NP, KC_NA, KC_NA, KC_NA, KC_MSTP, KC_MPLY, KC_MUTE, KC_NP, KC_NP | 43 | KC_NP, KC_NP, KC_NA, KC_NA, KC_NA, KC_MSTP, KC_MPLY, KC_MUTE, KC_NP, KC_NP |
diff --git a/users/manna-harbour_miryoku/miryoku.org b/users/manna-harbour_miryoku/miryoku.org index c352df8fd..2733cbcea 100644 --- a/users/manna-harbour_miryoku/miryoku.org +++ b/users/manna-harbour_miryoku/miryoku.org | |||
| @@ -134,11 +134,12 @@ the home position. Unused keys are available for other related functions. | |||
| 134 | *** Media (MEDR) | 134 | *** Media (MEDR) |
| 135 | 135 | ||
| 136 | Tertiary RH layer is media control, with volume up / down and next / prev | 136 | Tertiary RH layer is media control, with volume up / down and next / prev |
| 137 | mirroring the navigation keys. Pause, stop and mute are on thumbs. Unused keys | 137 | mirroring the navigation keys. Pause, stop and mute are on thumbs. RGB control |
| 138 | are available for other related functions. | 138 | is on the top row (combine with shift to invert). Unused keys are available for |
| 139 | other related functions. | ||
| 139 | 140 | ||
| 140 | #+NAME: medr | 141 | #+NAME: medr |
| 141 | | | | | | | | 142 | | TOG | MOD | HUI | SAI | VAI | |
| 142 | | | MPRV | VOLD | VOLU | MNXT | | 143 | | | MPRV | VOLD | VOLU | MNXT | |
| 143 | | | | | | | | 144 | | | | | | | |
| 144 | | MSTP | MPLY | MUTE | NP | NP | | 145 | | MSTP | MPLY | MUTE | NP | NP | |
| @@ -413,7 +414,14 @@ Contains the keymap. Included from keymap.c | |||
| 413 | #define KC_NP KC_NO // key is not present | 414 | #define KC_NP KC_NO // key is not present |
| 414 | #define KC_NA KC_NO // present but not available for use | 415 | #define KC_NA KC_NO // present but not available for use |
| 415 | #define KC_NU KC_NO // available but not used | 416 | #define KC_NU KC_NO // available but not used |
| 417 | |||
| 418 | // non-KC_ keycodes | ||
| 416 | #define KC_RST RESET | 419 | #define KC_RST RESET |
| 420 | #define KC_TOG RGB_TOG | ||
| 421 | #define KC_MOD RGB_MOD | ||
| 422 | #define KC_HUI RGB_HUI | ||
| 423 | #define KC_SAI RGB_SAI | ||
| 424 | #define KC_VAI RGB_VAI | ||
| 417 | 425 | ||
| 418 | <<table-enums()>> | 426 | <<table-enums()>> |
| 419 | 427 | ||
| @@ -464,6 +472,7 @@ Build options. Automatically included. | |||
| 464 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | 472 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) |
| 465 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 473 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
| 466 | 474 | ||
| 475 | |||
| 467 | #+END_SRC | 476 | #+END_SRC |
| 468 | 477 | ||
| 469 | 478 | ||
| @@ -561,11 +570,12 @@ To use the keymap on a keyboard which does not support the layouts feature, | |||
| 561 | LAYOUT_miryoku is defined as a macro mapping onto the keyboard's own LAYOUT | 570 | LAYOUT_miryoku is defined as a macro mapping onto the keyboard's own LAYOUT |
| 562 | macro, leaving the unused keys as KC_NO. The userspace keymap is then included. | 571 | macro, leaving the unused keys as KC_NO. The userspace keymap is then included. |
| 563 | 572 | ||
| 564 | |||
| 565 | *** crkbd | 573 | *** crkbd |
| 566 | 574 | ||
| 567 | The outer columns are unused. | 575 | The outer columns are unused. |
| 568 | 576 | ||
| 577 | **** keymap.c | ||
| 578 | |||
| 569 | [[../../keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c][keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c]] | 579 | [[../../keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c][keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c]] |
| 570 | #+BEGIN_SRC C :noweb yes :tangle ../../keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c | 580 | #+BEGIN_SRC C :noweb yes :tangle ../../keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c |
| 571 | 581 | ||
| @@ -588,10 +598,48 @@ KC_NO, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, KC_ | |||
| 588 | 598 | ||
| 589 | #+END_SRC | 599 | #+END_SRC |
| 590 | 600 | ||
| 601 | |||
| 602 | **** config.h | ||
| 603 | |||
| 604 | [[../../keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h][keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h]] | ||
| 605 | #+BEGIN_SRC C :noweb yes :tangle ../../keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h | ||
| 606 | |||
| 607 | // <<header>> | ||
| 608 | |||
| 609 | #pragma once | ||
| 610 | |||
| 611 | #define EE_HANDS | ||
| 612 | |||
| 613 | #ifdef RGB_MATRIX_ENABLE | ||
| 614 | #define RGB_MATRIX_KEYPRESSES // reacts to keypresses | ||
| 615 | #define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended | ||
| 616 | #define RGB_MATRIX_FRAMEBUFFER_EFFECTS | ||
| 617 | #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. | ||
| 618 | #define RGB_MATRIX_HUE_STEP 8 | ||
| 619 | #define RGB_MATRIX_SAT_STEP 8 | ||
| 620 | #define RGB_MATRIX_VAL_STEP 8 | ||
| 621 | #define RGB_MATRIX_SPD_STEP 10 | ||
| 622 | #endif | ||
| 623 | |||
| 624 | #+END_SRC | ||
| 625 | |||
| 626 | |||
| 627 | **** rules.mk | ||
| 628 | |||
| 629 | [[../../keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk][keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk]] | ||
| 630 | #+BEGIN_SRC C :noweb yes :tangle ../../keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk | ||
| 631 | |||
| 632 | # <<header>> | ||
| 633 | |||
| 634 | RGB_MATRIX_ENABLE = WS2812 | ||
| 635 | |||
| 636 | #+END_SRC | ||
| 637 | |||
| 638 | |||
| 591 | To build for this keyboard, | 639 | To build for this keyboard, |
| 592 | 640 | ||
| 593 | #+BEGIN_SRC sh :tangle no | 641 | #+BEGIN_SRC sh :tangle no |
| 594 | cd ../.. && make crkbd:manna-harbour_miryoku:avrdude | 642 | cd ../.. && make crkbd:manna-harbour_miryoku:flash |
| 595 | #+END_SRC | 643 | #+END_SRC |
| 596 | 644 | ||
| 597 | 645 | ||
