diff --git a/docs/features/key_overrides.md b/docs/features/key_overrides.md index c0b788bde9..a4c9ed98e9 100644 --- a/docs/features/key_overrides.md +++ b/docs/features/key_overrides.md @@ -47,6 +47,17 @@ const key_override_t *key_overrides[] = { }; ``` +This second example inverts or swaps semicolon and colon on ANSI and many other layouts. That means pressing the key alone sends `shift` + `semicolon` giving `colon` (`S(KP_SCLN)` aka `KC_COLN`), but when pressing the key with shift, the shift modifier is suppressed (see `suppressed_mods` below), sending only `semicolon` (`KC_SCLN`): + +```c +const key_override_t semicolon_colon_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_COLN, KC_SCLN); + +// This globally defines all key overrides to be used +const key_override_t *key_overrides[] = { + &semicolon_colon_key_override +}; +``` + ## Intermediate Difficulty Examples {#intermediate-difficulty-examples} ### Media Controls & Screen Brightness {#media-controls-amp-screen-brightness}