McTibetimWeb - v0.1.0
    Preparing search index...

    Implements the Sambhota Keymap #2 keyboard layout.

    Originates from the legacy "Sambhota Tibetan" software suite widely used before Unicode became universal. It is heavily used by the Tibetan diaspora, exile communities, and older generations accustomed to legacy software. Like Keymap #1, it uses a structural "stacking" mechanism where a dedicated "compose" key triggers the vertical stacking of consonants.

    This layout overrides translateKey to map specific characters before stacking processing.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    composeKey: "h" = 'h'

    The key that toggles stacking composition mode.

    consonantKeyMapping: string[] = ...

    Ordered list of keys that emit Tibetan consonants.

    layoutId: "sambhota_keymap_two" = 'sambhota_keymap_two'

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

    layoutName: "Sambhota Keymap #2" = 'Sambhota Keymap #2'

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

    spaceKey: "-" = '-'

    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'".

    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.

    • Remaps specific keys before they are handled by the stacking logic.

      Parameters

      • key: string

        The raw ASCII character from the key event.

      Returns string

      The remapped character.