Keyboard

Supported on Android & iOS.

Download Sample Data

This data source collects text input and keystroke events from participants using a custom keyboard app.

The keyboard is designed for research studies that require detailed monitoring of digital communication and typing patterns, with a strong emphasis on privacy and user consent. The keyboard looks and behaves similarly to the native keyboard on each operating system so as not to disrupt the user experience.

Custom Avicenna Keyboard on iOS
Custom Avicenna Keyboard on Android

Data Structure

Besides the common data fields, each record contains:

App ID: The bundle ID of the app where the keyboard was used. Internally stored as app_id.

Event Type: The type of the keyboard event. Internally stored as event. It can be one of the following:

  • KEY_CHAR (1): A character was pressed.
  • KEY_DELETE (2): The delete key was pressed.
  • INPUT_START (3): The keyboard was opened.
  • INPUT_FINISH (4): The keyboard was closed.

Keystroke: The character pressed in the KEY_CHAR event. Internally stored as keystroke.

Text: The full text in the text field, right after the event. Internally stored as text.

Example record:

{
  "study_id": "4624",
  "user_id": "1234567890",
  "device_id": "1234567890",
  "record_time": 1715600000000,
  "app_id": "com.whatsapp",
  "keystroke": "e",
  "text": "apple",
  "event": "1"
}

This example shows a record of a user typing the letter “e” in the WhatsApp app, and the text field contains the word “apple” after the event.

[!note]
The keyboard can only detect actions that happen within the keyboard itself. For example:

  • When a user presses the Send button in the WhatsApp interface, the keyboard only registers an INPUT_FINISH event (same as when the keyboard is closed).
  • When a user presses the Send button within the keyboard interface, it is recorded as a KEY_CHAR event.

Data Collection Behavior

Avicenna Keyboard records text input and keystroke events as the participant types in any app where the keyboard is being used.

The keyboard automatically detects and excludes password fields, secure inputs, and incognito/private modes; no data is collected in these contexts.

Adding Keyboard As a Data Source

See Accessing Data Sources.

Monitoring and Exporting Keyboard Data

Keyboard data can be monitored and exported via the Data Export page.

Keyboard Data Source in Participant Device

To use this data source, follow the platform-specific instructions below.

[!note]

  • Keyboard data is only collected after the participant provides informed consent. Participants can opt-out or enable Incognito Mode (only available on Android) at any time.
  • Participants can uninstall the keyboard or withdraw from the study at any time. Data collection stops immediately.

Android

Follow these steps to set up the Avicenna Keyboard on Android:

  1. Install the keyboard app. To set up the Avicenna Keyboard app, you need to first install the Avicenna Keyboard app from Google Play Store directly or by tapping the Install Keyboard App button in the corresponding onboarding alert in the Avicenna app.

  2. Consent to data collection. When you first open the Avicenna Keyboard app, you will see the consent step. Press the Consent button to provide explicit consent for anonymous keyboard data collection.

  3. Enable Avicenna Keyboard. Next, you will be prompted to enable the Avicenna Keyboard in your device’s system settings. Tap Open System Settings and enable the keyboard in the settings.

  4. Select Avicenna Keyboard. After enabling, return to the app and select Avicenna Keyboard as your active keyboard.

  5. Finish up. You can now customize the keyboard by tapping Start Customizing to access the main menu where you can configure languages, themes, typing preferences, and more.

iOS

Follow these steps to set up the Avicenna Keyboard on iOS:

  1. Install the keyboard app. To install the Avicenna Keyboard app, you need to first install the Apple TestFlight app. Then, by tapping the Install Keyboard App button in the corresponding onboarding alert in the Avicenna app, you will be redirected to the TestFlight app. Once there, you can install the Avicenna Keyboard app by tapping the Install button.

  2. Consent to data collection. When you first open the Avicenna Keyboard app, you will see a welcome screen explaining the study and privacy details. Press the Consent button to provide explicit consent for anonymous keyboard data collection.

  3. Open system settings. The app will ask you to enable the Avicenna Keyboard. Tap Open Settings to go to your device’s settings.

  4. Enable Avicenna Keyboard. In the iOS Settings app, go to Avicenna Keyboard > Keyboards. Enable the Avicenna Keyboard toggle.

  5. Allow full access. Enable Allow Full Access under the Avicenna Keyboard settings.

  6. Return to the app. Go back to the Avicenna Keyboard app. The app will confirm when the setup is complete and the keyboard is ready to use.

  7. Switch to Avicenna Keyboard. You can now switch to Avicenna Keyboard from any text input field by holding the globe icon on the keyboard and selecting Avicenna Keyboard.

[!note]
After switching to the Avicenna Keyboard once, the OS will save it as the default keyboard in most cases. In some cases, you may need to select the keyboard again.