mirror of
https://github.com/qmk/qmk_firmware
synced 2024-11-11 14:40:06 +00:00
[Keyboard] Fix Pulse4k info.json LAYOUT name (#7965)
* Fix Pulse4k info.json LAYOUT name * Add missing functions to fix configurator Add empty encoder functions to the keyboard code, as the configurator doesn't see the keymap defined functions at first. To be able to override these functions, they are marked as 'weak'. * Rework encoder functions another time Default implementation is now provided as part of the keyboard, but they can still be overriden within the keymap (template is commented out by default)
This commit is contained in:
parent
4d06d2835c
commit
0d80c7bd59
3 changed files with 20 additions and 11 deletions
|
@ -6,7 +6,7 @@
|
|||
"width": 3,
|
||||
"height": 2,
|
||||
"layouts": {
|
||||
"LAYOUT_pulse4k": {
|
||||
"LAYOUT": {
|
||||
"key_count": 6,
|
||||
"layout": [
|
||||
{ "w": 1, "x": 0, "y": 0 },
|
||||
|
|
|
@ -31,18 +31,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
// Override if necessary
|
||||
/*
|
||||
void encoder_one_update(bool clockwise) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_PGDN);
|
||||
} else {
|
||||
tap_code(KC_PGUP);
|
||||
}
|
||||
}
|
||||
|
||||
void encoder_two_update(bool clockwise) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
//*/
|
||||
|
|
|
@ -59,3 +59,19 @@ void encoder_update_kb(uint8_t index, bool clockwise) {
|
|||
} else encoder_two_update(clockwise);
|
||||
}
|
||||
}
|
||||
|
||||
__attribute__((weak)) void encoder_one_update(bool clockwise) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_PGDN);
|
||||
} else {
|
||||
tap_code(KC_PGUP);
|
||||
}
|
||||
}
|
||||
|
||||
__attribute__((weak)) void encoder_two_update(bool clockwise) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue