Guides handling of on-screen keyboard behavior in Capacitor mobile apps, covering events, resizing, scrolling and focus.
- What it does
- This skill provides instructions and code examples for managing the software keyboard in Capacitor iOS and Android apps. It covers installing the @capacitor/keyboard plugin, listening to keyboard show and hide events, reading keyboard height, configuring resize modes and styles, scrolling the focused input into view, and toggling the iOS accessory bar. It also lists form best practices and a troubleshooting table for common keyboard problems.
- When to use it
- Use it when a Capacitor app has keyboard-related problems, such as content hidden behind the keyboard, scroll or focus issues, or a need to show, hide or observe keyboard events. It is also relevant when configuring keyboard resize behavior or the iOS accessory bar.
- Requirements
- Requires a Capacitor project with the @capacitor/keyboard plugin installed via npm and synced with npx cap sync. Instructions only; no scripts are shipped.