diff options
Diffstat (limited to 'keyboards/adm42')
-rw-r--r-- | keyboards/adm42/config.h | 2 | ||||
-rw-r--r-- | keyboards/adm42/info.json | 1 | ||||
-rw-r--r-- | keyboards/adm42/rev4/keymaps/default/config.h | 3 | ||||
-rw-r--r-- | keyboards/adm42/rev4/keymaps/default/keymap.c | 24 |
4 files changed, 11 insertions, 19 deletions
diff --git a/keyboards/adm42/config.h b/keyboards/adm42/config.h index 50e697a645..5c1a5b2c7c 100644 --- a/keyboards/adm42/config.h +++ b/keyboards/adm42/config.h @@ -16,7 +16,6 @@ #pragma once -#include "config_common.h" #define MATRIX_ROWS 4 #define MATRIX_COLS 12 @@ -24,7 +23,6 @@ #define DIODE_DIRECTION ROW2COL #define TAP_CODE_DELAY 1 -#define DEBOUNCE 10 #if defined(CONSOLE_ENABLE) #define DEBUG_MATRIX_SCAN_RATE diff --git a/keyboards/adm42/info.json b/keyboards/adm42/info.json index 5834be2233..7b9aa82661 100644 --- a/keyboards/adm42/info.json +++ b/keyboards/adm42/info.json @@ -3,6 +3,7 @@ "manufacturer": "Lorenzo Leonini", "url": "https://adm42.dev/", "maintainer": "lleonini", + "debounce": 10, "usb": { "vid": "0x04D8", "pid": "0xE873", diff --git a/keyboards/adm42/rev4/keymaps/default/config.h b/keyboards/adm42/rev4/keymaps/default/config.h index 38c012e938..abfaf9af78 100644 --- a/keyboards/adm42/rev4/keymaps/default/config.h +++ b/keyboards/adm42/rev4/keymaps/default/config.h @@ -1,3 +1,2 @@ #define HOLD_ON_OTHER_KEY_PRESS_PER_KEY -#define TAPPING_FORCE_HOLD_PER_KEY -#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY +#define QUICK_TAP_TERM_PER_KEY diff --git a/keyboards/adm42/rev4/keymaps/default/keymap.c b/keyboards/adm42/rev4/keymaps/default/keymap.c index 7720b07be2..d066445025 100644 --- a/keyboards/adm42/rev4/keymaps/default/keymap.c +++ b/keyboards/adm42/rev4/keymaps/default/keymap.c @@ -93,34 +93,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case RC_QUT: - return true; - default: +bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) { + // Special if-condition outside the switch because `RC_QUT` overlaps with + // the `QK_MOD_TAP ... QK_MOD_TAP_MAX` range. + if (keycode == RC_QUT) { return false; } -} - -bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case LLS_ESC: - case LLS_RALT: - case LLE_ENT: - case LLA_DEL: + case QK_MOD_TAP ... QK_MOD_TAP_MAX: + case QK_LAYER_TAP ... QK_LAYER_TAP_MAX: return true; default: return false; } } -bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { +uint16_t get_quick_tap_term(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case LLS_ESC: case LLS_RALT: - return true; + return 0; default: - return false; + return QUICK_TAP_TERM; } } |