Saturday, November 21, 2026
HomeiOS Developmentjavascript - Is there assist for "Full Keyboard Entry" in React Native?

javascript – Is there assist for “Full Keyboard Entry” in React Native?

[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]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments