summaryrefslogtreecommitdiff
path: root/keyboards/mechlovin/adelais/keymaps
diff options
context:
space:
mode:
authormechlovin <57231893+mechlovin@users.noreply.github.com>2022-08-10 01:20:36 +0700
committerGitHub <noreply@github.com>2022-08-09 11:20:36 -0700
commit94b3efe92e192a20fda3cfa4fa0f200011bba924 (patch)
tree93988163a876610201b01a6c5daf5bcf653ea054 /keyboards/mechlovin/adelais/keymaps
parent336c4904b52ec60b116fe18a1351b38b0a344ab7 (diff)
change Adelais En Ciel rev. 3 from STM32F303 to APM32F103 MCU (#16964)
Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'keyboards/mechlovin/adelais/keymaps')
-rw-r--r--keyboards/mechlovin/adelais/keymaps/default/keymap.c58
-rw-r--r--keyboards/mechlovin/adelais/keymaps/via/keymap.c64
2 files changed, 114 insertions, 8 deletions
diff --git a/keyboards/mechlovin/adelais/keymaps/default/keymap.c b/keyboards/mechlovin/adelais/keymaps/default/keymap.c
index 2a38663ed2..3a33b59d1c 100644
--- a/keyboards/mechlovin/adelais/keymaps/default/keymap.c
+++ b/keyboards/mechlovin/adelais/keymaps/default/keymap.c
@@ -22,7 +22,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_SPC, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_BSLS, MO(1), KC_RSFT, KC_UP,
KC_LCTL, KC_LALT, KC_SPC, MO(2), KC_SPC, KC_RALT, KC_RCTL ),
- [0] = LAYOUT_all(
+ [1] = LAYOUT_all(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ),
+ [2] = LAYOUT_all(
+ RESET, KC_TRNS, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_PSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_PAST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_P0, KC_PDOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ),
+ [3] = LAYOUT_all(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
@@ -35,9 +47,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
- tap_code(KC_VOLU);
- } else {
tap_code(KC_VOLD);
+ } else {
+ tap_code(KC_VOLU);
}
}
else if (index == 1) {
@@ -58,3 +70,43 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
}
#endif
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ if (record->event.pressed) {
+ switch(keycode) {
+ case KC_F13: // toggle rgb matrix
+ rgb_matrix_toggle();
+ return false;
+ case KC_F14:
+ rgb_matrix_step();
+ return false;
+ case KC_F15:
+ rgb_matrix_increase_speed();
+ return false;
+ case KC_F16:
+ rgb_matrix_decrease_speed();
+ return false;
+ case KC_F17:
+ rgb_matrix_increase_hue();
+ return false;
+ case KC_F18:
+ rgb_matrix_decrease_hue();
+ return false;
+ case KC_F19:
+ rgb_matrix_increase_sat();
+ return false;
+ case KC_F20:
+ rgb_matrix_decrease_sat();
+ return false;
+ case KC_F21:
+ rgb_matrix_increase_val();
+ return false;
+ case KC_F22:
+ rgb_matrix_decrease_val();
+ return false;
+ default:
+ break;
+ }
+ }
+ return true;
+}
diff --git a/keyboards/mechlovin/adelais/keymaps/via/keymap.c b/keyboards/mechlovin/adelais/keymaps/via/keymap.c
index 6ab566e1c3..e9ed9b6a36 100644
--- a/keyboards/mechlovin/adelais/keymaps/via/keymap.c
+++ b/keyboards/mechlovin/adelais/keymaps/via/keymap.c
@@ -15,6 +15,20 @@
*/
#include QMK_KEYBOARD_H
+enum my_keycodes {
+ BL_TOG = USER00,
+ BL_EFFECT = USER01,
+ BL_ISPD = USER02,
+ BL_DSPD = USER03,
+ BL_IHUE = USER04,
+ BL_DHUE = USER05,
+ BL_ISAT = USER06,
+ BL_DSAT = USER07,
+ BL_IVAL = USER08,
+ BL_DVAL = USER09
+};
+
+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all(
KC_SPC, KC_ESC, 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_BSPC, KC_DEL,
@@ -29,11 +43,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ),
[2] = LAYOUT_all(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ),
+ RESET, KC_TRNS, BL_TOG, BL_EFFECT, BL_ISPD, BL_DSPD, BL_IHUE, BL_DHUE, BL_ISAT, BL_DSAT, BL_IVAL, BL_DVAL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_PSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_PAST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_P0, KC_PDOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ),
[3] = LAYOUT_all(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
@@ -70,3 +84,43 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
}
#endif
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ if (record->event.pressed) {
+ switch(keycode) {
+ case BL_TOG: // toggle rgb matrix
+ rgb_matrix_toggle();
+ return false;
+ case BL_EFFECT:
+ rgb_matrix_step();
+ return false;
+ case BL_ISPD:
+ rgb_matrix_increase_speed();
+ return false;
+ case BL_DSPD:
+ rgb_matrix_decrease_speed();
+ return false;
+ case BL_IHUE:
+ rgb_matrix_increase_hue();
+ return false;
+ case BL_DHUE:
+ rgb_matrix_decrease_hue();
+ return false;
+ case BL_ISAT:
+ rgb_matrix_increase_sat();
+ return false;
+ case BL_DSAT:
+ rgb_matrix_decrease_sat();
+ return false;
+ case BL_IVAL:
+ rgb_matrix_increase_val();
+ return false;
+ case BL_DVAL:
+ rgb_matrix_decrease_val();
+ return false;
+ default:
+ break;
+ }
+ }
+ return true;
+}