/** * Returns the JS key code (`code`) for a given remote control key code (if one is found). * * Not all `RcKeyCode`s have a corresponding JS key code. * @param {RcKeyCode} rcKeyCode * @returns {number|undefined} */ export function toJsKeyCode(rcKeyCode: RcKeyCode): number | undefined; /** * Returns the JS key (`key`) for a given remote control key code (if one is found). * * Not all `RcKeyCode`s have a corresponding JS key code. * @param {RcKeyCode} rcKeyCode * @returns {string|undefined} */ export function toJsKey(rcKeyCode: RcKeyCode): string | undefined; /** * Type guard; checks if an `RcKeyCode` is also a {@linkcode RcJsKeyCode}. * @param {RcKeyCode} rcKeyCode * @returns {rcKeyCode is RcJsKeyCode} */ export function hasJsKeyCode(rcKeyCode: RcKeyCode): rcKeyCode is RcJsKeyCode; /** * Type guard. Returns `true` if `name` is a valid `RcKeyCode` * @param {any} value * @returns {value is RcKeyCode} */ export function isRcKeyCode(value: any): value is RcKeyCode; /** * Type guard. Returns `true` if `value` is a key of {@linkcode Utf8Keys}. * @param {any} value * @returns {value is keyof typeof Utf8Keys} */ export function isUtf8Key(value: any): value is keyof typeof Utf8Keys; /** * Given an {@linkcode RcKeyCode} or any `string`, returns a key which can be used in a {@linkcode KeyboardEvent}. `keyCode` could thus be a single character, a UTF-8 character, or a {@linkcode Utf8Key}. * @param {RcKeyCode|string} keyCode * @returns {KeyData} */ export function getKeyData(keyCode: RcKeyCode | string): KeyData; /** * A key in the {@linkcode JsKeyCodes} mapping */ export type JsKeyCode = keyof typeof JsKeyCodes; /** * An {@linkcode RcKeyCode} which has a corresponding JS key code. */ export type RcJsKeyCode = keyof typeof RcToJsKeyCodes; export type RcKeyCode = import("@headspinio/tizen-remote").RcKeyCode; /** * Data for a `KeyboardEvent` constructor; passed to Tizen app via Chromedriver; */ export type KeyData = { code?: number | undefined; key?: string | undefined; }; /** * This thing maps an Rc Key Code to a UTF-8 key code. * @module * */ /** * Map of keyboard keys to UTF-8 key codes. Probably only usedful for testing * keyboard (non-RC) interaction. */ declare const Utf8Keys: Readonly<{ NULL: ""; CANCEL: ""; HELP: ""; BACKSPACE: ""; TAB: ""; CLEAR: ""; RETURN: ""; ENTER: ""; SHIFT: ""; CONTROL: ""; ALT: ""; PAUSE: ""; ESCAPE: ""; SPACE: ""; PAGE_UP: ""; PAGE_DOWN: ""; END: ""; HOME: ""; LEFT: ""; UP: ""; RIGHT: ""; DOWN: ""; INSERT: ""; DELETE: ""; SEMICOLON: ""; EQUALS: ""; NUMPAD0: ""; NUMPAD1: ""; NUMPAD2: ""; NUMPAD3: ""; NUMPAD4: ""; NUMPAD5: ""; NUMPAD6: ""; NUMPAD7: ""; NUMPAD8: ""; NUMPAD9: ""; MULTIPLY: ""; ADD: ""; SEPARATOR: ""; SUBTRACT: ""; DECIMAL: ""; DIVIDE: ""; F1: ""; F2: ""; F3: ""; F4: ""; F5: ""; F6: ""; F7: ""; F8: ""; F9: ""; F10: ""; F11: ""; F12: ""; META: ""; /** * ikr? * @see https://en.wikipedia.org/wiki/Language_input_keys */ ZENKAKUHANKAKU: ""; R_SHIFT: ""; R_CONTROL: ""; R_ALT: ""; R_META: ""; R_PAGEUP: ""; R_PAGEDOWN: ""; R_END: ""; R_HOME: ""; R_ARROWLEFT: ""; R_ARROWUP: ""; R_ARROWRIGHT: ""; R_ARROWDOWN: ""; R_INSERT: ""; R_DELETE: ""; }>; /** * Name/code pairing of remote control keys supported by the Tizen JS API * via `tizen.tvinputdevice`. * */ declare const JsKeyCodes: Readonly<{ 0: 48; 1: 49; 2: 50; 3: 51; 4: 52; 5: 53; 6: 54; 7: 55; 8: 56; 9: 57; VolumeUp: 447; VolumeDown: 448; VolumeMute: 449; ChannelUp: 427; ChannelDown: 428; ColorF0Red: 403; ColorF1Green: 404; ColorF2Yellow: 405; ColorF3Blue: 406; Menu: 10133; Tools: 10135; Info: 457; Exit: 10182; Search: 10225; Guide: 458; MediaRewind: 412; MediaPause: 19; MediaFastForward: 417; MediaRecord: 416; MediaPlay: 415; MediaStop: 413; MediaPlayPause: 10252; MediaTrackPrevious: 10232; MediaTrackNext: 10233; Source: 10072; PictureSize: 10140; PreviousChannel: 10190; ChannelList: 10073; 'E-Manual': 10146; MTS: 10195; '3D': 10199; Soccer: 10228; Caption: 10221; Teletext: 10200; Extra: 10253; Minus: 189; ArrowUp: 38; ArrowRight: 39; ArrowLeft: 37; ArrowDown: 40; Enter: 13; Back: 10009; }>; /** * Mapping of {@linkcode RcKeyCode}s to JS key code names (`key`s). */ declare const RcToJsKeyCodes: Readonly<{ KEY_0: "0"; KEY_1: "1"; KEY_2: "2"; KEY_3: "3"; KEY_4: "4"; KEY_5: "5"; KEY_6: "6"; KEY_7: "7"; KEY_8: "8"; KEY_9: "9"; KEY_VOLDOWN: "VolumeDown"; KEY_VOLUP: "VolumeUp"; KEY_MUTE: "VolumeMute"; KEY_UP: "ArrowUp"; KEY_DOWN: "ArrowDown"; KEY_LEFT: "ArrowLeft"; KEY_RIGHT: "ArrowRight"; KEY_CHUP: "ChannelUp"; KEY_CHDOWN: "ChannelDown"; KEY_RED: "ColorF0Red"; KEY_GREEN: "ColorF1Green"; KEY_YELLOW: "ColorF2Yellow"; KEY_BLUE: "ColorF3Blue"; KEY_MENU: "Menu"; KEY_TOOLS: "Tools"; KEY_INFO: "Info"; KEY_EXIT: "Exit"; KEY_ENTER: "Enter"; KEY_RETURN: "Back"; KEY_GUIDE: "Guide"; KEY_REWIND: "MediaRewind"; KEY_PAUSE: "MediaPause"; KEY_FF: "MediaFastForward"; KEY_REC: "MediaRecord"; KEY_PLAY: "MediaPlay"; KEY_STOP: "MediaStop"; KEY_SOURCE: "Source"; KEY_PICTURE_SIZE: "PictureSize"; KEY_PRECH: "PreviousChannel"; KEY_CH_LIST: "ChannelList"; KEY_HELP: "E-Manual"; KEY_MTS: "MTS"; KEY_CAPTION: "Caption"; KEY_TTX_MIX: "Teletext"; }>; export {}; //# sourceMappingURL=keymap.d.ts.map