Skip to main content

keyboard

This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET

The soft keyboard: whether it is up and which field has focus, typing at that field's cursor, pressing a named key, or hiding it. These call app_keyboard.

keyboard​

keyboard(options?: { text?: string; key?: 'enter' | 'delete' | 'space'; hide?: boolean }): Promise<Data>

Examples​

Type into the focused field and press Enter​

await device.keyboard({ text: 'coffee', key: 'enter' })

The same call from the command line, mobium keyboard --text coffee --key enter, printed on an Android 15 emulator:

typed "coffee" into username, which now holds coffee; the keyboard is hidden

mobium keyboard --text coffee --key enter on an Android 15 emulator

mobium keyboard --text coffee --key enter on an Android 15 emulator

Hide the keyboard​

await device.keyboard({ hide: true })

The same call from the command line, mobium keyboard --hide, printed on an Android 15 emulator:

hid the keyboard
BeforeAfter
Before: mobium keyboard --hide on an Android 15 emulatorAfter: mobium keyboard --hide on an Android 15 emulator

mobium keyboard --hide on an Android 15 emulator