From 01e30d407c8a7004da5f3db7ba037c2265538ba5 Mon Sep 17 00:00:00 2001 From: Peter Cock Date: Tue, 10 Mar 2026 02:41:03 +0000 Subject: [PATCH] [Docs] Show how to flip semicolon and colon (#26030) * Show how to flip semicolon and colon * Apply whitespace suggestions from code review Co-authored-by: Drashna Jaelre * Match line-wrapping Co-authored-by: Joel Challis --------- Co-authored-by: Drashna Jaelre Co-authored-by: Joel Challis --- docs/features/key_overrides.md | 11 +++++++++++ 1 file changed, 11 insertions(+) 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}