Tauri Plugin iOS Keyboard
A Tauri v2 plugin for handling iOS keyboard events in your Tauri applications.
Features
- Detect keyboard show/hide events
- Get keyboard height for layout adjustments
- Animation duration information
- Safe area handling
Installation
Add the plugin to your Cargo.toml:
[]
= "0.1"
Usage
Rust
use tauri_plugin_ios_keyboard;
JavaScript/TypeScript
import { onKeyboardEvent } from 'tauri-plugin-ios-keyboard';
// Listen for keyboard events
const unlisten = await onKeyboardEvent((event) => {
console.log('Keyboard event:', event.payload);
// event.payload contains:
// - eventType: 'will-show' | 'did-show' | 'will-hide' | 'did-hide'
// - keyboardHeight: number
// - animationDuration: number
});
// Clean up when done
unlisten();
Platform Support
| Platform | Supported |
|---|---|
| iOS | ✅ |
| Android | ❌ |
| macOS | ❌ |
| Windows | ❌ |
| Linux | ❌ |
License
MIT OR Apache-2.0