From fcdfbf0085e1a546532268830f212c4de15ecc1a Mon Sep 17 00:00:00 2001 From: yuanwang Date: Tue, 2 Jan 2024 11:09:24 -0600 Subject: [PATCH] Revert "wire repeat and a-repeat" This reverts commit 8854e943341a611ee628162b835293a04843075b. --- qmk/yuanw/keycodes.h | 23 +++++++++++++++++++++++ qmk/yuanw/keymap.c | 27 +++++---------------------- qmk/yuanw/rules.mk | 1 + 3 files changed, 29 insertions(+), 22 deletions(-) create mode 100644 qmk/yuanw/keycodes.h diff --git a/qmk/yuanw/keycodes.h b/qmk/yuanw/keycodes.h new file mode 100644 index 0000000..686840a --- /dev/null +++ b/qmk/yuanw/keycodes.h @@ -0,0 +1,23 @@ +#pragma once + +#include QMK_KEYBOARD_H + + +enum charybdis_keymap_layers { + LAYER_BASE = 0, + LAYER_FUNCTION, + LAYER_NAVIGATION, + LAYER_MEDIA, + LAYER_POINTER, + LAYER_NUMERAL, + LAYER_SYMBOLS, +}; + +#define ESC_MED LT(LAYER_MEDIA, KC_ESC) +#define SPC_NAV LT(LAYER_NAVIGATION, KC_SPC) +#define TAB_FUN LT(LAYER_FUNCTION, KC_BSPC) +#define ENT_SYM LT(LAYER_SYMBOLS, KC_ENT) +#define BSP_NUM LT(LAYER_NUMERAL, KC_E) +#define _L_PTR(KC) LT(LAYER_POINTER, KC) + + diff --git a/qmk/yuanw/keymap.c b/qmk/yuanw/keymap.c index 5141dff..1d218aa 100644 --- a/qmk/yuanw/keymap.c +++ b/qmk/yuanw/keymap.c @@ -1,9 +1,11 @@ +#include "keycodes.h" #ifdef OS_DETECTION_ENABLE # include "os_detection.h" #endif #ifdef CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE # include "timer.h" #endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE +#include "repeat.h" // Automatically enable sniping-mode on the pointer layer. @@ -40,25 +42,6 @@ enum my_keycodes { RDO = SAFE_RANGE, UND, }; -enum charybdis_keymap_layers { - LAYER_BASE = 0, - LAYER_FUNCTION, - LAYER_NAVIGATION, - LAYER_MEDIA, - LAYER_POINTER, - LAYER_NUMERAL, - LAYER_SYMBOLS, -}; - -#define ESC_MED LT(LAYER_MEDIA, KC_ESC) -#define SPC_NAV LT(LAYER_NAVIGATION, KC_SPC) -#define TAB_FUN LT(LAYER_FUNCTION, KC_BSPC) -#define ENT_SYM LT(LAYER_SYMBOLS, KC_ENT) -#define BSP_NUM LT(LAYER_NUMERAL, KC_E) -#define _L_PTR(KC) LT(LAYER_POINTER, KC) - - - // clang-format off /** \brief QWERTY layout (3 rows, 10 columns). */ #define LAYOUT_LAYER_BASE \ @@ -150,9 +133,9 @@ enum charybdis_keymap_layers { */ #define LAYOUT_LAYER_SYMBOLS \ KC_LCBR, KC_AMPR, KC_ASTR, KC_LPRN, KC_RCBR, _______________DEAD_HALF_ROW_______________, \ - KC_COLN, KC_DLR, KC_PERC, KC_CIRC, KC_PLUS, ______________HOME_ROW_GACS_R______________, \ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_PIPE, _______________DEAD_HALF_ROW_______________, \ - QK_REP, QK_AREP, KC_UNDS, _______, XXXXXXX + KC_COLN, KC_DLR, KC_PERC, KC_CIRC, KC_PLUS, ______________HOME_ROW_GACS_R______________, \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_PIPE, _______________DEAD_HALF_ROW_______________, \ + KC_LPRN, KC_RPRN, KC_UNDS, _______, XXXXXXX /** * \brief Add Home Row mod to a layout. diff --git a/qmk/yuanw/rules.mk b/qmk/yuanw/rules.mk index 6d66854..03048f7 100644 --- a/qmk/yuanw/rules.mk +++ b/qmk/yuanw/rules.mk @@ -3,3 +3,4 @@ COMBO_ENABLE = yes CAPS_WORD_ENABLE = yes OS_DETECTION_ENABLE = yes REPEAT_KEY_ENABLE = yes +SRC += repeat.c