diff options
author | Synth and Keys <[email protected]> | 2023-08-02 11:05:00 -0600 |
---|---|---|
committer | GitHub <[email protected]> | 2023-08-02 10:05:00 -0700 |
commit | 34a2f1427426e28f9e260e2e9f53a63a131e6ad2 (patch) | |
tree | f97a7dbdba2e2d622d04cc7eb8fb28b3e741a550 /keyboards/synthandkeys/bento_box/bento_box.c | |
parent | d16d87c2f33f66e02861a657f259a9c82307de8f (diff) | |
download | qmk_firmware-34a2f1427426e28f9e260e2e9f53a63a131e6ad2.tar.gz qmk_firmware-34a2f1427426e28f9e260e2e9f53a63a131e6ad2.zip |
[Keyboard] Add Bento Box macropad (#20521)
Diffstat (limited to 'keyboards/synthandkeys/bento_box/bento_box.c')
-rw-r--r-- | keyboards/synthandkeys/bento_box/bento_box.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/keyboards/synthandkeys/bento_box/bento_box.c b/keyboards/synthandkeys/bento_box/bento_box.c new file mode 100644 index 0000000000..5ef0678f5e --- /dev/null +++ b/keyboards/synthandkeys/bento_box/bento_box.c @@ -0,0 +1,37 @@ +// Copyright 2023 Synth-and-Keys (@Synth-and-Keys) +// 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; + } + /*Main Encoder*/ + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + /* TOP LEFT*/ + else if (index == 1) { + if (clockwise) { + tap_code16(C(KC_EQUAL)); + } else { + tap_code16(C(KC_MINUS)); + } + } + /* TOP RIGHT*/ + else if (index == 2) { + if (clockwise) { + tap_code16(C(KC_Y)); + } else { + tap_code16(C(KC_Z)); + } + } + return true; +} +#endif
\ No newline at end of file |