Add support for RETRO_TAPPING to LT(layer, kc)
This commit is contained in:
parent
0ba9620d65
commit
8e47f64888
2 changed files with 10 additions and 1 deletions
|
@ -653,7 +653,7 @@ void process_action(keyrecord_t *record, action_t action)
|
||||||
|
|
||||||
#ifndef NO_ACTION_TAPPING
|
#ifndef NO_ACTION_TAPPING
|
||||||
#ifdef RETRO_TAPPING
|
#ifdef RETRO_TAPPING
|
||||||
if (!is_tap_key(record->event.key)) {
|
if (!is_tap_action(action)) {
|
||||||
retro_tapping_counter = 0;
|
retro_tapping_counter = 0;
|
||||||
} else {
|
} else {
|
||||||
if (event.pressed) {
|
if (event.pressed) {
|
||||||
|
@ -929,7 +929,15 @@ void clear_keyboard_but_mods_and_keys()
|
||||||
bool is_tap_key(keypos_t key)
|
bool is_tap_key(keypos_t key)
|
||||||
{
|
{
|
||||||
action_t action = layer_switch_get_action(key);
|
action_t action = layer_switch_get_action(key);
|
||||||
|
return is_tap_action(action);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** \brief Utilities for actions. (FIXME: Needs better description)
|
||||||
|
*
|
||||||
|
* FIXME: Needs documentation.
|
||||||
|
*/
|
||||||
|
bool is_tap_action(action_t action)
|
||||||
|
{
|
||||||
switch (action.kind.id) {
|
switch (action.kind.id) {
|
||||||
case ACT_LMODS_TAP:
|
case ACT_LMODS_TAP:
|
||||||
case ACT_RMODS_TAP:
|
case ACT_RMODS_TAP:
|
||||||
|
|
|
@ -97,6 +97,7 @@ void clear_keyboard_but_mods(void);
|
||||||
void clear_keyboard_but_mods_and_keys(void);
|
void clear_keyboard_but_mods_and_keys(void);
|
||||||
void layer_switch(uint8_t new_layer);
|
void layer_switch(uint8_t new_layer);
|
||||||
bool is_tap_key(keypos_t key);
|
bool is_tap_key(keypos_t key);
|
||||||
|
bool is_tap_action(action_t action);
|
||||||
|
|
||||||
#ifndef NO_ACTION_TAPPING
|
#ifndef NO_ACTION_TAPPING
|
||||||
void process_record_tap_hint(keyrecord_t *record);
|
void process_record_tap_hint(keyrecord_t *record);
|
||||||
|
|
Loading…
Reference in a new issue