c(ognition k)eyboard to record typing metrics on an iOS device
This repository is the official implementation of Analysis of Mobile Typing Characteristics in the Light of Cognition. Details on how to cite the paper can be found in the GitHub repo under "Cite this repository".
This repository is a Xcode project with an iOS Deployment Target of 15.0
.
First clone the repository on your computer:
git clone https://github.com/Simolation/ceyboard.git
Open the Xcode project, by opening the ceyboard.xcodeproj
file in Xcode.
The repo provides an application with the Bundle Identifier used during development and trial. In order to run it locally, a different Bundle Identifier and App Group is required.
- Select the project
ceyboard
in Xcode. - Select the
ceyboard
Target and open theSigning & Capabilities
tab. Select your Team and choose a new Bundle Identifier. - As the app needs an
App Group
to communicate between the app and the keyboard, you can find a tutorial on how to set up a new App Group here: https://www.appcoda.com/app-group-macos-ios-communication/ - Select the created App Group in Xcode.
- Repeat step 2. and 4. for the
keyboard
Target. - Update the Bundle Identifiers in
shared/SuiteName.swift
as they are required at runtime.
Build and run the app.
The app is structured into three main compartments:
/ceyboard/
The main app which provied the onboarding, the home view and the settings. This is also the app which is installed on the phone./keyboard/
The keyboard package provides the custom keyboard extension built on top of the open source project KeyboardKit. For more information please refer to the KeyboardKit Docs./shared/
The shared folder contains components which are accessible by both the main app and the keyboard. The shared access is realized over an App Group.
The shared package primarily contains the CoreData
database and the SessionTracker
, which tracks the performed events on the keyboard and stores them securely on the device's local database.
The app does not include cloud synchronization or an option to upload the data to ensure privacy. Instead, all the tracked data is stored locally with a manual export.
The manual export can be triggered through Settings > Export
.
The data is exported as a JSON file for easy evaluation.
The structure is as follows:
{
"gender": "male",
"device": "iPhone13,2",
"appVersion": "7",
"studyId": "0",
"birthyear": 1990,
"exportDate": 1646644093378.6631,
"matrix": [
[
// aa matrix pair
[
41, // frequency
0.1970570981502533, // mean
0.12307097762823105 // std
]
// ab ...
]
// ...
],
"sessions": [
{
"started_at": 1645959020630.1279,
"hostApp": "org.digital-medicine.ceyboard",
"ended_at": 1645959033263.4521,
"events": [
{
"created_at": 1645959028898.114,
"action": "character"
},
{
"created_at": 1645959029482.2439,
"action": "backspace"
},
{
"created_at": 1645959028682.2271,
"action": "character"
}
// ...
]
}
// ...
]
}
ceyboard is available under the MIT license. See the LICENSE file for more information.