K3Marker

Describes a marker by both unique ID and name. In keyboard3 files, markers are defined using the \m{…markerName} syntax.

Quoting from the keyboard3 spec:

Markers are placeholders which record some state, but without producing normal visible text output. They were designed particularly to support dead-keys.

Markers in k3lp are stored in-band. To make this feasible, a marker pool is used to assign a unique numerical ID to each name. This makes both storage and comparison of markers very efficient, as a marker equals comparison is essentially an integer comparison.

Care must be taken when parsing multiple models. By default, each compiled model has its own marker pool, and thus the same marker \m{…markerName} may have ID 3 in model A, and 62 in model B. If cross-model comparison support is required, ensure to share the same marker pool across models.

See UTS #35 Part 7 | Markers

See also

Properties

Link copied to clipboard
val id: Int

The unique numeric ID of this marker. Is only valid in the context of the marker pool from which it was derived from.

Link copied to clipboard

The name of the marker, as parsed from the marker escape sequence. Is valid across marker pools.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String