UNPKG

@teachingtextbooks/keyboard

Version:

Customizable TypeScript soft keyboard

28 lines (27 loc) 1.09 kB
import { IKeyConfig, IKeyRowConfig, IKeysRow } from "./data"; export default class KeysRow implements IKeysRow { private _hasUpperCase; private _hasShift; private _hasCapsLock; private readonly _shiftCase; private readonly id; private readonly holder; private readonly buttons; private readonly section; private readonly gap; private readonly clientWidth; constructor(id: number, win: Window, doc: Document, config: IKeyRowConfig, keysConfig: Map<string, IKeyConfig>, align: string, keysGap: number, rowsGap: number, stickDelay: number, holder: Element, shiftCase: boolean | undefined, callback: Function); getID(): number; attach(): void; remove(): void; static checkShift(keys: (string | [string, string | null])[]): boolean; setScale(val: number): void; getClientWidth(): number; getKeysMargin(): number; enable(bool: Boolean): void; shift(bool: boolean, capsLock: boolean, capsLocked: boolean): void; hasUpperCase(): boolean; hasShift(): boolean; hasCapsLock(): boolean; shiftCase(): boolean; }