Skip to content

Commit

Permalink
sync changes with qmk PR
Browse files Browse the repository at this point in the history
  • Loading branch information
VeyPatch committed Oct 29, 2024
1 parent a2ff903 commit 1481c0f
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 28 deletions.
24 changes: 1 addition & 23 deletions keyboards/splitkb/halcyon/kyria/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,26 +203,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
// ),
//
};

#ifdef ENCODER_ENABLE
bool encoder_update_user(uint8_t index, bool clockwise) {

if (index == 0) {
// Volume control
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
} else if (index == 1) {
// Page up/Page down
if (clockwise) {
tap_code(KC_PGDN);
} else {
tap_code(KC_PGUP);
}
}
return false;
}
#endif
};
8 changes: 3 additions & 5 deletions keyboards/splitkb/halcyon/kyria/rev4/keyboard.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"keyboard_name": "Halcyon Kyria rev4",
"bootloader": "rp2040",
"build": {
"lto": true
},
"diode_direction": "COL2ROW",
"encoder": {
"enabled": true,
Expand Down Expand Up @@ -156,8 +153,9 @@
"driver": "vendor"
},
"transport": {
"watchdog": true,
"watchdog_timeout": 3000
"sync": {
"matrix_state": true
}
}
},
"usb": {
Expand Down
26 changes: 26 additions & 0 deletions keyboards/splitkb/halcyon/kyria/rev4/rev4.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright 2024 splitkb.com (support@splitkb.com)
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H

#ifdef ENCODER_ENABLE
bool encoder_update_kb(uint8_t index, bool clockwise) {

if (index == 0) {
// Volume control
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
} else if (index == 1) {
// Page up/Page down
if (clockwise) {
tap_code(KC_PGDN);
} else {
tap_code(KC_PGUP);
}
}
return false;
}
#endif

0 comments on commit 1481c0f

Please sign in to comment.