Skip to content

withSoftKeyboardEnabled<T>

Permits the on-screen keyboard for the duration of a callback, then restores the device exactly.

The restore runs whether the callback succeeded or threw — a suite that dies mid-capture must not leave the device configured differently than it found it.

Import:

import { withSoftKeyboardEnabled } from 'obsidian-integration-testing';

Signature:

function withSoftKeyboardEnabled(params: WithSoftKeyboardEnabledParams<T>): Promise<T>

Parameters:

ParameterTypeDescription
paramsWithSoftKeyboardEnabledParams<T>The device and the work to run.

Returns: Promise<T> — A Promise that resolves to whatever the callback returned.


Links to this page: