Add core/fallback encoder behaviour (#20320)
This commit is contained in:
parent
7e48a4e80f
commit
36ab0c0aaa
|
@ -102,9 +102,9 @@ Using encoder mapping pumps events through the normal QMK keycode processing pip
|
|||
|
||||
## Callbacks
|
||||
|
||||
When not using `ENCODER_MAP_ENABLE = yes`, the callback functions can be inserted into your `<keyboard>.c`:
|
||||
?> [**Default Behaviour**](https://github.com/qmk/qmk_firmware/blob/master/quantum/encoder.c#L79-#L98): all encoders installed will function as volume up (`KC_VOLU`) on clockwise rotation and volume down (`KC_VOLD`) on counter-clockwise rotation. If you do not wish to override this, no further configuration is necessary.
|
||||
|
||||
?> Those who are adding new keyboard support where encoders are enabled at the keyboard level should include basic encoder functionality at the keyboard level (`<keyboard>.c`) using the `encoder_update_kb()` function, that way it works for QMK Configuator users and exists in general.
|
||||
If you would like the alter the default behaviour, and are not using `ENCODER_MAP_ENABLE = yes`, the callback functions can be inserted into your `<keyboard>.c`:
|
||||
|
||||
```c
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
|
@ -113,9 +113,9 @@ bool encoder_update_kb(uint8_t index, bool clockwise) {
|
|||
}
|
||||
if (index == 0) { /* First encoder */
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
tap_code(KC_PGDN);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
tap_code(KC_PGUP);
|
||||
}
|
||||
} else if (index == 1) { /* Second encoder */
|
||||
if (clockwise) {
|
||||
|
@ -134,9 +134,9 @@ or `keymap.c`:
|
|||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) { /* First encoder */
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
tap_code(KC_PGDN);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
tap_code(KC_PGUP);
|
||||
}
|
||||
} else if (index == 1) { /* Second encoder */
|
||||
if (clockwise) {
|
||||
|
@ -149,7 +149,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
|
|||
}
|
||||
```
|
||||
|
||||
!> If you return `true` in the keymap level `_user` function, it will allow the keyboard level encoder code to run on top of your own. Returning `false` will override the keyboard level function, if setup correctly. This is generally the safest option to avoid confusion.
|
||||
!> If you return `true` in the keymap level `_user` function, it will allow the keyboard/core level encoder code to run on top of your own. Returning `false` will override the keyboard level function, if setup correctly. This is generally the safest option to avoid confusion.
|
||||
|
||||
## Hardware
|
||||
|
||||
|
|
|
@ -20,14 +20,3 @@ void board_init(void) {
|
|||
setPinInput(B6);
|
||||
setPinInput(B7);
|
||||
}
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if(!encoder_update_user(index, clockwise)) return false;
|
||||
if (index == 0) {
|
||||
if (clockwise) tap_code_delay(KC_VOLU, 10);
|
||||
else tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -40,17 +40,3 @@ led_config_t g_led_config = { {
|
|||
} };
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -68,18 +68,3 @@ bool oled_task_kb(void) {
|
|||
return(true);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) {
|
||||
return false;
|
||||
}
|
||||
// Volume control
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
|
@ -14,18 +14,6 @@ void keyboard_post_init_kb(void) {
|
|||
keyboard_post_init_user();
|
||||
}
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
|
||||
bool oled_task_kb(void) {
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
// Copyright 2022 Leon Anavi <leon@anavi.org>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#include "encoder.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
@ -15,27 +15,3 @@
|
|||
*/
|
||||
|
||||
#include "ano.h"
|
||||
|
||||
/* The encoder_update_user is a function.
|
||||
* It'll be called by QMK every time you turn the encoder.
|
||||
*
|
||||
* The index parameter tells you which encoder was turned. If you only have
|
||||
* one encoder, the index will always be zero.
|
||||
*
|
||||
* The clockwise parameter tells you the direction of the encoder. It'll be
|
||||
* true when you turned the encoder clockwise, and false otherwise.
|
||||
*/
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_AUDIO_VOL_UP);
|
||||
} else {
|
||||
tap_code(KC_AUDIO_VOL_DOWN);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
|
@ -19,23 +19,6 @@ void keyboard_pre_init_kb(void) {
|
|||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
#if defined(ENCODER_ENABLE)
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) {
|
||||
/* Don't process further events if user function exists and returns false */
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Ignore index - only one encoder on this board */
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
void suspend_power_down_kb(void) {
|
||||
/* Disable indicator LEDs when going to sleep */
|
||||
|
|
|
@ -65,17 +65,3 @@ oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
|
|||
return OLED_ROTATION_180;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
|
@ -15,13 +15,3 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "balance.h"
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -15,17 +15,3 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "ortho60v2.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) {
|
||||
return false;
|
||||
}
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
/* Copyright 2021 Nathan Spears
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
/* Copyright 2020 Nathan Spears
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
|
@ -15,15 +15,3 @@
|
|||
*/
|
||||
|
||||
#include "quark_squared.h"
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
// Copyright 2022 Vitaly Volkov (@vlkv)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
|
@ -16,15 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/
|
||||
|
||||
#include "ck60i.h"
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) return false;
|
||||
if (index == 0) { /* First encoder */
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
/* Copyright 2021 RyanDam (https://github.com/RyanDam)
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#if defined(ENCODER_ENABLE)
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
|
@ -1,27 +0,0 @@
|
|||
/* Copyright 2020 Harry Herring
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "quantum.h"
|
||||
|
||||
/* Encoder setting. only one encoder despite 4 possible spots */
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) return false;
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
return true;
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
/* Copyright 2020 customMK
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) return false;
|
||||
/* top left encoder */
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
/* top right encoder */
|
||||
else if (index == 1) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
/* Copyright 2020 customMK
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
/* top left encoder */
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
/* top right encoder */
|
||||
else if (index == 1) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -14,15 +14,3 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "packrat.h"
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -133,16 +133,3 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
|
|||
{ 1, H_16, G_16, I_16 }
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) return false;
|
||||
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -100,22 +100,3 @@ bool led_update_kb(led_t led_state) {
|
|||
writePin(LED_02, !led_state.num_lock);
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) {
|
||||
return false;
|
||||
}
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case 0:
|
||||
// main layer, volume
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -16,13 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/
|
||||
|
||||
#include "evolv.h"
|
||||
|
||||
#ifndef MEDIA_KEY_DELAY
|
||||
# define MEDIA_KEY_DELAY 100
|
||||
#endif
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) return false;
|
||||
tap_code_delay(clockwise ? KC_VOLU : KC_VOLD, MEDIA_KEY_DELAY);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -14,17 +14,3 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "sprh.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
|
@ -15,17 +15,3 @@
|
|||
*/
|
||||
|
||||
#include "theboulevard.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
|
@ -29,17 +29,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10); // Right
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10); // Left
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// OLED
|
||||
#ifdef OLED_ENABLE
|
||||
__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; }
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
// Copyright 2022 QMK
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
// This will be overridden by encoder map in all default keymaps, but serves as a catch-all for user keymaps that may omit the map.
|
||||
#if defined (ENCODER_ENABLE) && !defined (ENCODER_MAP_ENABLE)
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) {
|
||||
return false; /* Don't process further events if user function exists and returns false */
|
||||
}
|
||||
if (index == 0) { /* First encoder */
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
|
@ -1,21 +0,0 @@
|
|||
// Copyright 2022 QMK
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
// This will be overridden by encoder map in all default keymaps, but serves as a catch-all for user keymaps that may omit the map.
|
||||
#if defined (ENCODER_ENABLE) && !defined (ENCODER_MAP_ENABLE)
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) {
|
||||
return false; /* Don't process further events if user function exists and returns false */
|
||||
}
|
||||
if (index == 0) { /* First encoder */
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
|
@ -120,17 +120,3 @@ void keyboard_pre_init_user(void) {
|
|||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) {
|
||||
return false;
|
||||
}
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "quantum.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) {
|
||||
return false;
|
||||
}
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
|
@ -15,15 +15,3 @@
|
|||
*/
|
||||
|
||||
#include "gorthage_truck.h"
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
// Copyright 2022 Commander1024 (@Commander1024)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#include "quantum.h"
|
||||
|
||||
// rotary encoder
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) {
|
||||
return false;
|
||||
}
|
||||
// Volume control
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLD);
|
||||
} else {
|
||||
tap_code(KC_VOLU);
|
||||
}
|
||||
return true;
|
||||
};
|
||||
#endif
|
|
@ -1,33 +0,0 @@
|
|||
/* Copyright 2023 Maverick0197
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) {
|
||||
return false;
|
||||
}
|
||||
//if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
//}
|
||||
return false;
|
||||
};
|
||||
#endif // ENCODER_MAP_ENABLE
|
|
@ -16,17 +16,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/
|
||||
#include "bumblebee.h"
|
||||
|
||||
// Encoder
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise))
|
||||
return false;
|
||||
if (clockwise)
|
||||
tap_code(KC_VOLU);
|
||||
else
|
||||
tap_code(KC_VOLD);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Initialize all RGB indicators to 'off'
|
||||
void keyboard_post_init_kb(void) {
|
||||
rgblight_setrgb_at(0, 0, 0, 0); // [..., 0] = top LED
|
||||
|
|
|
@ -15,17 +15,3 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "digicarp65.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -16,20 +16,6 @@
|
|||
|
||||
#include "tsubasa.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
static void render_scrl(void) {
|
||||
static const char PROGMEM raw_scrl[] = {
|
||||
|
|
|
@ -2,17 +2,3 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "io_mini1800.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -18,16 +18,6 @@
|
|||
|
||||
char wpm_str[10];
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) return false;
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
|
||||
// Defines names for use in layer keycodes and the keymap
|
||||
|
|
|
@ -16,15 +16,3 @@
|
|||
*/
|
||||
|
||||
#include "gentleman65.h"
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) { /* First encoder */
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_AUDIO_VOL_UP, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_AUDIO_VOL_DOWN, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
|
@ -16,17 +16,3 @@
|
|||
*/
|
||||
|
||||
#include "gentleman65_se_s.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) { /* First encoder */
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_AUDIO_VOL_UP, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_AUDIO_VOL_DOWN, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -15,13 +15,3 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "arya.h"
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -24,15 +24,3 @@ void eeconfig_init_kb(void) {
|
|||
eeconfig_update_kb(0);
|
||||
eeconfig_init_user();
|
||||
}
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -15,15 +15,3 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "coarse60.h"
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
/* Copyright 2021 Elliot Powell
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "quantum.h"
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
|
@ -84,17 +84,3 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
|
|||
}
|
||||
|
||||
#endif // CAPS_LOCK_LED_INDEX
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -98,17 +98,3 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
|
|||
}
|
||||
|
||||
#endif // RGB_MATRIX_ENABLE...
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -17,12 +17,6 @@
|
|||
#include "quantum.h"
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
tap_code(clockwise ? KC_VOLU : KC_VOLD);
|
||||
return true;
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT_ortho_2x2u(
|
||||
0,
|
||||
|
|
|
@ -2,17 +2,3 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "unicorn.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -16,31 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/
|
||||
|
||||
#include "gameroyadvance.h"
|
||||
|
||||
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
|
||||
if (index == 0) {
|
||||
|
||||
if (clockwise) {
|
||||
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
|
||||
} else {
|
||||
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -15,15 +15,3 @@
|
|||
*/
|
||||
|
||||
#include "macro.h"
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) return false;
|
||||
if (index == 0) { /* First encoder */
|
||||
if (clockwise) {
|
||||
tap_code(KC_AUDIO_VOL_UP);
|
||||
} else {
|
||||
tap_code(KC_AUDIO_VOL_DOWN);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -15,15 +15,3 @@
|
|||
*/
|
||||
|
||||
#include "macro_v2.h"
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) return false;
|
||||
if (index == 0) { /* First encoder */
|
||||
if (clockwise) {
|
||||
tap_code(KC_AUDIO_VOL_UP);
|
||||
} else {
|
||||
tap_code(KC_AUDIO_VOL_DOWN);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -2,17 +2,3 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "borderland.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -57,17 +57,3 @@ bool rgb_matrix_indicators_kb(void) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -127,17 +127,3 @@ bool rgb_matrix_indicators_kb(void) {
|
|||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -14,13 +14,3 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "latinpadble.h"
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (clockwise) {
|
||||
tap_code(KC_PGDN);
|
||||
} else {
|
||||
tap_code(KC_PGUP);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -2,22 +2,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#include "bongopad.h"
|
||||
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) {
|
||||
return false;
|
||||
}
|
||||
// rest fo the code
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
bool oled_task_kb(void) {
|
||||
if (!oled_task_user()) {
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
// Copyright 2023 Laneware Peripherals
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) return false;
|
||||
if (index == 0) { /* First encoder */
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
|
@ -15,16 +15,3 @@
|
|||
*/
|
||||
|
||||
#include "lw67.h"
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) return false;
|
||||
if (index == 0) { /* First encoder */
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,18 +2,3 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "lw75.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) return false;
|
||||
if (index == 0) { /* First encoder */
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -14,18 +14,6 @@
|
|||
*/
|
||||
#include "lck75.h"
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) return false;
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#define IDLE_FRAMES 5
|
||||
#define IDLE_SPEED 30
|
||||
#define TAP_FRAMES 2
|
||||
|
|
|
@ -14,18 +14,3 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "macro1.h"
|
||||
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) {
|
||||
return false;
|
||||
}
|
||||
if (index == 0) { /* First encoder */
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -16,22 +16,6 @@
|
|||
|
||||
#include "quantum.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
static const char PROGMEM mw_logo[] = {
|
||||
0x8A, 0x8B, 0x8C, 0x8D, '\r',
|
||||
|
|
|
@ -17,25 +17,6 @@
|
|||
|
||||
#include "mercutio.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if(!encoder_update_user(index, clockwise)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
static const char PROGMEM mercutio_name[] = {
|
||||
0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0x95, 0xB5, 0x96, 0xD5, 0xB6, 0xB6,
|
||||
|
|
|
@ -15,19 +15,3 @@
|
|||
*/
|
||||
|
||||
#include "obe.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -15,19 +15,3 @@
|
|||
*/
|
||||
|
||||
#include "waka60.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -61,10 +61,4 @@ bool encoder_update_kb(uint8_t index, bool clockwise)
|
|||
encoder_action_register(index, clockwise);
|
||||
return true;
|
||||
};
|
||||
#else
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
tap_code_delay(clockwise ? KC_VOLU : KC_VOLD, 10);
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -15,11 +15,3 @@
|
|||
*/
|
||||
|
||||
#include "zoom65_lite.h"
|
||||
|
||||
#ifndef VIA_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
tap_code_delay(clockwise ? KC_VOLU : KC_VOLD, 10);
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -23,13 +23,3 @@ void led_update_ports(led_t led_state) {
|
|||
backlight_set(0);
|
||||
}
|
||||
}
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) return false;
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -15,14 +15,3 @@
|
|||
*/
|
||||
|
||||
#include "mini_elixivy.h"
|
||||
|
||||
/* Rotary Encoder's function (currently volume up/down) */
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
/* Copyright 2022 DeskDaily
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
|
@ -14,17 +14,3 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "alicekk.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
/* Copyright 2022 TW59420 <https://github.com/TW59420>
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
|
@ -111,17 +111,3 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -15,13 +15,3 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "dango40.h"
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -44,16 +44,3 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
// Volume control
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
/* Copyright 2023 Jason Chestnut <pauperboards@gmail.com> @pauperboards
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) {
|
||||
return false;
|
||||
}
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
|
@ -15,17 +15,3 @@
|
|||
*/
|
||||
|
||||
#include "atlas.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -16,24 +16,6 @@
|
|||
|
||||
#include "pandora.h"
|
||||
|
||||
// Encoder rotate function
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) {
|
||||
return false;
|
||||
}
|
||||
/* First encoder */
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_AUDIO_VOL_UP);
|
||||
} else {
|
||||
tap_code(KC_AUDIO_VOL_DOWN);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Encoder click function
|
||||
#ifdef DIP_SWITCH_ENABLE
|
||||
bool dip_switch_update_kb(uint8_t index, bool active) {
|
||||
|
|
|
@ -15,20 +15,3 @@
|
|||
*/
|
||||
|
||||
#include "zeus.h"
|
||||
|
||||
// Encoder rotate function
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) {
|
||||
return false;
|
||||
} /* First encoder */
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_AUDIO_VOL_UP);
|
||||
} else {
|
||||
tap_code(KC_AUDIO_VOL_DOWN);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -16,24 +16,6 @@
|
|||
|
||||
#include "zeuspad.h"
|
||||
|
||||
// Encoder rotate function
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) {
|
||||
return false;
|
||||
}
|
||||
/* First encoder */
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_AUDIO_VOL_UP, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_AUDIO_VOL_DOWN, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
// 21 characters max
|
||||
#ifdef OLED_ENABLE
|
||||
bool oled_task_kb(void) {
|
||||
|
|
|
@ -77,15 +77,3 @@ bool oled_task_kb(void) {
|
|||
}
|
||||
|
||||
#endif // OLED_ENABLE
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) return false;
|
||||
|
||||
tap_code(clockwise ? KC_VOLU : KC_VOLD);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif // ENCODER_ENABLE
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
/* Copyright 2020 melonbred
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) return false;
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
|
@ -13,19 +13,3 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "rart75hs.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
|
@ -14,22 +14,6 @@
|
|||
*/
|
||||
#include "rart75m.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
bool oled_task_kb(void) {
|
||||
if (!oled_task_user()) {
|
||||
|
|
|
@ -14,22 +14,6 @@
|
|||
*/
|
||||
#include "rartland.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
bool oled_task_kb(void) {
|
||||
if (!oled_task_user()) {
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2023 QMK Contributors (@qmk)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) {
|
||||
return false;
|
||||
}
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
|
@ -23,18 +23,6 @@ enum layers {
|
|||
_ADJUST
|
||||
};
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if(index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLD);
|
||||
} else {
|
||||
tap_code(KC_VOLU);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
|
||||
return OLED_ROTATION_270;
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
/* Copyright 2021 RuckerMachine
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
|
@ -1,11 +1 @@
|
|||
#include "rotr.h"
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) return false;
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -72,8 +72,3 @@ bool led_update_kb(led_t led_state) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -15,17 +15,3 @@
|
|||
*/
|
||||
|
||||
#include "hotswap.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
|
@ -16,17 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/
|
||||
|
||||
#include "aliceclonergb.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index,clockwise)) { return false; }
|
||||
if (index == 0) { /* First encoder */
|
||||
if (clockwise) {
|
||||
tap_code(KC_DOWN);
|
||||
} else {
|
||||
tap_code(KC_UP);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -15,15 +15,3 @@
|
|||
*/
|
||||
|
||||
#include "spacey.h"
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise){
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if(clockwise) {
|
||||
tap_code(KC_VOLD);
|
||||
} else {
|
||||
tap_code(KC_VOLU);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -14,17 +14,3 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "litl.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -15,14 +15,3 @@
|
|||
*/
|
||||
|
||||
#include "taleguers75.h"
|
||||
|
||||
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) return false;
|
||||
if (!clockwise) {
|
||||
tap_code(KC_AUDIO_VOL_DOWN);
|
||||
} else {
|
||||
tap_code(KC_AUDIO_VOL_UP);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -17,20 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#include "quantum.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) { /* First encoder */
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
bool oled_task_kb(void) {
|
||||
if (!oled_task_user()) { return false; }
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
Copyright 2023 ThePanduuh <thepanduuh.kb@gmail.com>
|
||||
|
||||
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
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "quantum.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
|
@ -171,19 +171,3 @@ bool rgb_matrix_indicators_kb(void) {
|
|||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) {
|
||||
return false;
|
||||
}
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
/* Copyright 2022 tominabox1
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
} else {
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif /* ENCODER_ENABLE */
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue