summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManna Harbour <51143715+manna-harbour@users.noreply.github.com>2019-11-30 10:48:11 +1100
committerDrashna Jaelre <drashna@live.com>2019-11-29 15:48:11 -0800
commit27bf464dc373cbc68fd166520776648e3465e014 (patch)
tree72af1bf604da0b30ad52e520cc30e168577e999f
parentfb02593bd4d58c8d046673ed872d972544640a2a (diff)
[Keymap] Add RGB keycodes to keymap, enable RGB_MATRIX on crkbd (#7499)
-rw-r--r--keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h17
-rw-r--r--keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk4
-rw-r--r--users/manna-harbour_miryoku/manna-harbour_miryoku.c9
-rw-r--r--users/manna-harbour_miryoku/miryoku.org58
4 files changed, 82 insertions, 6 deletions
diff --git a/keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h b/keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h
new file mode 100644
index 0000000000..4b8f78a650
--- /dev/null
+++ b/keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h
@@ -0,0 +1,17 @@
+
+// generated from users/manna-harbour_miryoku/miryoku.org
+
+#pragma once
+
+#define EE_HANDS
+
+#ifdef RGB_MATRIX_ENABLE
+#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
+#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
+#define RGB_MATRIX_HUE_STEP 8
+#define RGB_MATRIX_SAT_STEP 8
+#define RGB_MATRIX_VAL_STEP 8
+#define RGB_MATRIX_SPD_STEP 10
+#endif
diff --git a/keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk b/keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk
new file mode 100644
index 0000000000..f62c86e932
--- /dev/null
+++ b/keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk
@@ -0,0 +1,4 @@
+
+# generated from users/manna-harbour_miryoku/miryoku.org
+
+RGB_MATRIX_ENABLE = WS2812
diff --git a/users/manna-harbour_miryoku/manna-harbour_miryoku.c b/users/manna-harbour_miryoku/manna-harbour_miryoku.c
index a50677008a..740e3830f9 100644
--- a/users/manna-harbour_miryoku/manna-harbour_miryoku.c
+++ b/users/manna-harbour_miryoku/manna-harbour_miryoku.c
@@ -6,7 +6,14 @@
#define KC_NP KC_NO // key is not present
#define KC_NA KC_NO // present but not available for use
#define KC_NU KC_NO // available but not used
+
+// non-KC_ keycodes
#define KC_RST RESET
+#define KC_TOG RGB_TOG
+#define KC_MOD RGB_MOD
+#define KC_HUI RGB_HUI
+#define KC_SAI RGB_SAI
+#define KC_VAI RGB_VAI
enum layers { BASE, MEDR, NAVR, MOUR, NSSL, NSL, FUNL };
@@ -30,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_NP, KC_NP, KC_NA, KC_NA, KC_NA, KC_BTN3, KC_BTN1, KC_BTN2, KC_NP, KC_NP
),
[MEDR] = LAYOUT_miryoku(
- KC_RST, KC_NA, KC_NA, KC_NA, KC_NA, KC_NU, KC_NU, KC_NU, KC_NU, KC_NU,
+ KC_RST, KC_NA, KC_NA, KC_NA, KC_NA, KC_TOG, KC_MOD, KC_HUI, KC_SAI, KC_VAI,
KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, KC_NA, KC_NU, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT,
KC_NA, KC_ALGR, KC_NA, KC_NA, KC_NA, KC_NU, KC_NU, KC_NU, KC_NU, KC_NU,
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 c352df8fdd..2733cbceaf 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.
*** Media (MEDR)
Tertiary RH layer is media control, with volume up / down and next / prev
-mirroring the navigation keys. Pause, stop and mute are on thumbs. Unused keys
-are available for other related functions.
+mirroring the navigation keys. Pause, stop and mute are on thumbs. RGB control
+is on the top row (combine with shift to invert). Unused keys are available for
+other related functions.
#+NAME: medr
-| | | | | |
+| TOG | MOD | HUI | SAI | VAI |
| | MPRV | VOLD | VOLU | MNXT |
| | | | | |
| MSTP | MPLY | MUTE | NP | NP |
@@ -413,7 +414,14 @@ Contains the keymap. Included from keymap.c
#define KC_NP KC_NO // key is not present
#define KC_NA KC_NO // present but not available for use
#define KC_NU KC_NO // available but not used
+
+// non-KC_ keycodes
#define KC_RST RESET
+#define KC_TOG RGB_TOG
+#define KC_MOD RGB_MOD
+#define KC_HUI RGB_HUI
+#define KC_SAI RGB_SAI
+#define KC_VAI RGB_VAI
<<table-enums()>>
@@ -464,6 +472,7 @@ Build options. Automatically included.
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+
#+END_SRC
@@ -561,11 +570,12 @@ To use the keymap on a keyboard which does not support the layouts feature,
LAYOUT_miryoku is defined as a macro mapping onto the keyboard's own LAYOUT
macro, leaving the unused keys as KC_NO. The userspace keymap is then included.
-
*** crkbd
The outer columns are unused.
+**** keymap.c
+
[[../../keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c][keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c]]
#+BEGIN_SRC C :noweb yes :tangle ../../keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c
@@ -588,10 +598,48 @@ KC_NO, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, KC_
#+END_SRC
+
+**** config.h
+
+[[../../keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h][keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h]]
+#+BEGIN_SRC C :noweb yes :tangle ../../keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h
+
+// <<header>>
+
+#pragma once
+
+#define EE_HANDS
+
+#ifdef RGB_MATRIX_ENABLE
+#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
+#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
+#define RGB_MATRIX_HUE_STEP 8
+#define RGB_MATRIX_SAT_STEP 8
+#define RGB_MATRIX_VAL_STEP 8
+#define RGB_MATRIX_SPD_STEP 10
+#endif
+
+#+END_SRC
+
+
+**** rules.mk
+
+[[../../keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk][keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk]]
+#+BEGIN_SRC C :noweb yes :tangle ../../keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk
+
+# <<header>>
+
+RGB_MATRIX_ENABLE = WS2812
+
+#+END_SRC
+
+
To build for this keyboard,
#+BEGIN_SRC sh :tangle no
-cd ../.. && make crkbd:manna-harbour_miryoku:avrdude
+cd ../.. && make crkbd:manna-harbour_miryoku:flash
#+END_SRC