react-native-external-keyboard
Version:
Toolkit for improving physical keyboard support in React Native
63 lines • 2.11 kB
TypeScript
import type { ColorValue, ViewProps } from 'react-native';
import type { BubblingEventHandler, DirectEventHandler, Float, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
import type { ComponentType } from 'react';
export type FocusChange = Readonly<{
isFocused: boolean;
}>;
export type EnterPress = Readonly<{
isShiftPressed: boolean;
isAltPressed: boolean;
isEnterPress: boolean;
}>;
export type KeyPress = Readonly<{
keyCode: Int32;
unicode: Int32;
unicodeChar: string;
isLongPress: boolean;
isAltPressed: boolean;
isShiftPressed: boolean;
isCtrlPressed: boolean;
isCapsLockOn: boolean;
hasNoModifiers: boolean;
}>;
export interface ExternalKeyboardNativeProps extends ViewProps {
onFocusChange?: DirectEventHandler<FocusChange>;
onKeyUpPress?: DirectEventHandler<KeyPress>;
onKeyDownPress?: DirectEventHandler<KeyPress>;
onContextMenuPress?: DirectEventHandler<{}>;
onBubbledContextMenuPress?: BubblingEventHandler<{}>;
canBeFocused?: boolean;
hasKeyDownPress?: boolean;
hasKeyUpPress?: boolean;
hasOnFocusChanged?: boolean;
autoFocus?: boolean;
haloEffect?: boolean;
haloCornerRadius?: Float;
haloExpendX?: Float;
haloExpendY?: Float;
tintColor?: ColorValue;
group?: boolean;
groupIdentifier?: string;
enableA11yFocus?: boolean;
screenAutoA11yFocus?: boolean;
screenAutoA11yFocusDelay?: Int32;
orderGroup?: string;
orderIndex?: Int32;
lockFocus?: Int32;
orderId?: string;
orderLeft?: string;
orderRight?: string;
orderUp?: string;
orderDown?: string;
orderForward?: string;
orderBackward?: string;
orderFirst?: string;
orderLast?: string;
}
export interface NativeCommands {
focus: (viewRef: React.ElementRef<ComponentType>) => void;
}
export declare const Commands: NativeCommands;
declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<ExternalKeyboardNativeProps>;
export default _default;
//# sourceMappingURL=ExternalKeyboardViewNativeComponent.d.ts.map