simple-keyboard/build/services/PhysicalKeyboard.d.ts
Francisco Hodge 9ace69a5db Build update
2023-01-19 00:51:34 +00:00

26 lines
831 B
TypeScript

import { KeyboardOptions, PhysicalKeyboardParams } from "../interfaces";
/**
* Physical Keyboard Service
*/
declare class PhysicalKeyboard {
getOptions: () => KeyboardOptions;
dispatch: any;
/**
* Creates an instance of the PhysicalKeyboard service
*/
constructor({ dispatch, getOptions }: PhysicalKeyboardParams);
handleHighlightKeyDown(e: KeyboardEvent): void;
handleHighlightKeyUp(e: KeyboardEvent): void;
/**
* Transforms a KeyboardEvent's "key.code" string into a simple-keyboard layout format
* @param {object} e The KeyboardEvent
*/
getSimpleKeyboardLayoutKey(e: KeyboardEvent): string;
/**
* Retrieve key from keyCode
*/
keyCodeToKey(keyCode: number): string;
isMofifierKey: (e: KeyboardEvent) => boolean;
}
export default PhysicalKeyboard;