From 4b9ba0dcc5cb708c6197aca941da6248b896aa2b Mon Sep 17 00:00:00 2001 From: KiwiKey <75843996+kiwikey@users.noreply.github.com> Date: Sat, 18 Dec 2021 09:29:48 +0700 Subject: [Keyboard] Add Borderland (#15501) Co-authored-by: Drashna Jaelre --- keyboards/kiwikey/borderland/borderland.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 keyboards/kiwikey/borderland/borderland.c (limited to 'keyboards/kiwikey/borderland/borderland.c') diff --git a/keyboards/kiwikey/borderland/borderland.c b/keyboards/kiwikey/borderland/borderland.c new file mode 100644 index 0000000000..660e8026fc --- /dev/null +++ b/keyboards/kiwikey/borderland/borderland.c @@ -0,0 +1,18 @@ +// Copyright 2021 KiwiKey (@KiwiKey) +// 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 -- cgit v1.2.1