[ad_1]
Is there a technique to inform when a consumer navigates to as an example a button utilizing an exterior keyboard ? i.e accessibility possibility Full Keyboard Entry is enabled, and an exterior bluetooth keyboard is related to the iOS machine.
I am dealing with a problem the place the main target indicator just isn’t clearly seen, so i would like change the model (altering border color/width) of the button when this occurs.
I considered utilizing onFocus nevertheless it’s not being known as.
const [isFocused, setIsFocused] = React.useState(false);
return (
<TouchableWithoutFeedback
onPress={props.onPress}
accessibilityLabel={props.accessibilityLabel}
accessibilityRole="button"
onFocus={() => setIsFocused(true)}
onBlur={() => setIsFocused(false)}
>
<View
model={
isFocused
? kinds.buttonPrimaryFocus
: kinds.buttonPrimary
}
>
<Textual content>
{props.label}
</Textual content>
</View>
</View>
</TouchableWithoutFeedback>
[ad_2]
