[Keyboard] Small fixes for the Atreyu rev1 keyboard (#19098)

This commit is contained in:
Jesus Climent 2022-11-20 03:57:13 -05:00 committed by GitHub
parent eb63857237
commit 6f8bbb1632
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 12 deletions

View file

@ -70,7 +70,7 @@
{"x":11, "y":4.25}, {"x":11, "y":4.25},
{"x":12, "y":4.15}, {"x":12, "y":4.15},
{"x":13, "y":4.125}, {"x":13, "y":4.125},
{"x": 14.5, "y": 4.5} {"x": 15.5, "y": 4.5}
] ]
} }
} }

View file

@ -14,6 +14,8 @@
* 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 "rev1.h"
#ifdef ENCODER_ENABLE #ifdef ENCODER_ENABLE
bool encoder_update_kb(uint8_t index, bool clockwise) { bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) { if (!encoder_update_user(index, clockwise)) {
@ -28,18 +30,10 @@ bool encoder_update_kb(uint8_t index, bool clockwise) {
} }
} }
if (index == 0) { if (index == 0) {
if (IS_LAYER_ON(_LOWER)) { if (clockwise) {
if (clockwise) { tap_code(KC_WH_U);
tap_code(KC_WH_U);
} else {
tap_code(KC_WH_D);
}
} else { } else {
if (clockwise) { tap_code(KC_WH_D);
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
} }
} }
return true; return true;