expo-key-event
Version:
Provides an interface for reading key events such as from external bluetooth keyboards on Android, iOS and Web.
22 lines • 599 B
TypeScript
type KeyEventBase = {
key: string;
eventType: "press" | "release";
shiftKey?: boolean;
ctrlKey?: boolean;
metaKey?: boolean;
altKey?: boolean;
repeat?: boolean;
};
export type KeyPressEvent = KeyEventBase & {
eventType: "press";
};
export type KeyReleaseEvent = KeyEventBase & {
eventType: "release";
};
export type KeyEvent = KeyPressEvent | KeyReleaseEvent;
export type ExpoKeyEventModuleEvents = {
onKeyPress: (event: KeyPressEvent) => void;
onKeyRelease: (event: KeyReleaseEvent) => void;
};
export {};
//# sourceMappingURL=ExpoKeyEvent.types.d.ts.map