KeyboardEvents
This library exposes 4 events which are available on all platforms:
- keyboardWillShow
- keyboardWillHide
- keyboardDidShow
- keyboardDidHide
Example
import { KeyboardEvents } from "react-native-keyboard-controller";
useEffect(() => {
const show = KeyboardEvents.addListener("keyboardWillShow", (e) => {
// place your code here
});
return () => {
show.remove();
};
}, []);
Also have a look on example app for more comprehensive usage.