Skip to content

Commit

Permalink
Rename caps word to prevent clashes (need to update e.g. kyria)
Browse files Browse the repository at this point in the history
  • Loading branch information
halcyonCorsair committed Jun 27, 2022
1 parent ef468c3 commit befd248
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion users/halcyoncorsair/features/caps_word.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void process_caps_word(uint16_t keycode, const keyrecord_t *record) {
case KC_UNDS:
case KC_PIPE:
case REPEAT:
case CAPS_WORD:
case MY_CAPS_WORD:
case OS_LSFT:
case OS_RSFT:
case KC_LPRN:
Expand Down
6 changes: 3 additions & 3 deletions users/halcyoncorsair/halcyoncorsair.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once
#include QMK_KEYBOARD_H
#include "keycode_aliases.h"
#ifdef CAPS_WORD_ENABLE
#ifdef MY_CAPS_WORD_ENABLE
# include "features/caps_word.h"
#endif
#ifdef REPEAT_KEY_ENABLE
Expand Down Expand Up @@ -31,9 +31,9 @@ enum layers {

enum custom_keycodes {
#if defined(KEYBOARD_moonlander)
CAPS_WORD = ML_SAFE_RANGE,
MY_CAPS_WORD = ML_SAFE_RANGE,
#else
CAPS_WORD = SAFE_RANGE,
MY_CAPS_WORD = SAFE_RANGE,
#endif
REPEAT,
SELWORD,
Expand Down
8 changes: 4 additions & 4 deletions users/halcyoncorsair/process_records.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
record->tap.count
);
#endif
#ifdef CAPS_WORD_ENABLE
#ifdef MY_CAPS_WORD_ENABLE
process_caps_word(keycode, record);
#endif
#ifdef REPEAT_KEY_ENABLE
Expand All @@ -30,10 +30,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
return false;

#ifdef CAPS_WORD_ENABLE
case CAPS_WORD:
#ifdef MY_CAPS_WORD_ENABLE
case MY_CAPS_WORD:
# ifdef CONSOLE_ENABLE
uprintf("pru: Activate CAPS_WORD\n");
uprintf("pru: Activate MY_CAPS_WORD\n");
# endif
// Toggle `caps_word_on`
if (record->event.pressed) {
Expand Down
6 changes: 3 additions & 3 deletions users/halcyoncorsair/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ ifeq ($(strip $(COMBO_ENABLE)), yes)
endif


CAPS_WORD_ENABLE ?= no
ifeq ($(strip $(CAPS_WORD_ENABLE)), yes)
MY_CAPS_WORD_ENABLE ?= no
ifeq ($(strip $(MY_CAPS_WORD_ENABLE)), yes)
SRC += features/caps_word.c
OPT_DEFS += -DCAPS_WORD_ENABLE
OPT_DEFS += -DMY_CAPS_WORD_ENABLE
endif

REPEAT_KEY_ENABLE ?= no
Expand Down

0 comments on commit befd248

Please sign in to comment.