Version 1.25 โ more reliable keyboard and input tracking ๐ฏ
1.25.0 is a small release focused on keyboard and input timing. It fixes a few cases where a screen opens, rotates, or changes focus while the keyboard is already visible.

๐ฏ Get the current keyboard state with onSyncโ
If a screen mounts with the keyboard already open, it can miss the events that reported the keyboard height. useKeyboardHandler now has an optional onSync callback that reports the current height and progress when the handler attaches. It also runs when a frozen screen becomes active again.
Use it to initialize the shared values that your animation callbacks update.
useKeyboardHandler({
onSync: (event) => {
"worklet";
height.value = event.height;
progress.value = event.progress;
},
});
Say you tap a button that closes the keyboard and opens a new screen. The keyboard is gone, but the new screen still has a gap at the bottom. That could happen when KeyboardAvoidingView applied a height it had read before the keyboard closed. Now it uses onSync to read the current height when it starts listening.
โจ๏ธ Keep the focused input in viewโ
With useFocusedInputHandler, onSelectionChange now receives the current selection whenever the handler attaches while an input is already focused, even if the caret hasn't moved. Like onSync in useKeyboardHandler, it gives the handler the current state when it starts listening.
On Android, KeyboardAwareScrollView uses that initial selection to bring an autoFocus field into view as soon as the keyboard opens. Previously, the field could stay hidden until you typed. ๐ฌ The fix changes when onSelectionChange can fire, so it ships in a minor release. For existing apps, upgrading is enough to get the fix.
๐ค Consistent keyboard events on Androidโ
Android can report a new keyboard height without the usual animation callbacks, for example during rotation. The native implementation now uses the same code path to sync the keyboard position in those cases and when an open keyboard resizes (such as when switching to the emoji keyboard).
Both cases now update the keyboard height and dispatch the same sequence. Worklets get onStart, onMove, and onEnd, and JavaScript listeners get the matching will and did events. That keeps keyboard hooks and JavaScript listeners in sync even when Android skips the animation callbacks.
๐ Two iOS focus fixesโ
- The library restores the original input delegate as soon as the field loses focus. This prevents a crash when a native view is recycled for a masked input.
- When a text input gets focus, the library looks for
KeyboardToolbar.Groupin the native view hierarchy, even in apps that never render a toolbar. It now checks the native view class directly, reducing main-thread work on every focus change. That makes stalls less likely on older or lower-end devices, especially on screens with many views.
๐ฆ Upgradingโ
yarn add react-native-keyboard-controller@1.25.0
Rebuild your app after updating. If your iOS app uses CocoaPods, run pod install in ios/ first.
๐ค What's next?โ
I'm still working on keeping the keyboard in sync with the screen during an interactive back swipe on iOS. onSync is a small part of that work, and I hope to ship the back-swipe fix soon.
I'm also working on CustomKeyboard, a component for replacing the system keyboard with your own UI. The goal is to make the switch feel like it does in native apps, for example when a chat app swaps the system keyboard for its own emoji picker.
I want this to be an open-source library people can rely on, so fixing bugs is also a priority. There are about 100 open issues, and I expect to close some of them soon. As I work through them, bug reports from sponsors get first priority. ๐
