1
0
Fork 0

Convert Encoder callbacks to be boolean functions (#12805)

Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
This commit is contained in:
Drashna Jaelre 2021-05-21 23:17:32 -07:00 committed by GitHub
parent 76c23b15ab
commit a0fed0ea17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
437 changed files with 2542 additions and 2135 deletions

View file

@ -53,15 +53,15 @@ If you are using different pinouts for the encoders on each half of a split keyb
The callback functions can be inserted into your `<keyboard>.c`: The callback functions can be inserted into your `<keyboard>.c`:
```c ```c
void encoder_update_kb(uint8_t index, bool clockwise) { bool encoder_update_kb(uint8_t index, bool clockwise) {
encoder_update_user(index, clockwise); return encoder_update_user(index, clockwise);
} }
``` ```
or `keymap.c`: or `keymap.c`:
```c ```c
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
if (clockwise) { if (clockwise) {
tap_code(KC_PGDN); tap_code(KC_PGDN);
@ -75,9 +75,12 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_UP); tap_code(KC_UP);
} }
} }
return true;
} }
``` ```
!> If you return `true`, this will allow the keyboard level code to run, as well. Returning `false` will override the keyboard level code. Depending on how the keyboard level function is set up.
## Hardware ## Hardware
The A an B lines of the encoders should be wired directly to the MCU, and the C/common lines should be wired to ground. The A an B lines of the encoders should be wired directly to the MCU, and the C/common lines should be wired to ground.

View file

@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* rotary encoder (SW3) - add more else if blocks for more granular layer control */ /* rotary encoder (SW3) - add more else if blocks for more granular layer control */
#ifdef ENCODER_ENABLE #ifdef ENCODER_ENABLE
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (IS_LAYER_ON(_RGB)) { if (IS_LAYER_ON(_RGB)) {
#ifdef RGBLIGHT_ENABLE #ifdef RGBLIGHT_ENABLE
if (clockwise) { if (clockwise) {
@ -72,6 +72,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD); tap_code(KC_VOLD);
} }
} }
return true;
} }
#endif #endif

View file

@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* rotary encoder (SW3) - add more else if blocks for more granular layer control */ /* rotary encoder (SW3) - add more else if blocks for more granular layer control */
#ifdef ENCODER_ENABLE #ifdef ENCODER_ENABLE
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (IS_LAYER_ON(_RGB)) { if (IS_LAYER_ON(_RGB)) {
#ifdef RGBLIGHT_ENABLE #ifdef RGBLIGHT_ENABLE
if (clockwise) { if (clockwise) {
@ -72,6 +72,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code16(C(A(KC_DOWN))); tap_code16(C(A(KC_DOWN)));
} }
} }
return true;
} }
#endif #endif

View file

@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* rotary encoder (SW3) - add more else if blocks for more granular layer control */ /* rotary encoder (SW3) - add more else if blocks for more granular layer control */
#ifdef ENCODER_ENABLE #ifdef ENCODER_ENABLE
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (IS_LAYER_ON(_RGB)) { if (IS_LAYER_ON(_RGB)) {
#ifdef RGBLIGHT_ENABLE #ifdef RGBLIGHT_ENABLE
if (clockwise) { if (clockwise) {
@ -72,6 +72,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD); tap_code(KC_VOLD);
} }
} }
return true;
} }
#endif #endif

View file

@ -13,7 +13,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/
/* Keymap _0: (Base Layer) Default Layer /* Keymap _0: (Base Layer) Default Layer
* .-----. * .-----.
* |PGUP | * |PGUP |
* |-----------------. * |-----------------.
* | 7 | 8 | 9 | * | 7 | 8 | 9 |
* |-----|-----|-----| * |-----|-----|-----|
@ -37,12 +37,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT( [0] = LAYOUT(
KC_PGUP, KC_PGUP,
KC_KP_7, KC_KP_8, MO(1), KC_KP_7, KC_KP_8, MO(1),
KC_P4, KC_P5, KC_P6, KC_P4, KC_P5, KC_P6,
KC_P1, KC_P2, KC_P3), KC_P1, KC_P2, KC_P3),
[1] = LAYOUT( [1] = LAYOUT(
KC_NUMLOCK, KC_NUMLOCK,
RGB_TOG, RGB_MOD, RGB_M_K, RGB_TOG, RGB_MOD, RGB_M_K,
RGB_SAI, RGB_SAD, RGB_HUI, RGB_SAI, RGB_SAD, RGB_HUI,
@ -58,14 +58,15 @@ static void render_logo(void) {
void oled_task_user(void) { render_logo(); } void oled_task_user(void) { render_logo(); }
#endif #endif
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
if (clockwise) { if (clockwise) {
tap_code(KC_PGDN); tap_code(KC_PGDN);
} else { } else {
tap_code(KC_PGUP); tap_code(KC_PGUP);
} }
} }
return true;
} }

View file

@ -9,11 +9,11 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.*/ along with this program. If not, see <http://www.gnu.org/licenses/>.*/
/* Keymap _0: (Base Layer) Default Layer /* Keymap _0: (Base Layer) Default Layer
* .-----. * .-----.
* |PGUP | * |PGUP |
* |-----------------. * |-----------------.
* | 7 | 8 | 9 | * | 7 | 8 | 9 |
* |-----|-----|-----| * |-----|-----|-----|
@ -37,12 +37,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT( [0] = LAYOUT(
KC_PGUP, KC_PGUP,
KC_KP_7, KC_KP_8, MO(1), KC_KP_7, KC_KP_8, MO(1),
KC_P4, KC_P5, KC_P6, KC_P4, KC_P5, KC_P6,
KC_P1, KC_P2, KC_P3), KC_P1, KC_P2, KC_P3),
[1] = LAYOUT( [1] = LAYOUT(
KC_NUMLOCK, KC_NUMLOCK,
RGB_TOG, RGB_MOD, RGB_M_K, RGB_TOG, RGB_MOD, RGB_M_K,
RGB_SAI, RGB_SAD, RGB_HUI, RGB_SAI, RGB_SAD, RGB_HUI,
@ -58,14 +58,15 @@ static void render_logo(void) {
void oled_task_user(void) { render_logo(); } void oled_task_user(void) { render_logo(); }
#endif #endif
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
if (clockwise) { if (clockwise) {
tap_code(KC_PGDN); tap_code(KC_PGDN);
} else { } else {
tap_code(KC_PGUP); tap_code(KC_PGUP);
} }
} }
return true;
} }

View file

@ -27,7 +27,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef ENCODER_ENABLE #ifdef ENCODER_ENABLE
#include "encoder.h" #include "encoder.h"
void encoder_update_user(int8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
if (clockwise) { if (clockwise) {
tap_code(KC_VOLU); tap_code(KC_VOLU);
@ -35,5 +35,6 @@ void encoder_update_user(int8_t index, bool clockwise) {
tap_code(KC_VOLD); tap_code(KC_VOLD);
} }
} }
return true;
} }
#endif #endif

View file

@ -2,7 +2,7 @@
#include "encoder.h" #include "encoder.h"
#ifdef ENCODER_ENABLED #ifdef ENCODER_ENABLED
void encoder_update_kb(int8_t index, bool clockwise) { bool encoder_update_kb(uint8_t index, bool clockwise) {
encoder_update_user(index, clockwise); return encoder_update_user(index, clockwise);
} }
#endif #endif

View file

@ -16,7 +16,7 @@ void matrix_init_user(void) {
void encoder_update_user(int8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { if (index == 0) {
if (clockwise) { if (clockwise) {
tap_code(KC_PGUP); tap_code(KC_PGUP);
@ -24,5 +24,5 @@ void encoder_update_user(int8_t index, bool clockwise) {
tap_code(KC_PGDN); tap_code(KC_PGDN);
} }
} }
return true;
} }

View file

@ -14,7 +14,7 @@ void matrix_init_user(void) {
debug_config.enable = 1; debug_config.enable = 1;
} }
void encoder_update_user(int8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { if (index == 0) {
if (clockwise) { if (clockwise) {
tap_code16(C(KC_T)); tap_code16(C(KC_T));
@ -22,5 +22,5 @@ void encoder_update_user(int8_t index, bool clockwise) {
tap_code16(C(KC_W)); tap_code16(C(KC_W));
} }
} }
return true;
} }

View file

@ -14,7 +14,7 @@ void matrix_init_user(void) {
debug_config.enable = 1; debug_config.enable = 1;
} }
void encoder_update_user(int8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { if (index == 0) {
if (clockwise) { if (clockwise) {
tap_code(KC_VOLU); tap_code(KC_VOLU);
@ -22,4 +22,5 @@ void encoder_update_user(int8_t index, bool clockwise) {
tap_code(KC_VOLD); tap_code(KC_VOLD);
} }
} }
return true;
} }

View file

@ -1,20 +1,20 @@
/* /*
Copyright 2020 Alec Penland Copyright 2020 Alec Penland
Copyright 2020 Garret Gartner Copyright 2020 Garret Gartner
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or the Free Software Foundation, either version 2 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
@ -31,7 +31,7 @@ enum ats_layers{
#define RS_SLS RSFT_T(KC_SLSH) #define RS_SLS RSFT_T(KC_SLSH)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Default QWERTY layer /* Default QWERTY layer
* *
* Esc Q W E R T Y U I O P DelBkS PgU * Esc Q W E R T Y U I O P DelBkS PgU
* *
@ -96,7 +96,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
return state; return state;
} }
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { if (index == 0) {
if (clockwise) { if (clockwise) {
tap_code(KC_VOLU); tap_code(KC_VOLU);
@ -104,4 +104,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD); tap_code(KC_VOLD);
} }
} }
return true;
} }

View file

@ -1,20 +1,20 @@
/* /*
Copyright 2020 Alec Penland Copyright 2020 Alec Penland
Copyright 2020 Garret Gartner Copyright 2020 Garret Gartner
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or the Free Software Foundation, either version 2 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
@ -31,7 +31,7 @@ enum ats_layers{
#define RS_SLS RSFT_T(KC_SLSH) #define RS_SLS RSFT_T(KC_SLSH)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Default QWERTY layer /* Default QWERTY layer
* *
* Esc Q W E R T Y U I O P DelBkS PgU * Esc Q W E R T Y U I O P DelBkS PgU
* *
@ -96,7 +96,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
return state; return state;
} }
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { if (index == 0) {
if (clockwise) { if (clockwise) {
tap_code(KC_VOLU); tap_code(KC_VOLU);
@ -104,4 +104,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD); tap_code(KC_VOLD);
} }
} }
return true;
} }

View file

@ -73,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
) )
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { if (index == 0) {
switch (get_highest_layer(layer_state)) { switch (get_highest_layer(layer_state)) {
case _BASE: case _BASE:
@ -93,7 +93,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break; break;
case _RAISE: case _RAISE:
if (clockwise) { if (clockwise) {
tap_code16(LCTL(KC_RGHT)); tap_code16(LCTL(KC_RGHT));
} else { } else {
tap_code16(LCTL(KC_LEFT)); tap_code16(LCTL(KC_LEFT));
@ -120,6 +120,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break; break;
} }
} }
return true;
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {

View file

@ -115,9 +115,9 @@ void matrix_scan_user(void) {
tap_code16(G(KC_D)); tap_code16(G(KC_D));
} }
} }
} }
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
uint8_t layer = get_highest_layer(layer_state); uint8_t layer = get_highest_layer(layer_state);
if (index == 0) { if (index == 0) {
if (clockwise) { if (clockwise) {
@ -126,4 +126,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code16(dynamic_keymap_get_keycode(layer, 10, 0)); tap_code16(dynamic_keymap_get_keycode(layer, 10, 0));
} }
} }
} return true;
}

View file

@ -78,7 +78,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
) )
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
uint8_t layer = get_highest_layer(layer_state); uint8_t layer = get_highest_layer(layer_state);
if (index == 0) { if (index == 0) {
if (clockwise) { if (clockwise) {
@ -87,4 +87,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code16(dynamic_keymap_get_keycode(layer, 10, 0)); tap_code16(dynamic_keymap_get_keycode(layer, 10, 0));
} }
} }
return true;
} }

View file

@ -75,12 +75,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
), ),
[_LOWER] = LAYOUT( [_LOWER] = LAYOUT(
NICKURL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, NICKURL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
_______, KC_F11, KC_F12, RGB_MODE_PLAIN, RGB_MODE_BREATHE, RGB_MODE_RAINBOW, RGB_MODE_SWIRL, RGB_MODE_SNAKE, RGB_MODE_KNIGHT, RGB_MODE_GRADIENT, XXXXXXX, RGB_TOG, _______, KC_F11, KC_F12, RGB_MODE_PLAIN, RGB_MODE_BREATHE, RGB_MODE_RAINBOW, RGB_MODE_SWIRL, RGB_MODE_SNAKE, RGB_MODE_KNIGHT, RGB_MODE_GRADIENT, XXXXXXX, RGB_TOG,
_______, X(LOVEEYES), X(THINK), X(UPSIDEDOWN), X(NOMOUTH), X(PARTY), X(PEACH), X(HEART), X(EGGPLANT), X(EMOJI100), X(EMOJIB), RGB_HUI, _______, X(LOVEEYES), X(THINK), X(UPSIDEDOWN), X(NOMOUTH), X(PARTY), X(PEACH), X(HEART), X(EGGPLANT), X(EMOJI100), X(EMOJIB), RGB_HUI,
KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______ KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______
) )
}; };
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
@ -93,7 +93,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} }
return true; return true;
break; break;
case ALTTAB: case ALTTAB:
if (record->event.pressed) { if (record->event.pressed) {
tap_code16(A(KC_TAB)); tap_code16(A(KC_TAB));
@ -108,7 +108,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} }
void dip_switch_update_user(uint8_t index, bool active) { void dip_switch_update_user(uint8_t index, bool active) {
switch (index) { switch (index) {
case 0: case 0:
if(active) { if(active) {
@ -132,7 +132,7 @@ void matrix_init_user(void) {
set_unicode_input_mode(UC_WINC); set_unicode_input_mode(UC_WINC);
} }
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
switch(get_highest_layer(layer_state)) { switch(get_highest_layer(layer_state)) {
case _BASE: case _BASE:
@ -145,4 +145,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
clockwise ? tap_code(KC_MEDIA_NEXT_TRACK) : tap_code(KC_MEDIA_PREV_TRACK); clockwise ? tap_code(KC_MEDIA_NEXT_TRACK) : tap_code(KC_MEDIA_PREV_TRACK);
break; break;
} }
return true;
} }

View file

@ -31,7 +31,7 @@ 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_VOLD, KC_TRNS) KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS)
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
if (clockwise) { if (clockwise) {
tap_code(KC_VOLU); tap_code(KC_VOLU);
@ -39,4 +39,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD); tap_code(KC_VOLD);
} }
} }
return true;
} }

View file

@ -43,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}*/ }*/
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
if (clockwise) { if (clockwise) {
tap_code(KC_VOLU); tap_code(KC_VOLU);
@ -63,4 +63,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
backlight_decrease(); backlight_decrease();
} }
} }
} return true;
}

View file

@ -43,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}*/ }*/
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
if (clockwise) { if (clockwise) {
tap_code(KC_O); tap_code(KC_O);
@ -63,4 +63,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_R); tap_code(KC_R);
} }
} }
} return true;
}

View file

@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_MUTE, RGB_TOG, KC_DEL,KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_MUTE, RGB_TOG, KC_DEL,KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
KC_LCTL, KC_LALT, KC_LGUI, LALT(KC_TAB), KC_LOWER, KC_SPC, KC_ENT, KC_ENT, KC_SPC, KC_RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT KC_LCTL, KC_LALT, KC_LGUI, LALT(KC_TAB), KC_LOWER, KC_SPC, KC_ENT, KC_ENT, KC_SPC, KC_RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
), ),
[_LOWER] = LAYOUT( [_LOWER] = LAYOUT(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
KC_PSLS, KC_P7, KC_P8, KC_P9, KC_NLCK, _______, _______, _______, _______, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_F12, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_NLCK, _______, _______, _______, _______, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_F12,
@ -52,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______,
_______, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT, _______ _______, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT, _______
), ),
[_RAISE] = LAYOUT( [_RAISE] = LAYOUT(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
KC_PSLS, KC_P7, KC_P8, KC_P9, KC_NLCK, _______, _______, _______, _______, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_F12, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_NLCK, _______, _______, _______, _______, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_F12,
@ -308,7 +308,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef ENCODER_ENABLE #ifdef ENCODER_ENABLE
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { if (index == 0) {
if (clockwise) { if (clockwise) {
tap_code(KC_VOLU); tap_code(KC_VOLU);
@ -322,6 +322,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
rgblight_step_reverse(); rgblight_step_reverse();
} }
} }
return true;
} }
#endif #endif

View file

@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_MUTE, RGB_TOG, KC_DEL,KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_MUTE, RGB_TOG, KC_DEL,KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
KC_LCTL, KC_LALT, KC_LGUI, LALT(KC_TAB), KC_LOWER, KC_SPC, KC_ENT, KC_ENT, KC_SPC, KC_RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT KC_LCTL, KC_LALT, KC_LGUI, LALT(KC_TAB), KC_LOWER, KC_SPC, KC_ENT, KC_ENT, KC_SPC, KC_RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
), ),
[_LOWER] = LAYOUT( [_LOWER] = LAYOUT(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
KC_PSLS, KC_P7, KC_P8, KC_P9, KC_NLCK, _______, _______, _______, _______, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_F12, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_NLCK, _______, _______, _______, _______, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_F12,
@ -55,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______,
_______, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT, _______ _______, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT, _______
), ),
[_RAISE] = LAYOUT( [_RAISE] = LAYOUT(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
KC_PSLS, KC_P7, KC_P8, KC_P9, KC_NLCK, _______, _______, _______, _______, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_F12, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_NLCK, _______, _______, _______, _______, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_F12,
@ -311,7 +311,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef ENCODER_ENABLE #ifdef ENCODER_ENABLE
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { if (index == 0) {
if (clockwise) { if (clockwise) {
tap_code(KC_VOLU); tap_code(KC_VOLU);
@ -325,6 +325,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
rgblight_step_reverse(); rgblight_step_reverse();
} }
} }
return true;
} }
#endif #endif

View file

@ -16,7 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef ENCODER_ENABLE #ifdef ENCODER_ENABLE
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { if (index == 0) {
if (clockwise) { if (clockwise) {
tap_code(KC_VOLU); tap_code(KC_VOLU);
@ -30,6 +30,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP); tap_code(KC_PGUP);
} }
} }
return true;
} }
#endif #endif

View file

@ -105,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
), ),
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* Left encoder */ if (index == 0) { /* Left encoder */
switch (get_highest_layer(layer_state)) { switch (get_highest_layer(layer_state)) {
case _QWERTY: case _QWERTY:
@ -146,4 +146,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP); tap_code(KC_PGUP);
} }
} }
return true;
} }

View file

@ -105,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
), ),
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* Left encoder */ if (index == 0) { /* Left encoder */
switch (get_highest_layer(layer_state)) { switch (get_highest_layer(layer_state)) {
case _QWERTY: case _QWERTY:
@ -146,4 +146,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP); tap_code(KC_PGUP);
} }
} }
} return true;
}

View file

@ -1,17 +1,17 @@
/* Copyright 2020 Aplyard /* Copyright 2020 Aplyard
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or * the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
@ -22,15 +22,15 @@ enum layer_names {
}; };
#define KC_COPY LCTL(KC_C) //Mac, change it to LGUI(KC_C) #define KC_COPY LCTL(KC_C) //Mac, change it to LGUI(KC_C)
#define KC_CUT LCTL(KC_X) // >> >> LGUI(KC_X) #define KC_CUT LCTL(KC_X) // >> >> LGUI(KC_X)
#define KC_PASTE LCTL(KC_V) // >> >> LGUI(KC_V) #define KC_PASTE LCTL(KC_V) // >> >> LGUI(KC_V)
//#define KC_MY_COMPUTER LGUI(KC_SPC) //Uncomment this for Mac Spotlight Search //#define KC_MY_COMPUTER LGUI(KC_SPC) //Uncomment this for Mac Spotlight Search
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap __MEDIA: Default Layer /* Keymap __MEDIA: Default Layer
* ,----------------------------------. * ,----------------------------------.
* | .-------. / / / / / / | * | .-------. / / / / / / |
* | | | |------|------|------| | * | | | |------|------|------| |
* | | Pro | | Mute | Play |Vol+/-| | * | | Pro | | Mute | Play |Vol+/-| |
* | | Micro | |------|------|------| | * | | Micro | |------|------|------| |
* | | | |----------------------| * | | | |----------------------|
@ -43,10 +43,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_MUTE, KC_MPLY, TO(1), KC_MUTE, KC_MPLY, TO(1),
KC_MPRV, KC_MSTP, KC_MNXT KC_MPRV, KC_MSTP, KC_MNXT
), ),
/* Keymap __DOC /* Keymap __DOC
* ,----------------------------------. * ,----------------------------------.
* | .-------. / / / / / / | * | .-------. / / / / / / |
* | | | |------|------|------| | * | | | |------|------|------| |
* | | Pro | | Home | PgUp | L/R | | * | | Pro | | Home | PgUp | L/R | |
* | | Micro | |------|------|------| | * | | Micro | |------|------|------| |
* | | | |----------------------| * | | | |----------------------|
@ -59,10 +59,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_HOME, KC_PGUP, TO(2), KC_HOME, KC_PGUP, TO(2),
KC_END, KC_PGDN, KC_INS KC_END, KC_PGDN, KC_INS
), ),
/* Keymap __DOC /* Keymap __DOC
* ,----------------------------------. * ,----------------------------------.
* | .-------. / / / / / / | * | .-------. / / / / / / |
* | | | |------|------|------| | * | | | |------|------|------| |
* | | Pro | | Calc | MyPc |Bright| | * | | Pro | | Calc | MyPc |Bright| |
* | | Micro | |------|------|------| | * | | Micro | |------|------|------| |
* | | | |----------------------| * | | | |----------------------|
@ -82,22 +82,22 @@ static void render_logo(void) {
//Logo for _MEDIA //Logo for _MEDIA
static const char PROGMEM logo1[] = { static const char PROGMEM logo1[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64, 0, 32, 32,160,160,160,160, 32, 32, 0, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64, 0, 32, 32,160,160,160,160, 32, 32, 0, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64,160,144, 8,252,129, 0, 60,126,255,255,255,255,255,255,255,255,126, 60, 0,129,252, 8,144,160, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254,254, 0, 0, 0, 0, 0, 0,144,144,144,144,240, 0, 0, 48,224,128, 0, 0,224, 48, 0,192,224,176,144,144,240,192, 0, 0,240,240, 16, 16, 0,128,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 12,254,254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64,160,144, 8,252,129, 0, 60,126,255,255,255,255,255,255,255,255,126, 60, 0,129,252, 8,144,160, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254,254, 0, 0, 0, 0, 0, 0,144,144,144,144,240, 0, 0, 48,224,128, 0, 0,224, 48, 0,192,224,176,144,144,240,192, 0, 0,240,240, 16, 16, 0,128,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 12,254,254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 21, 42, 17, 96,135, 88,162, 64, 68,128,137,137,137,137,137,136,128, 68, 64,162, 88,199, 32, 17, 42, 21, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 8, 8, 8, 8, 0, 7, 15, 8, 8, 12, 15, 0, 0, 64, 65,111, 60, 15, 1, 0, 0, 3, 7, 12, 8, 8, 8, 0, 0, 0, 15, 15, 0, 0, 0, 8, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 15, 15, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 21, 42, 17, 96,135, 88,162, 64, 68,128,137,137,137,137,137,136,128, 68, 64,162, 88,199, 32, 17, 42, 21, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 8, 8, 8, 8, 0, 7, 15, 8, 8, 12, 15, 0, 0, 64, 65,111, 60, 15, 1, 0, 0, 3, 7, 12, 8, 8, 8, 0, 0, 0, 15, 15, 0, 0, 0, 8, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 15, 15, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 5, 4, 2, 2, 2, 2, 2, 2, 4, 5, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 5, 4, 2, 2, 2, 2, 2, 2, 4, 5, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
}; };
//Logo for _DOC //Logo for _DOC
static const char PROGMEM logo2[] = { static const char PROGMEM logo2[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,224,160,224,128,224,160,224,128,224,160,224,128,224,160,224,128,224,160,224,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,224,160,224,128,224,160,224,128,224,160,224,128,224,160,224,128,224,160,224,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254, 17, 16, 16,224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3,254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254,254, 0, 0, 0, 0, 0, 0,144,144,144,144,240, 0, 0, 48,224,128, 0, 0,224, 48, 0,192,224,176,144,144,240,192, 0, 0,240,240, 16, 16, 0,128,192, 0, 0, 0, 0, 0, 0, 0, 0, 4, 6,130,194,102, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254, 17, 16, 16,224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3,254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254,254, 0, 0, 0, 0, 0, 0,144,144,144,144,240, 0, 0, 48,224,128, 0, 0,224, 48, 0,192,224,176,144,144,240,192, 0, 0,240,240, 16, 16, 0,128,192, 0, 0, 0, 0, 0, 0, 0, 0, 4, 6,130,194,102, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,127,145,161,225, 32,224,160,224, 32,224,160,224, 32,224,160,224, 32,224,160,224, 32,224,160, 80, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 8, 8, 8, 8, 0, 7, 15, 8, 8, 12, 15, 0, 0, 64, 65,111, 60, 15, 1, 0, 0, 3, 7, 12, 8, 8, 8, 0, 0, 0, 15, 15, 0, 0, 0, 8, 12, 0, 0, 0, 0, 0, 0, 0, 0, 12, 14, 11, 9, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,127,145,161,225, 32,224,160,224, 32,224,160,224, 32,224,160,224, 32,224,160,224, 32,224,160, 80, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 8, 8, 8, 8, 0, 7, 15, 8, 8, 12, 15, 0, 0, 64, 65,111, 60, 15, 1, 0, 0, 3, 7, 12, 8, 8, 8, 0, 0, 0, 15, 15, 0, 0, 0, 8, 12, 0, 0, 0, 0, 0, 0, 0, 0, 12, 14, 11, 9, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 3, 0, 3, 2, 3, 0, 3, 2, 3, 0, 3, 2, 3, 0, 3, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 3, 0, 3, 2, 3, 0, 3, 2, 3, 0, 3, 2, 3, 0, 3, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
}; };
//Logo for _POWER //Logo for _POWER
static const char PROGMEM logo3[] = { static const char PROGMEM logo3[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,120,254, 58, 30, 8, 4, 4, 4, 2, 2, 4, 4, 4, 8, 30, 58,254,120,248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,120,254, 58, 30, 8, 4, 4, 4, 2, 2, 4, 4, 4, 8, 30, 58,254,120,248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,248,145, 38, 68,136,144, 16, 32, 32, 32, 32, 16, 16,136, 68, 34,241,254,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254,254, 0, 0, 0, 0, 0, 0,144,144,144,144,240, 0, 0, 48,224,128, 0, 0,224, 48, 0,192,224,176,144,144,240,192, 0, 0,240,240, 16, 16, 0,128,192, 0, 0, 0, 0, 0, 0, 0, 0, 2, 34, 50, 58,110,198, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,248,145, 38, 68,136,144, 16, 32, 32, 32, 32, 16, 16,136, 68, 34,241,254,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254,254, 0, 0, 0, 0, 0, 0,144,144,144,144,240, 0, 0, 48,224,128, 0, 0,224, 48, 0,192,224,176,144,144,240,192, 0, 0,240,240, 16, 16, 0,128,192, 0, 0, 0, 0, 0, 0, 0, 0, 2, 34, 50, 58,110,198, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 35,231, 47,255, 62, 62, 61, 61, 61, 61, 61, 61, 62, 62, 63,239, 39,227, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 8, 8, 8, 8, 0, 7, 15, 8, 8, 4, 15, 0, 0, 64, 65,111, 60, 15, 1, 0, 0, 3, 7, 12, 8, 8, 8, 0, 0, 0, 15, 15, 0, 0, 0, 8, 12, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 12, 6, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 35,231, 47,255, 62, 62, 61, 61, 61, 61, 61, 61, 62, 62, 63,239, 39,227, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 8, 8, 8, 8, 0, 7, 15, 8, 8, 4, 15, 0, 0, 64, 65,111, 60, 15, 1, 0, 0, 3, 7, 12, 8, 8, 8, 0, 0, 0, 15, 15, 0, 0, 0, 8, 12, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 12, 6, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
}; };
//Switch between logos //Switch between logos
@ -110,15 +110,15 @@ static void render_logo(void) {
break; break;
default: default:
oled_write_raw_P(logo1, sizeof(logo1)); oled_write_raw_P(logo1, sizeof(logo1));
} }
} }
void oled_task_user(void) { void oled_task_user(void) {
render_logo(); render_logo();
} }
#endif #endif
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { if (index == 0) {
switch (get_highest_layer(layer_state)) { switch (get_highest_layer(layer_state)) {
case 1: case 1:
@ -141,6 +141,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
} else { } else {
tap_code(KC_VOLD); //edit here your _MEDIA layer(1) encoder keycode tap_code(KC_VOLD); //edit here your _MEDIA layer(1) encoder keycode
} }
} }
} }
} return true;
}

View file

@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
if (clockwise) { if (clockwise) {
tap_code(KC_MS_WH_UP); tap_code(KC_MS_WH_UP);
@ -25,6 +25,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_MS_WH_DOWN); tap_code(KC_MS_WH_DOWN);
} }
} }
return true;
} }
// //

View file

@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
if (clockwise) { if (clockwise) {
tap_code(KC_MS_WH_UP); tap_code(KC_MS_WH_UP);
@ -25,6 +25,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_MS_WH_DOWN); tap_code(KC_MS_WH_DOWN);
} }
} }
return true;
} }
// //

View file

@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
) )
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
if (clockwise) { if (clockwise) {
tap_code(KC_VOLU); tap_code(KC_VOLU);
@ -68,4 +68,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_LEFT); tap_code(KC_LEFT);
} }
} }
return true;
} }

View file

@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
), ),
[_FN] = LAYOUT( [_FN] = LAYOUT(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP,
@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
) )
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
if (clockwise) { if (clockwise) {
tap_code(KC_VOLU); tap_code(KC_VOLU);
@ -68,4 +68,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
rgblight_step_reverse(); rgblight_step_reverse();
} }
} }
return true;
} }

View file

@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
) )
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { if (index == 0) {
if (clockwise) { if (clockwise) {
tap_code(KC_VOLU); tap_code(KC_VOLU);
@ -49,4 +49,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD); tap_code(KC_VOLD);
} }
} }
return true;
} }

View file

@ -20,33 +20,33 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all( [0] = LAYOUT_all(
KC_MUTE, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_MPRV, KC_MPLY, KC_MNXT , KC_INS , KC_HOME, KC_PGUP, KC_MUTE, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_MPRV, KC_MPLY, KC_MNXT , KC_INS , KC_HOME, KC_PGUP,
KC_ESC , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PSCR, KC_SLCK, KC_PAUSE, KC_DEL , KC_END , KC_PGDN, KC_ESC , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PSCR, KC_SLCK, KC_PAUSE, KC_DEL , KC_END , KC_PGDN,
KC_GRV , 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_BSPC, KC_CALC, KC_NLCK , KC_PSLS, KC_PAST, KC_PMNS, KC_GRV , 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_BSPC, KC_CALC, KC_NLCK , KC_PSLS, KC_PAST, KC_PMNS,
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, RGB_TOG, KC_P7 , KC_P8 , KC_P9 , KC_PEQL, KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, RGB_TOG, KC_P7 , KC_P8 , KC_P9 , KC_PEQL,
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_ENT , KC_MSEL, KC_P4 , KC_P5 , KC_P6 , KC_PPLS, 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_ENT , KC_MSEL, KC_P4 , KC_P5 , KC_P6 , KC_PPLS,
KC_LSFT, KC_BSLS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_P1 , KC_P2 , KC_P3 , KC_PENT, KC_LSFT, KC_BSLS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_P1 , KC_P2 , KC_P3 , KC_PENT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_SPC , KC_SPC , KC_RALT, KC_APP , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_P0 , KC_PDOT KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_SPC , KC_SPC , KC_RALT, KC_APP , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_P0 , KC_PDOT
), ),
[1] = LAYOUT_all( [1] = LAYOUT_all(
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______,
_______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______ _______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
), ),
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) { if (clockwise) {
tap_code(KC_VOLU); tap_code(KC_VOLU);
} } else {
else {
tap_code(KC_VOLD); tap_code(KC_VOLD);
} }
} return true;
}

View file

@ -20,96 +20,96 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all( [0] = LAYOUT_all(
KC_MUTE, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_MPRV, KC_MPLY, KC_MNXT , KC_INS , KC_HOME, KC_PGUP, KC_MUTE, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_MPRV, KC_MPLY, KC_MNXT , KC_INS , KC_HOME, KC_PGUP,
KC_ESC , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PSCR, KC_SLCK, KC_PAUSE, KC_DEL , KC_END , KC_PGDN, KC_ESC , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PSCR, KC_SLCK, KC_PAUSE, KC_DEL , KC_END , KC_PGDN,
KC_GRV , 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_BSPC, KC_CALC, KC_NLCK , KC_PSLS, KC_PAST, KC_PMNS, KC_GRV , 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_BSPC, KC_CALC, KC_NLCK , KC_PSLS, KC_PAST, KC_PMNS,
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, RGB_TOG, KC_P7 , KC_P8 , KC_P9 , KC_PEQL, KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, RGB_TOG, KC_P7 , KC_P8 , KC_P9 , KC_PEQL,
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_ENT , KC_MSEL, KC_P4 , KC_P5 , KC_P6 , KC_PPLS, 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_ENT , KC_MSEL, KC_P4 , KC_P5 , KC_P6 , KC_PPLS,
KC_LSFT, KC_BSLS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_P1 , KC_P2 , KC_P3 , KC_PENT, KC_LSFT, KC_BSLS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_P1 , KC_P2 , KC_P3 , KC_PENT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_SPC , KC_SPC , KC_RALT, KC_APP , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_P0 , KC_PDOT KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_SPC , KC_SPC , KC_RALT, KC_APP , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_P0 , KC_PDOT
), ),
[1] = LAYOUT_all( [1] = LAYOUT_all(
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______,
_______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______ _______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
), ),
[2] = LAYOUT_all( [2] = LAYOUT_all(
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______,
_______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______ _______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
), ),
[3] = LAYOUT_all( [3] = LAYOUT_all(
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______,
_______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______ _______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
), ),
[4] = LAYOUT_all( [4] = LAYOUT_all(
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______,
_______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______ _______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
), ),
[5] = LAYOUT_all( [5] = LAYOUT_all(
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______,
_______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______ _______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
), ),
[6] = LAYOUT_all( [6] = LAYOUT_all(
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______,
_______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______ _______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
), ),
[7] = LAYOUT_all( [7] = LAYOUT_all(
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______, _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______,
_______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______ _______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
), ),
}; };
uint8_t go_to_layer = 0; /* Used for the layer changing code for the encoder below */ uint8_t go_to_layer = 0; /* Used for the layer changing code for the encoder below */
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (matrix_is_on(6, 10)) { /* Use the knob to change layers when holding down Menu key. Unfortunately using layers to initiate this behavior is not possible. */ if (matrix_is_on(6, 10)) { /* Use the knob to change layers when holding down Menu key. Unfortunately using layers to initiate this behavior is not possible. */
if (clockwise) { if (clockwise) {
@ -121,7 +121,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
else { else {
go_to_layer=0; go_to_layer=0;
} }
layer_on(go_to_layer); layer_on(go_to_layer);
} }
@ -129,7 +129,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
else { else {
layer_off(go_to_layer); layer_off(go_to_layer);
/* update go_to_layer*/ /* update go_to_layer*/
if(go_to_layer>0) { if(go_to_layer>0) {
go_to_layer--; go_to_layer--;
@ -142,15 +142,16 @@ void encoder_update_user(uint8_t index, bool clockwise) {
} }
} }
else { /* normal operation as volume knob */ else { /* normal operation as volume knob */
if (clockwise) { if (clockwise) {
tap_code(KC_VOLU); tap_code(KC_VOLU);
} }
else { else {
tap_code(KC_VOLD); tap_code(KC_VOLD);
} }
} }
return true;
} }
/*Default layer is white.*/ /*Default layer is white.*/
@ -220,4 +221,3 @@ bool led_update_user(led_t led_state) {
rgblight_set_layer_state(0, true); rgblight_set_layer_state(0, true);
return true; return true;
} }

View file

@ -182,9 +182,10 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
return process_record_user(keycode, record); return process_record_user(keycode, record);
} }
void encoder_update_kb(uint8_t index, bool clockwise) { bool encoder_update_kb(uint8_t index, bool clockwise) {
encoder_value = (encoder_value + (clockwise ? 1 : -1)) % 64; encoder_value = (encoder_value + (clockwise ? 1 : -1)) % 64;
queue_for_send = true; queue_for_send = true;
return true;
} }
#endif #endif

View file

@ -11,7 +11,8 @@ uint32_t layer_state_set_kb(uint32_t state) {
return state; return state;
} }
void encoder_update_kb(uint8_t index, bool clockwise) { bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) return false;
uint16_t mapped_code = 0; uint16_t mapped_code = 0;
if (index == 0) { if (index == 0) {
if (clockwise) { if (clockwise) {
@ -46,4 +47,5 @@ void encoder_update_kb(uint8_t index, bool clockwise) {
while (timer_elapsed(held_keycode_timer) < MEDIA_KEY_DELAY){ /* no-op */ } while (timer_elapsed(held_keycode_timer) < MEDIA_KEY_DELAY){ /* no-op */ }
unregister_code(mapped_code); unregister_code(mapped_code);
} }
return true;
} }

View file

@ -300,7 +300,8 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
} }
void encoder_update_kb(uint8_t index, bool clockwise) { bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) return false;
encoder_value = (encoder_value + (clockwise ? 1 : -1)) % 64; encoder_value = (encoder_value + (clockwise ? 1 : -1)) % 64;
queue_for_send = true; queue_for_send = true;
if (index == 0) { if (index == 0) {
@ -325,6 +326,7 @@ void encoder_update_kb(uint8_t index, bool clockwise) {
} }
} }
} }
return true;
} }
void custom_config_reset(void){ void custom_config_reset(void){
@ -451,4 +453,4 @@ void via_eeprom_reset(void)
eeconfig_disable(); eeconfig_disable();
} }
#endif // VIA_ENABLE #endif // VIA_ENABLE

View file

@ -33,10 +33,10 @@ enum layer_number {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// LAYOUT(LeftEncoder, RightEncoder, LeftSwitch, CenterLeftSwitch, CenterRightSwitch, RightSwitch) // LAYOUT(LeftEncoder, RightEncoder, LeftSwitch, CenterLeftSwitch, CenterRightSwitch, RightSwitch)
[_AUDIO] = LAYOUT(KC_MUTE, KC_ENT, LT(_HUE, KC_MPRV), LT(_SAT, KC_MPLY), LT(_VAL, KC_MNXT), LT(_MODE, KC_SPC)), [_AUDIO] = LAYOUT(KC_MUTE, KC_ENT, LT(_HUE, KC_MPRV), LT(_SAT, KC_MPLY), LT(_VAL, KC_MNXT), LT(_MODE, KC_SPC)),
[_HUE] = LAYOUT(RGB_TOG, RGBRST, _______, _______, RGB_HUD, RGB_HUI), [_HUE] = LAYOUT(RGB_TOG, RGBRST, _______, _______, RGB_HUD, RGB_HUI),
[_SAT] = LAYOUT(_______, _______, _______, _______, RGB_SAD, RGB_SAI), [_SAT] = LAYOUT(_______, _______, _______, _______, RGB_SAD, RGB_SAI),
[_VAL] = LAYOUT(_______, _______, RGB_VAD, RGB_VAI, _______, RGB_VAI), [_VAL] = LAYOUT(_______, _______, RGB_VAD, RGB_VAI, _______, RGB_VAI),
[_MODE] = LAYOUT(_______, WRTROM, RGB_RMOD, RGB_MOD, RGB_MOD, _______), [_MODE] = LAYOUT(_______, WRTROM, RGB_RMOD, RGB_MOD, RGB_MOD, _______),
}; };
@ -112,7 +112,7 @@ void oled_task_user(void) {
void led_set_user(uint8_t usb_led) {} void led_set_user(uint8_t usb_led) {}
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
oled_on(); oled_on();
if (index == 0) { /* left encoder */ if (index == 0) { /* left encoder */
switch (layer_state) { switch (layer_state) {
@ -171,4 +171,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_UP); tap_code(KC_UP);
} }
} }
return true;
} }

View file

@ -17,12 +17,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "ck60i.h" #include "ck60i.h"
__attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) return false;
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
if (clockwise) { if (clockwise) {
tap_code(KC_VOLU); tap_code(KC_VOLU);
} else { } else {
tap_code(KC_VOLD); tap_code(KC_VOLD);
} }
} }
return true;
} }

View file

@ -144,7 +144,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true; return true;
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
if (clockwise) { if (clockwise) {
tap_code(KC_PGDN); tap_code(KC_PGDN);
@ -152,4 +152,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP); tap_code(KC_PGUP);
} }
} }
return true;
} }

View file

@ -51,7 +51,7 @@ You can find the default layout in `thedora/keymaps/default/keymap.c`
This is the bit of code at the end of `keymap.c` that needs to changed if you want to change the behavior of the rotary encoder. This is the bit of code at the end of `keymap.c` that needs to changed if you want to change the behavior of the rotary encoder.
``` ```
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
if (clockwise) { if (clockwise) {
tap_code(KC_PGDN); // What the rotary encoder repeatedly does when turned right. tap_code(KC_PGDN); // What the rotary encoder repeatedly does when turned right.
@ -59,6 +59,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP); // What it does when turned to the left. tap_code(KC_PGUP); // What it does when turned to the left.
} }
} }
return true;
} }
``` ```

View file

@ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
) )
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
switch (biton32(layer_state)) { switch (biton32(layer_state)) {
case _BASE: case _BASE:
if (clockwise) { if (clockwise) {
@ -55,6 +55,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_MPRV); tap_code(KC_MPRV);
} }
} }
return true;
} }
#ifdef OLED_DRIVER_ENABLE #ifdef OLED_DRIVER_ENABLE
@ -79,4 +80,4 @@ void oled_task_user(void) {
oled_write_P(IS_LED_ON(usb_led, USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); oled_write_P(IS_LED_ON(usb_led, USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false);
oled_write_P(IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); oled_write_P(IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false);
} }
#endif #endif

View file

@ -144,13 +144,11 @@ bool led_update_kb(led_t led_state) {
return res; return res;
} }
__attribute__ ((weak)) __attribute__((weak)) bool encoder_update_keymap(uint8_t index, bool clockwise) { return true; }
bool encoder_update_keymap(int8_t index, bool clockwise) { __attribute__((weak)) bool encoder_update_user(uint8_t index, bool clockwise) { return encoder_update_keymap(index, clockwise); }
return false;
}
void encoder_update_kb(int8_t index, bool clockwise) { bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_keymap(index, clockwise)) { if (!encoder_update_user(index, clockwise)) {
// Encoder 1, outside left // Encoder 1, outside left
if (index == 0 && clockwise) { if (index == 0 && clockwise) {
tap_code(KC_MS_U); // turned right tap_code(KC_MS_U); // turned right
@ -179,4 +177,5 @@ void encoder_update_kb(int8_t index, bool clockwise) {
tap_code(KC_MS_L); // turned left tap_code(KC_MS_L); // turned left
} }
} }
return true;
} }

View file

@ -29,8 +29,7 @@ enum TWOx1800_keycodes {
#define SAFE_RANGE NEW_SAFE_RANGE #define SAFE_RANGE NEW_SAFE_RANGE
// Encoder update function that returns true/false // Encoder update function that returns true/false
__attribute__ ((weak)) bool encoder_update_keymap(uint8_t index, bool clockwise);
bool encoder_update_keymap(int8_t index, bool clockwise);
// Encoder button combo check // Encoder button combo check
void check_encoder_buttons(void); void check_encoder_buttons(void);

View file

@ -15,10 +15,12 @@
*/ */
#include "crbn.h" #include "crbn.h"
/* Encoder setting. only one encoder despite 4 possible spots */ /* Encoder setting. only one encoder despite 4 possible spots */
__attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) return false;
if (clockwise) { if (clockwise) {
tap_code(KC_VOLU); tap_code(KC_VOLU);
} else { } else {
tap_code(KC_VOLD); tap_code(KC_VOLD);
} }
return true;
} }

View file

@ -16,7 +16,8 @@
#include "genesis.h" #include "genesis.h"
__attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) return false;
/* top left encoder */ /* top left encoder */
if (index == 0) { if (index == 0) {
if (clockwise) { if (clockwise) {
@ -32,5 +33,6 @@ __attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) {
} else { } else {
tap_code(KC_VOLD); tap_code(KC_VOLD);
} }
} }
} return true;
}

View file

@ -106,7 +106,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true; return true;
} }
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
/* With an if statement we can check which encoder was turned. */ /* With an if statement we can check which encoder was turned. */
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
/* And with another if statement we can check the direction. */ /* And with another if statement we can check the direction. */
@ -131,4 +131,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_LEFT); tap_code(KC_LEFT);
} }
} }
return true;
} }

View file

@ -106,7 +106,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true; return true;
} }
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
/* With an if statement we can check which encoder was turned. */ /* With an if statement we can check which encoder was turned. */
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
/* And with another if statement we can check the direction. */ /* And with another if statement we can check the direction. */
@ -131,4 +131,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_LEFT); tap_code(KC_LEFT);
} }
} }
return true;
} }

View file

@ -126,7 +126,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true; return true;
} }
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
/* With an if statement we can check which encoder was turned. */ /* With an if statement we can check which encoder was turned. */
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
/* And with another if statement we can check the direction. */ /* And with another if statement we can check the direction. */
@ -151,4 +151,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_LEFT); tap_code(KC_LEFT);
} }
} }
return true;
} }

View file

@ -107,7 +107,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true; return true;
} }
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
/* With an if statement we can check which encoder was turned. */ /* With an if statement we can check which encoder was turned. */
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
/* And with another if statement we can check the direction. */ /* And with another if statement we can check the direction. */
@ -132,4 +132,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_LEFT); tap_code(KC_LEFT);
} }
} }
return true;
} }

View file

@ -117,7 +117,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true; return true;
} }
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
/* With an if statement we can check which encoder was turned. */ /* With an if statement we can check which encoder was turned. */
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
/* And with another if statement we can check the direction. */ /* And with another if statement we can check the direction. */
@ -158,4 +158,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
} }
} }
} }
return true;
} }

View file

@ -104,7 +104,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true; return true;
} }
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
/* With an if statement we can check which encoder was turned. */ /* With an if statement we can check which encoder was turned. */
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
/* And with another if statement we can check the direction. */ /* And with another if statement we can check the direction. */
@ -145,4 +145,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
} }
} }
} }
return true;
} }

View file

@ -24,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
), ),
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
switch(index) { switch(index) {
case 0: case 0:
if (clockwise) { if (clockwise) {
@ -48,4 +48,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
} }
break; break;
} }
return true;
} }

View file

@ -24,24 +24,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
), ),
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
if (clockwise) { if (clockwise) {
rgblight_increase_hue(); //Cycle through the RGB hue rgblight_increase_hue(); //Cycle through the RGB hue
} else { } else {
rgblight_decrease_hue(); rgblight_decrease_hue();
} }
} else if (index == 1) { /* Second encoder */ } else if (index == 1) { /* Second encoder */
if (clockwise) { if (clockwise) {
tap_code(KC_VOLU); //Example of using tap_code which lets you use keycodes outside of the keymap tap_code(KC_VOLU); //Example of using tap_code which lets you use keycodes outside of the keymap
} else { } else {
tap_code(KC_VOLD); tap_code(KC_VOLD);
} }
} else if (index == 2) { /* Third encoder */ } else if (index == 2) { /* Third encoder */
if (clockwise) { if (clockwise) {
rgblight_increase_val(); //Change brightness on the RGB LEDs rgblight_increase_val(); //Change brightness on the RGB LEDs
} else { } else {
rgblight_decrease_val(); rgblight_decrease_val();
} }
} }
return true;
} }

View file

@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
) )
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
switch (currentLayer) { //break each encoder update into a switch statement for the current layer switch (currentLayer) { //break each encoder update into a switch statement for the current layer
case _BL: case _BL:
@ -124,6 +124,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break; break;
} }
} }
return true;
} }
layer_state_t layer_state_set_user(layer_state_t state) { //This will run every time the layer is updated layer_state_t layer_state_set_user(layer_state_t state) { //This will run every time the layer is updated

View file

@ -61,7 +61,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true; return true;
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
switch (get_highest_layer(layer_state)) { //break each encoder update into a switch statement for the current layer switch (get_highest_layer(layer_state)) { //break each encoder update into a switch statement for the current layer
case _NUMPAD: case _NUMPAD:
@ -135,6 +135,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break; break;
} }
} }
return true;
} }
layer_state_t layer_state_set_user(layer_state_t state) { //This will run every time the layer is updated layer_state_t layer_state_set_user(layer_state_t state) { //This will run every time the layer is updated

View file

@ -37,8 +37,8 @@ enum custom_keycodes {
// clang-format off // clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_MACRO] = LAYOUT( [_MACRO] = LAYOUT(
A(S(KC_N)), HELLO, CH_SUSP, TO(_MACRO), A(S(KC_N)), HELLO, CH_SUSP, TO(_MACRO),
KC_MPRV, KC_MPLY, KC_MNXT, TO(_NUMPAD), KC_MPRV, KC_MPLY, KC_MNXT, TO(_NUMPAD),
C(A(KC_COMM)), KC_F5, C(A(KC_DOT)), TO(_RGB), C(A(KC_COMM)), KC_F5, C(A(KC_DOT)), TO(_RGB),
MO(_FN), CH_ASST, CH_CPNL), MO(_FN), CH_ASST, CH_CPNL),
@ -60,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_TRNS,
KC_NO, KC_NO, KC_NO), KC_NO, KC_NO, KC_NO),
}; };
// clang-format on // clang-format on
typedef enum layer_ack { typedef enum layer_ack {
ACK_NO = 0, ACK_NO = 0,
@ -79,20 +79,20 @@ const rgblight_segment_t PROGMEM _no_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 3, H
const rgblight_segment_t PROGMEM _yes_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 3, HSV_GREEN}); const rgblight_segment_t PROGMEM _yes_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 3, HSV_GREEN});
const rgblight_segment_t PROGMEM _meh_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 3, HSV_YELLOW}); const rgblight_segment_t PROGMEM _meh_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 3, HSV_YELLOW});
// clang-format on // clang-format on
const rgblight_segment_t *const PROGMEM _rgb_layers[] = { const rgblight_segment_t *const PROGMEM _rgb_layers[] = {
[LAYER_OFFSET + 0] = _macro_layer, [LAYER_OFFSET + 0] = _macro_layer,
[LAYER_OFFSET + 1] = _numpad_layer, [LAYER_OFFSET + 1] = _numpad_layer,
[LAYER_OFFSET + 2] = _rgb_layer, [LAYER_OFFSET + 2] = _rgb_layer,
[LAYER_OFFSET + 3] = _fn_layer, [LAYER_OFFSET + 3] = _fn_layer,
[ACK_OFFSET + ACK_NO] = _no_layer, [ACK_OFFSET + ACK_NO] = _no_layer,
[ACK_OFFSET + ACK_YES] = _yes_layer, [ACK_OFFSET + ACK_YES] = _yes_layer,
[ACK_OFFSET + ACK_MEH] = _meh_layer, [ACK_OFFSET + ACK_MEH] = _meh_layer,
[ACK_OFFSET + ACK_MEH + 1] = NULL [ACK_OFFSET + ACK_MEH + 1] = NULL
}; };
// clang-format off // clang-format off
const uint8_t PROGMEM _n_rgb_layers = sizeof(_rgb_layers) / sizeof(_rgb_layers[0]) - 1; const uint8_t PROGMEM _n_rgb_layers = sizeof(_rgb_layers) / sizeof(_rgb_layers[0]) - 1;
@ -200,7 +200,7 @@ void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
} }
} }
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
switch (get_highest_layer(layer_state)) { switch (get_highest_layer(layer_state)) {
case _RGB: case _RGB:
if (index == 0) { if (index == 0) {
@ -234,4 +234,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
} }
break; break;
} }
return true;
} }

View file

@ -45,24 +45,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
) )
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
if (clockwise) { if (clockwise) {
rgblight_increase_hue(); //Cycle through the RGB hue rgblight_increase_hue(); //Cycle through the RGB hue
} else { } else {
rgblight_decrease_hue(); rgblight_decrease_hue();
} }
} else if (index == 1) { /* Second encoder */ } else if (index == 1) { /* Second encoder */
if (clockwise) { if (clockwise) {
rgblight_increase_sat(); rgblight_increase_sat();
} else { } else {
rgblight_decrease_sat(); rgblight_decrease_sat();
} }
} else if (index == 2) { /* Third encoder */ } else if (index == 2) { /* Third encoder */
if (clockwise) { if (clockwise) {
rgblight_increase_val(); //Change brightness on the RGB LEDs rgblight_increase_val(); //Change brightness on the RGB LEDs
} else { } else {
rgblight_decrease_val(); rgblight_decrease_val();
} }
} }
} return true;
}

View file

@ -38,14 +38,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
TG(2), RESET, KC_TRNS, KC_TRNS, KC_TRNS), TG(2), RESET, KC_TRNS, KC_TRNS, KC_TRNS),
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
if (clockwise) { if (clockwise) {
tap_code(KC_VOLU); tap_code(KC_VOLU);
} else { } else {
tap_code(KC_VOLD); tap_code(KC_VOLD);
} }
} }
return true;
} }

View file

@ -38,14 +38,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
TG(2), RESET, KC_TRNS, KC_TRNS, KC_TRNS), TG(2), RESET, KC_TRNS, KC_TRNS, KC_TRNS),
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
if (clockwise) { if (clockwise) {
tap_code(KC_VOLU); tap_code(KC_VOLU);
} else { } else {
tap_code(KC_VOLD); tap_code(KC_VOLD);
} }
} }
return true;
} }

View file

@ -45,14 +45,15 @@ 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),
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
if (clockwise) { if (clockwise) {
tap_code(KC_VOLU); tap_code(KC_VOLU);
} else { } else {
tap_code(KC_VOLD); tap_code(KC_VOLD);
} }
} }
return true;
} }

View file

@ -82,73 +82,73 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
} else { } else {
return OLED_ROTATION_0; return OLED_ROTATION_0;
} }
} }
static void render_logo(void) { static void render_logo(void) {
static const char PROGMEM drac_logo[] = { static const char PROGMEM drac_logo[] = {
// drac_logo, 128x64px // drac_logo, 128x64px
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x0c, 0x18, 0x78, 0xf0, 0xf0, 0xe0, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x0c, 0x18, 0x78, 0xf0, 0xf0, 0xe0, 0xe0, 0xc0,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x07, 0x3e, 0xfc, 0xf0, 0x00, 0x00, 0x00, 0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x07, 0x3e, 0xfc, 0xf0, 0x00, 0x00, 0x00,
0xf0, 0xf0, 0x60, 0x30, 0x30, 0x30, 0x00, 0x00, 0xe0, 0xe0, 0x30, 0x30, 0x30, 0x30, 0x30, 0xe0, 0xf0, 0xf0, 0x60, 0x30, 0x30, 0x30, 0x00, 0x00, 0xe0, 0xe0, 0x30, 0x30, 0x30, 0x30, 0x30, 0xe0,
0xe0, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x70, 0x30, 0x30, 0x30, 0x70, 0xe0, 0xc0, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x70, 0x30, 0x30, 0x30, 0x70, 0xe0, 0xc0, 0x00, 0x00,
0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0,
0x80, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xf8, 0xf0, 0x80, 0xc0, 0xe0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xf8, 0xf0, 0x80, 0xc0, 0xe0, 0xf0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x3f, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x3f, 0xff, 0xff,
0xff, 0xff, 0xfe, 0xfc, 0xf8, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xfe, 0xfc, 0xf8, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xff, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xe0, 0x7c, 0x3f, 0x0f, 0x00, 0x00, 0x00, 0xff, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xe0, 0x7c, 0x3f, 0x0f, 0x00, 0x00, 0x00,
0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xf8, 0xcc, 0x8c, 0x84, 0x86, 0x86, 0xc6, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xf8, 0xcc, 0x8c, 0x84, 0x86, 0x86, 0xc6, 0xff,
0xff, 0x80, 0x80, 0x00, 0x3f, 0x7f, 0xe0, 0xc0, 0x80, 0x80, 0x80, 0xc0, 0xf0, 0x71, 0x00, 0x00, 0xff, 0x80, 0x80, 0x00, 0x3f, 0x7f, 0xe0, 0xc0, 0x80, 0x80, 0x80, 0xc0, 0xf0, 0x71, 0x00, 0x00,
0x1f, 0xff, 0xff, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x03, 0x03, 0x07, 0x0f, 0x0f, 0x0f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x03, 0x03, 0x07, 0x0f, 0x0f, 0x0f, 0x1f,
0x7f, 0x7f, 0x3e, 0x3e, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xf8, 0xfc, 0x7f, 0x7f, 0x3e, 0x3e, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xf8, 0xfc,
0xfc, 0xfe, 0xfe, 0x7e, 0x7c, 0x78, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xfc, 0xfe, 0xfe, 0x7e, 0x7c, 0x78, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,
0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfe, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfe, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x60, 0x60, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x60, 0x60,
0x60, 0x60, 0x60, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xe0, 0x60, 0x60, 0x60, 0xc0, 0x60, 0x60, 0x60, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xe0, 0x60, 0x60, 0x60, 0xc0,
0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07,
0x0f, 0x3e, 0x7c, 0xfc, 0xf8, 0xf8, 0xf8, 0xf8, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf8, 0x0f, 0x3e, 0x7c, 0xfc, 0xf8, 0xf8, 0xf8, 0xf8, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf8,
0xf8, 0xf8, 0xfc, 0xfc, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xf8, 0xfc, 0xfc, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0x7f, 0x3f, 0x1f, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7f, 0x3f, 0x1f, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf1, 0x99, 0x18, 0x08, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf1, 0x99, 0x18, 0x08,
0x0c, 0x0c, 0x8c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xc1, 0x80, 0x00, 0x00, 0x00, 0x80, 0x0c, 0x0c, 0x8c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xc1, 0x80, 0x00, 0x00, 0x00, 0x80,
0xc3, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, 0x0f, 0x0f, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, 0x0f, 0x0f, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f,
0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x0f, 0x0f, 0x07, 0x07, 0x03, 0x03, 0x01, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x0f, 0x0f, 0x07, 0x07, 0x03, 0x03, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03,
0x03, 0x03, 0x01, 0x01, 0x03, 0x03, 0x03, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x01, 0x03, 0x03, 0x01, 0x01, 0x03, 0x03, 0x03, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x01,
0x01, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}; };
oled_write_raw_P(drac_logo, sizeof(drac_logo)); oled_write_raw_P(drac_logo, sizeof(drac_logo));
@ -195,7 +195,7 @@ void oled_task_user(void) {
#endif #endif
#ifdef ENCODER_ENABLE #ifdef ENCODER_ENABLE
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { if (index == 0) {
// Volume control // Volume control
if (clockwise) { if (clockwise) {
@ -220,6 +220,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_WH_D); tap_code(KC_WH_D);
} }
} }
return true;
} }
#endif #endif

View file

@ -295,7 +295,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record){
return true; return true;
} }
#ifdef ENCODER_ENABLE #ifdef ENCODER_ENABLE
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { if (index == 0) {
// Volume control // Volume control
if (clockwise) { if (clockwise) {
@ -319,5 +319,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
} }
// I only have 2 encoders on the the pimoroni example board, just add else ifs for your other encoders... // I only have 2 encoders on the the pimoroni example board, just add else ifs for your other encoders...
// the missing ones are encoder 1 on the right side and encoder 3 on the left side // the missing ones are encoder 1 on the right side and encoder 3 on the left side
return true;
} }
#endif #endif

View file

@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
) )
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { if (index == 0) {
if (clockwise) { if (clockwise) {
tap_code(KC_VOLD); tap_code(KC_VOLD);
@ -48,4 +48,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGDN); tap_code(KC_PGDN);
} }
} }
return true;
} }

View file

@ -189,7 +189,7 @@ void oled_task_user(void) {
#endif #endif
#ifdef ENCODER_ENABLE #ifdef ENCODER_ENABLE
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { if (index == 0) {
// master side thumb encoder // master side thumb encoder
// Volume control // Volume control
@ -226,5 +226,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_HOME); tap_code(KC_HOME);
} }
} }
return true;
} }
#endif #endif

View file

@ -387,7 +387,7 @@ void oled_task_user(void) {
#endif #endif
#ifdef ENCODER_ENABLE #ifdef ENCODER_ENABLE
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { if (index == 0) {
// master side thumb encoder // master side thumb encoder
// Volume control // Volume control
@ -424,5 +424,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_HOME); tap_code(KC_HOME);
} }
} }
return true;
} }
#endif #endif

View file

@ -72,7 +72,7 @@ void keyboard_post_init_user(void) {
//debug_mouse = true; //debug_mouse = true;
} }
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
/* Custom encoder control - handles CW/CCW turning of encoder /* Custom encoder control - handles CW/CCW turning of encoder
* Default behavior: * Default behavior:
* main layer: * main layer:
@ -103,4 +103,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break; break;
} }
} }
return true;
} }

View file

@ -2,7 +2,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { if (index == 0) {
switch (get_highest_layer(layer_state)) { switch (get_highest_layer(layer_state)) {
case 0: case 0:
@ -22,4 +22,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break; break;
} }
} }
return true;
} }

View file

@ -72,7 +72,7 @@ void keyboard_post_init_user(void) {
// debug_mouse = true; // debug_mouse = true;
} }
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
/* Custom encoder control - handles CW/CCW turning of encoder /* Custom encoder control - handles CW/CCW turning of encoder
* Default behavior: * Default behavior:
* left encoder: * left encoder:
@ -131,4 +131,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break; break;
} }
} }
return true;
} }

View file

@ -2,7 +2,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { if (index == 0) {
switch (get_highest_layer(layer_state)) { switch (get_highest_layer(layer_state)) {
case 0: case 0:
@ -40,4 +40,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break; break;
} }
} }
return true;
} }

View file

@ -72,7 +72,7 @@ void keyboard_post_init_user(void) {
// debug_mouse = true; // debug_mouse = true;
} }
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
/* Custom encoder control - handles CW/CCW turning of encoder /* Custom encoder control - handles CW/CCW turning of encoder
* Default behavior: * Default behavior:
* main layer: * main layer:
@ -103,4 +103,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break; break;
} }
} }
return true;
} }

View file

@ -2,7 +2,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { if (index == 0) {
switch (get_highest_layer(layer_state)) { switch (get_highest_layer(layer_state)) {
case 0: case 0:
@ -22,4 +22,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break; break;
} }
} }
return true;
} }

View file

@ -72,7 +72,7 @@ void keyboard_post_init_user(void) {
//debug_mouse = true; //debug_mouse = true;
} }
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
/* Custom encoder control - handles CW/CCW turning of encoder /* Custom encoder control - handles CW/CCW turning of encoder
* Default behavior: * Default behavior:
* main layer: * main layer:
@ -103,4 +103,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break; break;
} }
} }
return true;
} }

View file

@ -2,7 +2,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { if (index == 0) {
switch (get_highest_layer(layer_state)) { switch (get_highest_layer(layer_state)) {
case 0: case 0:
@ -22,4 +22,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break; break;
} }
} }
return true;
} }

View file

@ -72,7 +72,7 @@ void keyboard_post_init_user(void) {
// debug_mouse = true; // debug_mouse = true;
} }
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
/* Custom encoder control - handles CW/CCW turning of encoder /* Custom encoder control - handles CW/CCW turning of encoder
* Default behavior: * Default behavior:
* left encoder: * left encoder:
@ -131,4 +131,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break; break;
} }
} }
return true;
} }

View file

@ -2,7 +2,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { if (index == 0) {
switch (get_highest_layer(layer_state)) { switch (get_highest_layer(layer_state)) {
case 0: case 0:
@ -40,4 +40,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break; break;
} }
} }
return true;
} }

View file

@ -72,7 +72,7 @@ void keyboard_post_init_user(void) {
// debug_mouse = true; // debug_mouse = true;
} }
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
/* Custom encoder control - handles CW/CCW turning of encoder /* Custom encoder control - handles CW/CCW turning of encoder
* Default behavior: * Default behavior:
* main layer: * main layer:
@ -103,4 +103,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break; break;
} }
} }
return true;
} }

View file

@ -2,7 +2,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { if (index == 0) {
switch (get_highest_layer(layer_state)) { switch (get_highest_layer(layer_state)) {
case 0: case 0:
@ -22,4 +22,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break; break;
} }
} }
return true;
} }

View file

@ -17,7 +17,8 @@
// Rotary encoder functions: // Rotary encoder functions:
__attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) return false;
uint16_t mapped_code = 0; uint16_t mapped_code = 0;
if (index == 0) { if (index == 0) {
if (clockwise) { if (clockwise) {
@ -49,6 +50,7 @@ __attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) {
} }
tap_code(mapped_code); tap_code(mapped_code);
} }
return true;
} }
void keyboard_pre_init_kb(void) { void keyboard_pre_init_kb(void) {
@ -63,4 +65,3 @@ bool led_update_kb(led_t led_state) {
} }
return true; return true;
} }

View file

@ -18,32 +18,32 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_iso( /* keymap for layer 0 */ [0] = LAYOUT_iso( /* keymap for layer 0 */
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_MPLY, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_MPLY,
KC_GRV, 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_HOME, KC_GRV, 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_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGUP,
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_NUHS, KC_ENT, KC_PGDN, 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_NUHS, KC_ENT, KC_PGDN,
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LT(1, KC_APP), KC_LEFT, KC_DOWN, KC_RGHT), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LT(1, KC_APP), KC_LEFT, KC_DOWN, KC_RGHT),
[1] = LAYOUT_iso( /* keymap for layer 1 */ [1] = LAYOUT_iso( /* keymap for layer 1 */
RGB_TOG, RGB_VAD, RGB_VAI, BL_DEC, BL_INC, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_SPD, RGB_SPI, RGB_M_P, KC_MUTE, RGB_TOG, RGB_VAD, RGB_VAI, BL_DEC, BL_INC, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_SPD, RGB_SPI, RGB_M_P, KC_MUTE,
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_DEL, KC_INS, 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_DEL, KC_INS,
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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), 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, MO(2), KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LT(1, KC_APP), KC_TRNS, KC_TRNS, KC_TRNS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LT(1, KC_APP), KC_TRNS, KC_TRNS, KC_TRNS),
[2] = LAYOUT_iso( /* keymap for layer 2 */ [2] = LAYOUT_iso( /* keymap for layer 2 */
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, 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, 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, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), 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, MO(2), KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LT(1, KC_APP), KC_TRNS, KC_TRNS, KC_TRNS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LT(1, KC_APP), KC_TRNS, KC_TRNS, KC_TRNS),
}; };
/* Encoder */ /* Encoder */
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
/* The first if reads the first encoder, not needed on this board which only features a single one */ /* The first if reads the first encoder, not needed on this board which only features a single one */
if (index == 0) { if (index == 0) {
/* The switch case allows for different encoder mappings on different layers, "default" map gets applied for all unspecified layers */ /* The switch case allows for different encoder mappings on different layers, "default" map gets applied for all unspecified layers */
@ -71,4 +71,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break; break;
} }
} }
return true;
} }

View file

@ -18,40 +18,40 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_iso( /* keymap for layer 0 */ [0] = LAYOUT_iso( /* keymap for layer 0 */
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_MPLY, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_MPLY,
KC_GRV, 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_HOME, KC_GRV, 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_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGUP,
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_NUHS, KC_ENT, KC_PGDN, 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_NUHS, KC_ENT, KC_PGDN,
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LT(1, KC_APP), KC_LEFT, KC_DOWN, KC_RGHT), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LT(1, KC_APP), KC_LEFT, KC_DOWN, KC_RGHT),
[1] = LAYOUT_iso( /* keymap for layer 1 */ [1] = LAYOUT_iso( /* keymap for layer 1 */
RGB_TOG, RGB_VAD, RGB_VAI, BL_DEC, BL_INC, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_SPD, RGB_SPI, RGB_M_P, KC_MUTE, RGB_TOG, RGB_VAD, RGB_VAI, BL_DEC, BL_INC, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_SPD, RGB_SPI, RGB_M_P, KC_MUTE,
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_DEL, KC_INS, 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_DEL, KC_INS,
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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), 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, MO(2), KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LT(1, KC_APP), KC_TRNS, KC_TRNS, KC_TRNS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LT(1, KC_APP), KC_TRNS, KC_TRNS, KC_TRNS),
[2] = LAYOUT_iso( /* keymap for layer 2 */ [2] = LAYOUT_iso( /* keymap for layer 2 */
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, 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, 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, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), 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, MO(2), KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LT(1, KC_APP), KC_TRNS, KC_TRNS, KC_TRNS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LT(1, KC_APP), KC_TRNS, KC_TRNS, KC_TRNS),
[3] = LAYOUT_iso( /* keymap for layer 3 */ [3] = LAYOUT_iso( /* keymap for layer 3 */
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, 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, 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),
}; };
/* Encoder */ /* Encoder */
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
/* The first if reads the first encoder, not needed on this board which only features a single one */ /* The first if reads the first encoder, not needed on this board which only features a single one */
if (index == 0) { if (index == 0) {
/* The switch case allows for different encoder mappings on different layers, "default" map gets applied for all unspecified layers */ /* The switch case allows for different encoder mappings on different layers, "default" map gets applied for all unspecified layers */
@ -79,4 +79,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break; break;
} }
} }
return true;
} }

View file

@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
enum layers{ enum layers{
@ -52,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
), ),
[_NAV] = LAYOUT_default( [_NAV] = LAYOUT_default(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC,
KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TAB, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TAB,
KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_LCAP, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_ENT, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_LCAP, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_ENT,
@ -60,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
), ),
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* left encoder */ if (index == 0) { /* left encoder */
if (clockwise) { if (clockwise) {
tap_code(KC_WH_U); tap_code(KC_WH_U);
@ -74,6 +74,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD); tap_code(KC_VOLD);
} }
} }
return true;
} }
#ifdef COMBO_ENABLE #ifdef COMBO_ENABLE
@ -91,4 +92,3 @@ combo_t key_combos[COMBO_COUNT] = {
[COMBO_DEL] = COMBO(combo_del,KC_DEL) [COMBO_DEL] = COMBO(combo_del,KC_DEL)
}; };
#endif #endif

View file

@ -17,12 +17,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "evolv.h" #include "evolv.h"
__attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) return false;
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
if (clockwise) { if (clockwise) {
tap_code(KC_VOLU); tap_code(KC_VOLU);
} else { } else {
tap_code(KC_VOLD); tap_code(KC_VOLD);
} }
} }
return true;
} }

View file

@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
switch(get_highest_layer(layer_state)){ switch(get_highest_layer(layer_state)){
case 1: //Layer 1 case 1: //Layer 1
if (!clockwise) { // Remove ! to reverse direction if (!clockwise) { // Remove ! to reverse direction
@ -35,4 +35,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
} }
break; break;
} }
return true;
} }

View file

@ -19,32 +19,32 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT( [0] = LAYOUT(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS,
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS,
KC_LGUI, MO(1), KC_SPC, KC_LBRC, KC_RBRC, KC_ENT, MO(2), KC_BSPC), KC_LGUI, MO(1), KC_SPC, KC_LBRC, KC_RBRC, KC_ENT, MO(2), KC_BSPC),
[1] = LAYOUT( [1] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______), _______, _______, _______, _______, _______, _______, _______, _______),
[2] = LAYOUT( [2] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______), _______, _______, _______, _______, _______, _______, _______, _______),
[3] = LAYOUT( [3] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______), _______, _______, _______, _______, _______, _______, _______, _______),
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
if (clockwise) { if (clockwise) {
tap_code(KC_PGDN); tap_code(KC_PGDN);
@ -58,4 +58,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_UP); tap_code(KC_UP);
} }
} }
} return true;
}

View file

@ -19,32 +19,32 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT( [0] = LAYOUT(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS,
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS,
KC_LGUI, MO(1), KC_SPC, KC_LBRC, KC_RBRC, KC_ENT, MO(2), KC_BSPC), KC_LGUI, MO(1), KC_SPC, KC_LBRC, KC_RBRC, KC_ENT, MO(2), KC_BSPC),
[1] = LAYOUT( [1] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______), _______, _______, _______, _______, _______, _______, _______, _______),
[2] = LAYOUT( [2] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______), _______, _______, _______, _______, _______, _______, _______, _______),
[3] = LAYOUT( [3] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______), _______, _______, _______, _______, _______, _______, _______, _______),
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
if (clockwise) { if (clockwise) {
tap_code(KC_PGDN); tap_code(KC_PGDN);
@ -58,4 +58,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_UP); tap_code(KC_UP);
} }
} }
} return true;
}

View file

@ -1,18 +1,18 @@
/* Copyright 2021 FluxLab /* Copyright 2021 FluxLab
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or * the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
@ -25,7 +25,7 @@ enum custom_layers {
_LOWER, _LOWER,
_RAISE, _RAISE,
_ADJUST, _ADJUST,
}; };
#define LOWER MO(_LOWER) #define LOWER MO(_LOWER)
#define RAISE MO(_RAISE) #define RAISE MO(_RAISE)
@ -71,10 +71,11 @@ layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
} }
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) { if (clockwise) {
tap_code(KC_VOLD); tap_code(KC_VOLD);
} else { } else {
tap_code(KC_VOLU); tap_code(KC_VOLU);
} }
return true;
} }

View file

@ -55,10 +55,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) { if (clockwise) {
tap_code(KC_VOLU); tap_code(KC_VOLU);
} else { } else {
tap_code(KC_VOLD); tap_code(KC_VOLD);
} }
return true;
} }

View file

@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
), ),
[1] = LAYOUT( [1] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
@ -65,10 +65,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) { if (clockwise) {
tap_code(KC_VOLU); tap_code(KC_VOLU);
} else { } else {
tap_code(KC_VOLD); tap_code(KC_VOLD);
} }
return true;
} }

View file

@ -47,10 +47,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) { if (clockwise) {
tap_code(KC_MS_WH_RIGHT); tap_code(KC_MS_WH_RIGHT);
} else { } else {
tap_code(KC_MS_WH_LEFT); tap_code(KC_MS_WH_LEFT);
} }
return true;
} }

View file

@ -1,16 +1,17 @@
#ifndef HADRON_H #ifndef HADRON_H
#define HADRON_H #define HADRON_H
#ifdef SUBPROJECT_ver0 #include "quantum.h"
#ifdef KEYBOARD_hadron_ver0
#include "ver0.h" #include "ver0.h"
#endif #endif
#ifdef SUBPROJECT_ver2 #ifdef KEYBOARD_hadron_ver2
#include "ver2.h" #include "ver2.h"
#endif #endif
#ifdef SUBPROJECT_ver3 #ifdef KEYBOARD_hadron_ver3
#include "ver3.h" #include "ver3.h"
#endif #endif
#include "quantum.h"
#define LAYOUT( \ #define LAYOUT( \

View file

@ -18,6 +18,7 @@
#include "action_layer.h" #include "action_layer.h"
#include "haptic.h" #include "haptic.h"
#ifdef RGB_MATRIX_ENABLE #ifdef RGB_MATRIX_ENABLE
#include "rgb_matrix.h" #include "rgb_matrix.h"
@ -181,9 +182,13 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
return process_record_user(keycode, record); return process_record_user(keycode, record);
} }
void encoder_update_kb(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise);
bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) return false;
encoder_value = (encoder_value + (clockwise ? 1 : -1)) % 64; encoder_value = (encoder_value + (clockwise ? 1 : -1)) % 64;
queue_for_send = true; queue_for_send = true;
return true;
} }
#endif #endif

View file

@ -15,4 +15,4 @@
*/ */
#pragma once #pragma once
#include "hadron.h" #include "hadron.h"

View file

@ -37,11 +37,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}; };
#ifdef ENCODER_ENABLE #ifdef ENCODER_ENABLE
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index != 0) if (index != 0)
return; return;
tap_code(clockwise ? KC_VOLU : KC_VOLD); tap_code(clockwise ? KC_VOLU : KC_VOLD);
return true;
} }
#endif #endif

View file

@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#ifdef ENCODER_ENABLE #ifdef ENCODER_ENABLE
#include "encoder.h" #include "encoder.h"
void encoder_update_user(int8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */ if (index == 0) { /* First encoder */
if (clockwise) { if (clockwise) {
tap_code(KC_VOLU); tap_code(KC_VOLU);
@ -37,5 +37,6 @@ void encoder_update_user(int8_t index, bool clockwise) {
tap_code(KC_VOLD); tap_code(KC_VOLD);
} }
} }
return true;
} }
#endif #endif

View file

@ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
), ),
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == _ENCODER) { if (index == _ENCODER) {
if (clockwise) { if (clockwise) {
tap_code(KC_VOLU); tap_code(KC_VOLU);
@ -47,4 +47,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD); tap_code(KC_VOLD);
} }
} }
return true;
} }

View file

@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}; };
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == _ENCODER) { if (index == _ENCODER) {
if (clockwise) { if (clockwise) {
tap_code(KC_VOLU); tap_code(KC_VOLU);
@ -49,6 +49,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD); tap_code(KC_VOLD);
} }
} }
return true;
} }

View file

@ -229,7 +229,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
return state; return state;
} }
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { if (index == 0) {
if (!alpha_pressed) { if (!alpha_pressed) {
tap_code(clockwise ? KC_VOLD : KC_VOLU); tap_code(clockwise ? KC_VOLD : KC_VOLU);
@ -243,6 +243,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(clockwise ? KC_PGUP : KC_PGDN); tap_code(clockwise ? KC_PGUP : KC_PGDN);
} }
} }
return true;
} }
#ifdef OLED_DRIVER_ENABLE #ifdef OLED_DRIVER_ENABLE

View file

@ -174,7 +174,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return taphold_process(keycode, record); return taphold_process(keycode, record);
} }
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { if (index == 0) {
if (!alpha_pressed) { if (!alpha_pressed) {
tap_code(clockwise ? KC_VOLD : KC_VOLU); tap_code(clockwise ? KC_VOLD : KC_VOLU);
@ -188,6 +188,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(clockwise ? KC_PGUP : KC_PGDN); tap_code(clockwise ? KC_PGUP : KC_PGDN);
} }
} }
return true;
} }
#ifdef OLED_DRIVER_ENABLE #ifdef OLED_DRIVER_ENABLE

View file

@ -561,7 +561,7 @@ void oled_task_user(void) {
} }
} }
void encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
// On the left, control the volume. On the right, scroll the page // On the left, control the volume. On the right, scroll the page
if (index == 0) { if (index == 0) {
if (clockwise) { if (clockwise) {
@ -576,4 +576,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD); tap_code(KC_VOLD);
} }
} }
return true;
} }

View file

@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, KC_P7 , KC_P8 , KC_P9 , KC_PPLS, KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, KC_P7 , KC_P8 , KC_P9 , KC_PPLS,
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_P4 , KC_P5 , KC_P6 , KC_EQL , 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_P4 , KC_P5 , KC_P6 , KC_EQL ,
KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_P1 , KC_P2 , KC_P3 , KC_PENT, KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_P1 , KC_P2 , KC_P3 , KC_PENT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_PDOT KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_PDOT
), ),
/* FN /* FN
@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | | | | | | | | | * | | | | | | | | | | | | | | | | | | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------' * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------'
*/ */
[_FN] = LAYOUT( /* Function */ [_FN] = LAYOUT( /* Function */
RESET , KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_F21 , DM_REC1, DM_REC2, DM_RSTP, _______, _______, _______, MO(_FN), DEBUG, RESET , KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_F21 , DM_REC1, DM_REC2, DM_RSTP, _______, _______, _______, MO(_FN), DEBUG,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
@ -64,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
) )
}; };
@ -73,23 +73,24 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch(keycode) { switch(keycode) {
case M_EXAMPLE1: case M_EXAMPLE1:
SEND_STRING("This is an example macro!"SS_TAP(X_ENTER)); //prints "This is an example macro!" and hits Enter SEND_STRING("This is an example macro!"SS_TAP(X_ENTER)); //prints "This is an example macro!" and hits Enter
return false; return false;
case M_EXAMPLE2: case M_EXAMPLE2:
SEND_STRING("This is a another example!"SS_TAP(X_ENTER)); //prints "This is a another example!" and hits Enter SEND_STRING("This is a another example!"SS_TAP(X_ENTER)); //prints "This is a another example!" and hits Enter
return false; return false;
} }
} }
return true; return true;
}; };
void encoder_update(bool clockwise) { bool encoder_update(bool clockwise) {
if (clockwise) { if (clockwise) {
tap_code(KC_VOLU); tap_code(KC_VOLU);
} else { } else {
tap_code(KC_VOLD); tap_code(KC_VOLD);
} }
return true;
} }
void matrix_init_user(void) { void matrix_init_user(void) {
// Call the keymap level matrix init. // Call the keymap level matrix init.
@ -115,4 +116,4 @@ void led_set_kb(uint8_t usb_led) {
} else { } else {
writePinHigh(C6); writePinHigh(C6);
} }
} }

Some files were not shown because too many files have changed in this diff Show more