2021-12-30 05:17:34 +01:00
|
|
|
// Copyright 2021 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
|
|
#include "drashna.h"
|
|
|
|
|
2022-08-28 21:55:19 +02:00
|
|
|
#ifdef TAPPING_TERM_PER_KEY
|
2021-12-30 05:17:34 +01:00
|
|
|
__attribute__((weak)) uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
|
|
|
|
switch (keycode) {
|
|
|
|
case BK_LWER:
|
|
|
|
return TAPPING_TERM + 25;
|
|
|
|
default:
|
|
|
|
return TAPPING_TERM;
|
|
|
|
}
|
|
|
|
}
|
2022-08-28 21:55:19 +02:00
|
|
|
#endif // TAPPING_TERM_PER_KEY
|
2021-12-30 05:17:34 +01:00
|
|
|
|
2022-08-28 21:55:19 +02:00
|
|
|
#ifdef PERMISSIVE_HOLD_PER_KEY
|
2021-12-30 05:17:34 +01:00
|
|
|
__attribute__((weak)) bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) {
|
|
|
|
// Immediately select the hold action when another key is tapped:
|
|
|
|
// return true;
|
|
|
|
// Do not select the hold action when another key is tapped.
|
|
|
|
// return false;
|
|
|
|
switch (keycode) {
|
|
|
|
default:
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
2022-08-28 21:55:19 +02:00
|
|
|
#endif // PERMISSIVE_HOLD_PER_KEY
|
2021-12-30 05:17:34 +01:00
|
|
|
|
2022-08-28 21:55:19 +02:00
|
|
|
#ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY
|
2021-12-30 05:17:34 +01:00
|
|
|
__attribute__((weak)) bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) {
|
|
|
|
// Immediately select the hold action when another key is pressed.
|
|
|
|
// return true;
|
|
|
|
// Do not select the hold action when another key is pressed.
|
|
|
|
// return false;
|
|
|
|
switch (keycode) {
|
2022-07-03 04:55:46 +02:00
|
|
|
// case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
|
|
|
|
// return true;
|
2021-12-30 05:17:34 +01:00
|
|
|
default:
|
2022-08-28 21:55:19 +02:00
|
|
|
return false;
|
2021-12-30 05:17:34 +01:00
|
|
|
}
|
|
|
|
}
|
2022-08-28 21:55:19 +02:00
|
|
|
#endif // HOLD_ON_OTHER_KEY_PRESS_PER_KEY
|
2021-12-30 05:17:34 +01:00
|
|
|
|
2022-12-12 16:52:22 +01:00
|
|
|
#ifdef QUICK_TAP_TERM_PER_KEY
|
|
|
|
__attribute__((weak)) uint16_t get_quick_tap_term(uint16_t keycode, keyrecord_t *record) {
|
2021-12-30 05:17:34 +01:00
|
|
|
switch (keycode) {
|
|
|
|
default:
|
2022-12-12 16:52:22 +01:00
|
|
|
return QUICK_TAP_TERM;
|
2021-12-30 05:17:34 +01:00
|
|
|
}
|
|
|
|
}
|
2022-12-12 16:52:22 +01:00
|
|
|
#endif // QUICK_TAP_TERM_PER_KEY
|
2021-12-30 05:17:34 +01:00
|
|
|
|
2022-08-28 21:55:19 +02:00
|
|
|
#ifdef RETRO_TAPPING_PER_KEY
|
2021-12-30 05:17:34 +01:00
|
|
|
__attribute__((weak)) bool get_retro_tapping(uint16_t keycode, keyrecord_t *record) {
|
|
|
|
switch (keycode) {
|
|
|
|
default:
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
2022-08-28 21:55:19 +02:00
|
|
|
#endif // RETRO_TAPPING_PER_KEY
|