6 // Each layer gets a name for readability, which is then used in the keymap matrix below.
7 // The underscores don't mean anything - you can have a layer called STUFF or any other name.
8 // Layer names don't all need to be of the same length, obviously, and you can also skip them
9 // entirely and just use numbers.
14 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
15 /* Keymap _BL: (Base Layer) Default Layer
16 * .-------------------.
18 * |-------------------|
22 * |-------------------|
26 * '-------------------'
29 LT(_FL, KC_NLCK), KC_PSLS, KC_PAST, KC_PMNS, \
30 KC_P7, KC_P8, KC_P9, KC_PPLS, \
31 KC_P4, KC_P5, KC_P6, \
32 KC_P1, KC_P2, KC_P3, KC_PENT, \
35 /* Keymap _FL: Function Layer
36 * .-------------------.
38 * |-------------------|
41 * | Fn3|BL_S| Fn2| Fn6|
42 * |-------------------|
46 * '-------------------'
49 LT(_FL, KC_NLCK), KC_TRNS, KC_TRNS, F(0), \
50 KC_TRNS, F(4), KC_TRNS, F(6), \
51 F(3), BL_STEP, F(2), \
52 KC_TRNS, F(5), KC_TRNS, F(7), \
67 const uint16_t PROGMEM fn_actions[] = {
68 [0] = ACTION_FUNCTION(RGBLED_TOGGLE),
69 [1] = ACTION_FUNCTION(RGBLED_STEP_MODE),
70 [2] = ACTION_FUNCTION(RGBLED_INCREASE_HUE),
71 [3] = ACTION_FUNCTION(RGBLED_DECREASE_HUE),
72 [4] = ACTION_FUNCTION(RGBLED_INCREASE_SAT),
73 [5] = ACTION_FUNCTION(RGBLED_DECREASE_SAT),
74 [6] = ACTION_FUNCTION(RGBLED_INCREASE_VAL),
75 [7] = ACTION_FUNCTION(RGBLED_DECREASE_VAL),
78 void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
81 if (record->event.pressed) {
85 case RGBLED_INCREASE_HUE:
86 if (record->event.pressed) {
87 rgblight_increase_hue();
90 case RGBLED_DECREASE_HUE:
91 if (record->event.pressed) {
92 rgblight_decrease_hue();
95 case RGBLED_INCREASE_SAT:
96 if (record->event.pressed) {
97 rgblight_increase_sat();
100 case RGBLED_DECREASE_SAT:
101 if (record->event.pressed) {
102 rgblight_decrease_sat();
105 case RGBLED_INCREASE_VAL:
106 if (record->event.pressed) {
107 rgblight_increase_val();
110 case RGBLED_DECREASE_VAL:
111 if (record->event.pressed) {
112 rgblight_decrease_val();
115 case RGBLED_STEP_MODE:
116 if (record->event.pressed) {