cap-go avatar

Capacitor Keyboard

Handles keyboard events and behavior in Capacitor apps across iOS and Android. You get programmatic show/hide, visibility listeners with height info, configurable resize modes (body, ionic, native, none), and iOS accessory bar control. The CSS variable pattern for keyboard height is solid for positioning fixed inputs, and the scroll-to-input helper solves that annoying problem where the keyboard covers your active field. Configuration is straightforward through capacitor.config.ts. If you're building a chat app or any form-heavy mobile app with Capacitor, you'll need this to avoid the default janky keyboard behavior. The iOS 16px font size tip alone will save you from the auto-zoom headache.

skills.sh installs
1.1K
GitHub stars
77
last updated
Aug 21, 2026

Install

$ npx -y skills add cap-go/capgo-skills --skill capacitor-keyboard --agent claude-code

Installs into .claude/skills of the current project.

Files

Keyboard Handling in Capacitor

When to Use

TRIGGER when:

  • Focused input is covered by the keyboard, or the page scrolls unexpectedly
  • Chat composer / fixed footer does not stick to the keyboard
  • White or black band above the keyboard (Android 15+ edge-to-edge, iOS backdrop)
  • 100vh / dvh layout collapses when the keyboard opens
  • iOS zooms into inputs, or the QuickType/accessory bar looks wrong
  • Keyboard events never fire or fire twice

Do not use:

  • Notch / home-indicator / status-bar padding: safe-area-handling
  • Ionic ion-input, ion-footer styling: ionic-design
  • Labels, focus order, screen readers: capacitor-accessibility

Platform model (the key decision)

iOSAndroid
Who resizesPlugin, per resize modeOS + WebView; resize config is ignored
EventskeyboardWillShow before animation, keyboardDidShow afterWill/Did fire almost together
JS controlsetResizeMode, getResizeMode, setScroll, setStyle, setAccessoryBarVisible (iPhone only)show() (Android only), hide()

iOS resize modes (KeyboardResize enum):

Sponsors

Details

Repository
github.com/cap-go/capgo-skills
Categories
Documentation, Mobile Development
First seen
Jun 3, 2026

More from cap-go/capgo-skills

All 41
1daymade avatarcapture-screendaymade/claude-code-skillsProgrammatic screenshot capture on macOS. Find window IDs with Swift CGWindowListCopyWindowInfo, control application windows via AppleScript (zoom, scroll, sele1.1Kskills.sh installs
2rstackjs avatarrslib-best-practicesrstackjs/agent-skillsRslib best practices for config, CLI workflow, output, declaration files, dependency handling, build optimization and toolchain integration. Use when writing, r1.1Kskills.sh installs
3asyrafhussin avatarlaravel-owasp-securityasyrafhussin/agent-skillsOWASP Top 10 security audit and secure coding guidelines for Laravel + React/Inertia.js applications. Use when auditing for vulnerabilities ("run OWASP audit", 1.1Kskills.sh installs
4inference-sh avatarai-marketing-videosinference-sh/skillsCreate AI marketing videos for ads, promos, product launches, and brand content. Models: Veo, Seedance, Wan, FLUX for visuals, Kokoro for voiceover. Types: prod1.1Kskills.sh installs
5inference-sh avatarprompt-engineeringinference-sh/skillsMaster prompt engineering for AI models: LLMs, image generators, video models. Techniques: chain-of-thought, few-shot, system prompts, negative prompts. Models:1.1Kskills.sh installs
6vibe-motion avatarruler-progress-rendervibe-motion/skillsClone or update https://github.com/sxhzju/ruler-progress-animator and render a ruler progress video with default parameters. Use when users ask for requests lik1.1Kskills.sh installs