UNPKG

isomorphic-qwerty

Version:

Isomorphic coordinate-system for the QWERTY keyboard with sustain using the Shift key

28 lines (27 loc) 902 B
export type Coords3D = [number, number, number]; /** * Key codes for the row consisting of Esc and FN keys. */ export declare const CODES_LAYER_0: string[][]; /** * Key codes for the rows containing the digits, qwerty, asdf and zxcv. */ export declare const CODES_LAYER_1: (string | null)[][]; /** * Key codes for the cluster of keys with Page Up/Down. */ export declare const CODES_LAYER_2: string[][]; /** * Key codes for the numpad. */ export declare const CODES_LAYER_3: (string | null)[][]; /** * Mapping from key codes to coordinates of input device geometry. */ export declare const COORDS_BY_CODE: Map<string, Coords3D>; /** * Map 3D coordinates to key codes. * @param xyz 3D coordinates of the physical key. * @returns Key code associated with the coordinates or `undefined` if there is no association. */ export declare function codeByCoords(xyz: Coords3D): string | undefined;