Defining Combos
Esta página aún no está disponible en tu idioma.
If your layout uses two or more keys together to type something, a combo records that behavior without changing what the keys do on their own. In TOML, a chord names the physical keys; a combo assigns that chord a behavior on a particular layer.
T-34 shows how a combo adds an output without changing the individual keys:
[chords]comb_ques = [ "e", "n" ]
[layers.base]default = "literal"combos = { comb_ques = "?",}Declare the key group in chords and assign it an action in combos. The layer’s default applies to single keys.
Chord Products
Section titled “Chord Products”To build a Hangul syllable from simultaneously pressed keys, Semo-e (세모이) uses a chord product with banks for the onset, vowel, and optional final. This excerpt keeps one choice from each bank and the optional empty final:
[layers.base.chord_products.syllables]normalization = "nfc"
[[layers.base.chord_products.syllables.banks]]"k" = "ᄀ"
[[layers.base.chord_products.syllables.banks]]"f" = "ᅡ"
[[layers.base.chord_products.syllables.banks]]"" = """s" = "ᆫ"The product’s banks define the choices for each part of a syllable. normalization controls how outputs for the same keys are compared.
Combo Fields
Section titled “Combo Fields”| Field | What it does |
|---|---|
[chords] | Defines each chord by two or more distinct physical key IDs. Key order is not a trigger condition. A chord name cannot also name a physical key. |
layers.NAME.combos | Maps a named chord to its behavior on that layer. An explicit combo wins over a generated product for the same keys on that layer. |
layers.NAME.chord_products.PRODUCT.banks | Each bank maps whitespace-separated physical key IDs to text. Use "" = "" for an optional bank entry. Each generated nonempty combination must use at least two distinct keys and produce text. |
layers.NAME.chord_products.PRODUCT.normalization | Set to "nfc". Equal normalized outputs for the same keys collapse; competing outputs need an explicit chord and combo. |
If a Shift layer should inherit a chord, give that chord an explicit { type = "transparent" } combo on Shift. The layer’s single-key default does not apply. The string "transparent" would type the word instead.
Reference
Section titled “Reference”Layers and lookup#
Layer combo bindings#
layers.*.combos.*
Assigns behavior to a declared chord on this layer.
An omitted combo is opaque none, not inherited. Author { type = "transparent" } explicitly to continue lookup. On a mapped destination, that transparent combo first consults the configured source layer.
Chords and key sets#
Chord membership#
[chords]
Each chord contains at least two retained stable key IDs. This table defines physical membership only; layers.*.combos defines behavior separately per layer.
Chord names and physical key IDs share one namespace. A chord name cannot duplicate a retained key ID.
[chords]
qu = ["g", "d"]
[layers.base]
default = "literal"
combos = { qu = "qu" }