Changed behavior_caps_word.c to be conditionally compiled instead of wrapping the entire contents of the file in an #if. Renamed macros that still referred to "break" instead of "continuation". Changed the type of the continuations count field to allow for more than 255 continuation keys. Reordered a struct to allow for better packing. Switched to statically initializing the devs[] array instead of using an index field in each device's config struct and the init function. Refactored caps_word_keycode_state_changed_listener() and caps_word_enhance_usage() to allow for more easily changing the conditions for what breaks a word and whether mods should be applied in future commits.
38 lines
No EOL
999 B
Text
38 lines
No EOL
999 B
Text
# Copyright (c) 2023 The ZMK Contributors
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
config ZMK_BEHAVIOR_CAPS_WORD
|
|
bool
|
|
default y
|
|
depends on DT_HAS_ZMK_BEHAVIOR_CAPS_WORD_ENABLED
|
|
|
|
config ZMK_BEHAVIOR_KEY_TOGGLE
|
|
bool
|
|
default y
|
|
depends on DT_HAS_ZMK_BEHAVIOR_KEY_TOGGLE_ENABLED
|
|
|
|
config ZMK_BEHAVIOR_MOUSE_KEY_PRESS
|
|
bool
|
|
default y
|
|
depends on DT_HAS_ZMK_BEHAVIOR_MOUSE_KEY_PRESS_ENABLED
|
|
imply ZMK_MOUSE
|
|
|
|
config ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON
|
|
bool
|
|
|
|
config ZMK_BEHAVIOR_SENSOR_ROTATE
|
|
bool
|
|
default y
|
|
depends on DT_HAS_ZMK_BEHAVIOR_SENSOR_ROTATE_ENABLED
|
|
select ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON
|
|
|
|
config ZMK_BEHAVIOR_SENSOR_ROTATE_VAR
|
|
bool
|
|
default y
|
|
depends on DT_HAS_ZMK_BEHAVIOR_SENSOR_ROTATE_VAR_ENABLED
|
|
select ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON
|
|
|
|
config ZMK_BEHAVIOR_MACRO
|
|
bool
|
|
default y
|
|
depends on DT_HAS_ZMK_BEHAVIOR_MACRO_ENABLED || DT_HAS_ZMK_BEHAVIOR_MACRO_ONE_PARAM_ENABLED || DT_HAS_ZMK_BEHAVIOR_MACRO_TWO_PARAM_ENABLED |