2021-10-17 21:37:48 +00:00
|
|
|
# Copyright 2021 QMK
|
|
|
|
|
#
|
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
|
# the Free Software Foundation, either version 2 of the License, or
|
|
|
|
|
# (at your option) any later version.
|
|
|
|
|
#
|
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
|
#
|
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
GRAVE_ESC_ENABLE ?= yes
|
2023-11-09 02:01:44 +00:00
|
|
|
MAGIC_ENABLE ?= yes
|
|
|
|
|
SEND_STRING_ENABLE ?= yes
|
|
|
|
|
SPACE_CADET_ENABLE ?= yes
|
2021-10-17 21:37:48 +00:00
|
|
|
|
|
|
|
|
GENERIC_FEATURES = \
|
2023-11-09 02:01:44 +00:00
|
|
|
AUTO_SHIFT \
|
2022-09-17 07:50:54 +00:00
|
|
|
AUTOCORRECT \
|
2024-01-28 22:51:58 +00:00
|
|
|
BOOTMAGIC \
|
2022-05-14 06:00:32 +00:00
|
|
|
CAPS_WORD \
|
2021-10-17 21:37:48 +00:00
|
|
|
COMBO \
|
|
|
|
|
COMMAND \
|
2023-11-09 02:01:44 +00:00
|
|
|
CRC \
|
2021-11-15 18:21:09 +00:00
|
|
|
DEFERRED_EXEC \
|
2021-10-17 21:37:48 +00:00
|
|
|
DIGITIZER \
|
|
|
|
|
DIP_SWITCH \
|
|
|
|
|
DYNAMIC_KEYMAP \
|
|
|
|
|
DYNAMIC_MACRO \
|
2023-11-09 02:01:44 +00:00
|
|
|
DYNAMIC_TAPPING_TERM \
|
2021-10-17 21:37:48 +00:00
|
|
|
GRAVE_ESC \
|
2021-10-18 11:55:44 +00:00
|
|
|
HAPTIC \
|
[Core] get_keycode_string(): function to format keycodes as strings, for more readable debug logging. (#24787)
* keycode_string(): Format keycodes as strings.
This adds the `keycode_string()` function described in
https://getreuer.info/posts/keyboards/keycode-string/index.html
as a core feature.
* Fix formatting.
* keycode_string review revisions.
* Rename keycode_string() -> get_keycode_string() for consistency with
existing string utils like get_u8_str().
* Revise custom keycode names with separate _user and _kb tables.
* Correct indent in builddefs/generic_features.mk.
Co-authored-by: Ryan <fauxpark@gmail.com>
* Add KC_NUHS, KC_NUBS, and KC_CAPS.
* Fix linking error with custom names.
* Attempt at simplifying interface.
* Formatting fix.
* Several fixes and revisions.
* Don't use PSTR in KEYCODE_STRING_NAME, since this fails to build on
AVR. Store custom names in RAM.
* Revise the internal table of common keycode names to use its own
storage representation, still in PROGMEM, and now more efficiently
stored flat in 8 bytes per entry.
* Support Swap Hands keycodes and a few other keycodes.
* Revert "Formatting fix."
This reverts commit 2a2771068c7ee545ffac4103aa07e847a9ec3816.
* Revert "Attempt at simplifying interface."
This reverts commit 8eaf67de76e75bc92d106a8b0decc893fbc65fa5.
* Simplify custom names API by sigprof's suggestion.
* Support more keycodes.
* Add QK_LOCK keycode.
* Add Secure keycodes.
* Add Joystick keycodes.
* Add Programmable Button keycodes.
* Add macro MC_ keycodes.
* For remaining keys in known code ranges, stringify them as
"QK_<feature>+<number>". For instance, "QK_MIDI+7".
* Bug fix and a few improvements.
* Fix missing right-hand bit when displaying 5-bit mods numerically.
* Support KC_HYPR, KC_MEH, HYPR_T(kc), MEH_T(kc).
* Exclude one-shot keycodes when NO_ACTION_ONESHOT is defined.
---------
Co-authored-by: Ryan <fauxpark@gmail.com>
2025-03-19 19:45:56 +00:00
|
|
|
KEYCODE_STRING \
|
2021-10-17 21:37:48 +00:00
|
|
|
KEY_LOCK \
|
|
|
|
|
KEY_OVERRIDE \
|
2024-11-21 06:31:54 +00:00
|
|
|
LAYER_LOCK \
|
2021-10-17 21:37:48 +00:00
|
|
|
LEADER \
|
2023-11-09 02:01:44 +00:00
|
|
|
MAGIC \
|
|
|
|
|
MOUSEKEY \
|
|
|
|
|
MUSIC \
|
|
|
|
|
OS_DETECTION \
|
2021-10-17 21:37:48 +00:00
|
|
|
PROGRAMMABLE_BUTTON \
|
2023-05-20 12:35:06 +00:00
|
|
|
REPEAT_KEY \
|
2022-04-16 18:13:05 +00:00
|
|
|
SECURE \
|
2023-11-09 02:01:44 +00:00
|
|
|
SEND_STRING \
|
|
|
|
|
SEQUENCER \
|
2021-10-17 21:37:48 +00:00
|
|
|
SPACE_CADET \
|
2021-10-29 10:16:19 +00:00
|
|
|
SWAP_HANDS \
|
2021-10-17 21:37:48 +00:00
|
|
|
TAP_DANCE \
|
2023-11-09 02:01:44 +00:00
|
|
|
TRI_LAYER \
|
|
|
|
|
VIA \
|
|
|
|
|
VIRTSER \
|
2021-10-17 21:37:48 +00:00
|
|
|
WPM \
|
|
|
|
|
|
|
|
|
|
define HANDLE_GENERIC_FEATURE
|
|
|
|
|
# $$(info "Processing: $1_ENABLE $2.c")
|
|
|
|
|
SRC += $$(wildcard $$(QUANTUM_DIR)/process_keycode/process_$2.c)
|
2023-11-04 20:33:52 +00:00
|
|
|
SRC += $$(wildcard $$(QUANTUM_DIR)/$2/$2.c)
|
2021-10-17 21:37:48 +00:00
|
|
|
SRC += $$(wildcard $$(QUANTUM_DIR)/$2.c)
|
2025-03-21 12:38:34 +00:00
|
|
|
SRC += $$(wildcard $$(QUANTUM_DIR)/nvm/$$(NVM_DRIVER_LOWER)/nvm_$2.c)
|
2023-11-04 20:33:52 +00:00
|
|
|
VPATH += $$(wildcard $$(QUANTUM_DIR)/$2/)
|
2021-10-17 21:37:48 +00:00
|
|
|
OPT_DEFS += -D$1_ENABLE
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
$(foreach F,$(GENERIC_FEATURES),\
|
|
|
|
|
$(if $(filter yes, $(strip $($(F)_ENABLE))),\
|
|
|
|
|
$(eval $(call HANDLE_GENERIC_FEATURE,$(F),$(shell echo $(F) | tr '[:upper:]' '[:lower:]'))) \
|
|
|
|
|
) \
|
|
|
|
|
)
|