Defining Alternate Fingerings
When you sometimes use a different finger for the same physical key, an alternate fingering lets analysis consider that choice without replacing the board’s ordinary assignments. Use one for a specific key, combo, or ordered run you can actually type that way. The alternate does not change the text or guarantee analysis will choose it.
To make Space available to either thumb, Power adds a right-thumb alternate for
space_thumb = "left"alt_fingerings = [{ events = [{ press = "spc", fingers = { spc = "RT" } }] }]Keep the board’s space_thumb assignment and use alt_fingerings to add an alternative press with a fingers override.
Chog v2 lets analysis consider alternate fingers only when the presses occur in the order shown:
alt_fingerings = [ { events = [ { press = "s", fingers = { s = "RI" } }, { press = "y", fingers = { y = "RM" } } ] }, { events = [ { press = "y", fingers = { y = "RM" } }, { press = "'", fingers = { "'" = "RI" } } ] },]Each alt_fingerings entry lists the events in order, with press and fingers for each press.
For a combo, press takes the chord’s name and fingers assigns the member keys individually. Unlisted members keep their board assignments.
Alternate-Fingering Fields
Section titled “Alternate-Fingering Fields”| Field | What it does |
|---|---|
alt_fingerings[].events | An ordered fragment of one to eight events. At least one press assignment must differ from the board. |
press, fingers | A physical key or chord name, with per-key finger overrides. The finger codes are LP LR LM LI LT RT RI RM RR RP. |
hold | On a press, true selects the text-producing hold branch of an existing tap-hold binding. It does not acquire a trigger. |
acquire, release | Lists of key or chord names that become held or stop being held during the event. No press override is allowed on these events. |
sustained | Lists the exact triggers that remain held across the event. Omit it when no trigger is sustained. |
Use one event kind at a time. The held keys after one event must match the held keys before the next. The fragment may begin or end with keys already held. See Alternate fingering examples for sequences using acquisition, release, and text-producing hold branches.
Reference
Section titled “Reference”Alternate fingerings#
Alternate fingerings describe native physical event sequences that analysis may choose in addition to the ordinary board fingering.
Alternate fingering declaration#
[[alt_fingerings]]
Adds optional analysis paths for exact physical event fragments. The normal board fingering remains available; path and cost resolution decide whether an alternate is used.
A layout may declare at most 4096 alternate fingerings. Exact duplicate declarations are rejected. Trigger names refer to the shared key-and-chord namespace, not to produced text or a layer-specific binding.
# Fragment: a and b are existing physical key bindings.
[[alt_fingerings]]
events = [
{ press = "a", fingers = { a = "RM" } },
{ press = "b", fingers = { b = "RI" } },
][chords]
th = ["t", "h"]
[layers.base]
default = "literal"
combos = { th = "x" }
[[alt_fingerings]]
events = [
{ press = "th", fingers = { t = "LM" } },
]Alternate event sequence#
events = [{...}, ...]Lists one to eight exact events in order. Each event is exactly one of a press, acquire, or release object.
Declarations are fragments of a complete typing path, so the first event may begin with held triggers and the last may leave triggers held. Between adjacent events, the earlier post-event held set must exactly equal the later pre-event held set.
Alternate press trigger#
press = "key_or_chord"
Presses one existing physical key or chord. Matching uses that trigger’s exact physical identity; it does not match output text or one particular layer behavior.
Every declaration must change the board-assigned finger of at least one physical key in a press event. A declaration containing only defaults, acquire events, or release events is invalid.
Pressed-key finger assignments#
fingers = { physical_key = "LM" }Maps pressed physical key IDs to replacement fingers. Omitted members use their board-assigned finger. For a chord, assignments use constituent physical key IDs rather than chord order or the chord name.
Assignments outside the pressed key or chord are rejected. Several chord members may use the same finger; no additional anatomical restriction is imposed.
Tap-hold branch selection#
hold = true
Selects the text-producing hold branch of an existing tap-hold key or chord. This is distinct from an acquire event, which changes the set of triggers held across later events.
[layers.base]
default = "literal"
bindings = { qu = { type = "tap_hold", tap = { type = "output", value = "qu" }, hold = { type = "output", value = "q" } } }
[[alt_fingerings]]
events = [
{ press = "qu", hold = true, fingers = { qu = "RI" } },
]Acquire held triggers#
acquire = ["trigger", ...]
Adds one or more existing key or chord triggers to the held set. The array is nonempty, unique, and contains at most nine names.
Acquire and release events do not accept finger assignments. Their changing triggers plus sustained triggers may total at most nine.
[layers.base]
default = "literal"
bindings = { lsh = { type = "momentary", layer = "shift" } }
[layers.shift]
default = "transparent"
[[alt_fingerings]]
events = [
{ acquire = ["lsh"] },
{ press = "a", fingers = { a = "RM" }, sustained = ["lsh"] },
{ release = ["lsh"] },
]Release held triggers#
release = ["trigger", ...]
Removes one or more existing key or chord triggers from the held set. The array is nonempty, unique, and contains at most nine names.
The pre-event held set consists of the released triggers plus sustained. When a previous event exists in the fragment, its post-event held set must match this set exactly.
Sustained triggers#
sustained = ["trigger", ...]
Names the exact triggers held unchanged across this event. Omission means the sustained set is empty; it is not a wildcard.
A trigger changed by this event cannot also be sustained. A press event may list up to nine sustained triggers. Acquire and release events apply the combined nine-trigger limit described above.