McTibetimWeb - v0.1.0
    Preparing search index...

    Class defaultAbstract

    Abstract base for all Tibetan stacking-based keyboard layouts.

    Stacking layouts model the Tibetan orthographic convention of stacking multiple consonants vertically. A dedicated compose key toggles stacking mode; while in stacking mode, consonant key presses are accumulated into a StackingState until a vowel, space, or compose key commits the composed character.

    Concrete subclasses supply the key mappings for their specific layout (e.g. Sambhota Keymap #1, TCC Keyboard #1) and may override translateKey to remap keys before the standard lookup.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    composeKey: string

    The key that toggles stacking composition mode.

    consonantKeyMapping: string[]

    Ordered list of keys that emit Tibetan consonants.

    spaceKey: string

    The key that emits a space character (tsheg ).

    suffixKeyMapping: string[]

    Ordered list of keys that emit Tibetan suffix marks (anusvara / visarga).

    symbolKeyMapping: string[]

    Ordered list of keys that emit Tibetan symbols.

    vowelKeyMapping: string[]

    Ordered list of keys that emit Tibetan vowel signs.

    ConsonantChars: number[] = ...

    Unicode code points for all 35 Tibetan consonant letters.

    Extras: Map<string, string> = ...

    Special multi-character sequences accessible by their trigger key.

    FinalAddChars: number[] = ...

    Unicode code points for the anusvara and visarga suffix marks.

    Htransform: number = 28

    Consonant index for the aspirate (h-transform) key.

    HtransformChars: number[] = ...

    Precomposed aspirated consonant code points corresponding to HtransformKey.

    HtransformKey: number[] = ...

    Consonant indices that participate in the h-transform (aspirate stacking). Each entry has a corresponding aspirated form in HtransformChars.

    KbTransform: number = 34

    Consonant index for the special "ksa" (ཀྵ) transform key.

    MaxStackingConsonants: number = 4

    Maximum number of consonants that can be stacked in a single syllable.

    SymbolChars: number[] = ...

    Unicode code points for the Tibetan symbols accessible via symbolKeyMapping.

    VowelChars: number[] = ...

    Unicode code points for Tibetan vowel signs. Index 0 is a placeholder (0) meaning "no vowel sign / inherent 'a'".

    Accessors

    • get layoutId(): string

      Unique identifier for this layout (e.g. 'sambhota_keymap_one').

      Returns string

    • get layoutName(): string

      Human-readable name for this layout (e.g. 'Sambhota Keymap #1').

      Returns string

    Methods

    • Returns display names for keys given the current modifier state.

      Parameters

      • shift: boolean

        Whether the Shift modifier is active.

      • ctrl: boolean

        Whether the Control modifier is active.

      • alt: boolean

        Whether the Alt modifier is active.

      Returns Map<string, string>

      A map from key character to its Tibetan display name.

    • Handles a key event within the given state.

      Parameters

      • key: Key

        The key to handle.

      • state: InputState

        The current input state.

      • stateCallback: (newState: InputState) => void

        Called with the new state when a transition occurs.

      • errorCallback: () => void

        Called when an unrecoverable input error is detected.

      Returns boolean

      true if the key was consumed by this layout.

    • Returns whether the given key is the compose key for this layout.

      Parameters

      • key: string

        The key character to check.

      Returns boolean

    • Checks whether the given key maps to a Tibetan consonant.

      Parameters

      • key: string

        The key character to look up.

      Returns [boolean, number]

      A tuple [isConsonant, index] where index is the position in consonantKeyMapping, or -1 if not found.

    • Returns whether the given key is the space key for this layout.

      Parameters

      • key: string

        The key character to check.

      Returns boolean

    • Checks whether the given key maps to a Tibetan suffix mark.

      Parameters

      • key: string

        The key character to look up.

      Returns [boolean, number]

      A tuple [isSuffix, index] where index is the position in suffixKeyMapping, or -1 if not found.

    • Checks whether the given key maps to a Tibetan symbol.

      Parameters

      • key: string

        The key character to look up.

      Returns [boolean, number]

      A tuple [isSymbol, index] where index is the position in symbolKeyMapping, or -1 if not found.

    • Checks whether the given key maps to a Tibetan vowel sign.

      Parameters

      • key: string

        The key character to look up.

      Returns [boolean, number]

      A tuple [isVowel, index] where index is the position in vowelKeyMapping, or -1 if not found.

    • Optionally remaps a raw key character before standard lookup.

      The default implementation is identity. Override to redirect specific keys (e.g. Sambhota Keymap #2 maps 'D''m').

      Parameters

      • key: string

        The raw ASCII character from the key event.

      Returns string

      The (possibly remapped) character to look up in the consonant table.

    • Returns whether index is an h-transform consonant index, and its position within HtransformKey.

      Parameters

      • index: number

        The consonant index to check.

      Returns [boolean, number]

      [true, position] if found, [false, -1] otherwise.