/** If set, any of the modifiers in trigger_mods will be enough to activate the override (logical OR of modifiers). If not set, all the modifiers in trigger_mods have to be pressed (logical AND of modifiers). */
ko_option_one_mod=(1<<3),
/** If set, the trigger key will never be registered again after the override is deactivated. */
ko_option_no_reregister_trigger=(1<<4),
/** If set, the override will not deactivate when another key is pressed down. Use only if you really know you need this. */
ko_option_no_unregister_on_other_key_down=(1<<5),
/** The default options used by the ko_make_xxx functions. */
ko_options_default=ko_options_all_activations,
}ko_option_t;
/** Defines a single key override */
typedefstruct{
// The non-modifier keycode that triggers the override. This keycode, and the necessary modifiers (trigger_mods) must be pressed to activate this override. Set this to the keycode of the key that should activate the override. Set to KC_NO to require only the necessary modifiers to be pressed and no non-modifier.
uint16_ttrigger;
// Which mods need to be down for activation. If both sides of a modifier are set (e.g. left ctrl and right ctrl) then only one is required to be pressed (e.g. left ctrl suffices). Use the MOD_MASK_XXX and MOD_BIT() macros for this.
uint8_ttrigger_mods;
// This is a BITMASK (!), defining which layers this override applies to. To use this override on layer i set the ith bit (1 << i).
layer_state_tlayers;
// Which modifiers cannot be down. It must hold that (active_mods & negative_mod_mask) == 0, otherwise the key override will not be activated. An active override will be deactivated once this is no longer true.
uint8_tnegative_mod_mask;
// Modifiers to 'suppress' while the override is active. To suppress a modifier means that even though the modifier key is held down, the host OS sees the modifier as not pressed. Can be used to suppress the trigger modifiers, as a trivial example.
uint8_tsuppressed_mods;
// The complex keycode to send as replacement when this override is triggered. This can be a simple keycode, a key-modifier combination (e.g. C(KC_A)), or KC_NO (to register no replacement keycode). Use in combination with suppressed_mods to get the correct modifiers to be sent.
uint16_treplacement;
// Options controlling the behavior of the override, such as what actions are allowed to activate the override.
ko_option_toptions;
// If not NULL, this function will be called right before the replacement key is registered, along with the provided context and a flag indicating whether the override was activated or deactivated. This function allows you to run some custom actions for specific key overrides. If you return `false`, the replacement key is not registered/unregistered as it would normally. Return `true` to register and unregister the override normally.
bool(*custom_action)(boolactivated,void*context);
// A context that will be passed to the custom action function.
void*context;
// If this points to false this override will not be used. Set to NULL to always have this override enabled.
bool*enabled;
}key_override_t;
/** Define this as a null-terminated array of pointers to key overrides. These key overrides will be used by qmk. */