Initial setup of the keyboard.
This class has all the different configurations of the keyboard.
Constructor:
- (instancetype)initWithPanel:(nullable PanelConfiguration*) panel
capture:(nullable CaptureConfiguration*) capture
style:(nullable StyleConfiguration*) style
appearance:(nullable AppearanceConfiguration*) appearance
typing:(nullable TypingConfiguration*) typing
specialKeys:(nullable SpecialKeysConfiguration*) specialKeys
license:(nonnull LicenseConfiguration *) license
debug:(nullable DebugConfiguration*) debug;
This call is called when the KeyboardViewController starts up.
Example:
override func createConfiguration() -> KeyboardConfiguration {
// Configuration of the keyboard
let dataConfig = FLDataConfiguration()
let capture = CaptureConfiguration(true, output: enumCaptureOutput.captureOutput_string, dataConfig: dataConfig)
// Style
let style = StyleConfiguration()
// Appearance of press / long press
let appPopup = AppearancePopup()
let appLongpress = AppearanceLongPress()
let appearance = AppearanceConfiguration(objPopup: appPopup, objTouch: nil, objLongpress: appLongpress)
// TypingConfiguration which includes punctuationSymbols
let typing = TypingConfiguration()
// EmojiConfiguration at trigger point
let emojiConfig = EmojiConfiguration(skinTone: enumEmojiSkinTone.emojiSkinTone_Neutral)
// DebugConfiguration for get change layout
let debugConfig = DebugConfiguration(debug: ())
// Add specific height if you want.
let panelConfig = PanelConfiguration()
let license = LicenseConfiguration(licenseKey: _licenseKey_, licenseSecret: _licenseSecret_)
// KEYBOARD CONFIGURATION --
// it groups capture, style and takes as constructor if we want a custom view or not + specific height
//
let config = KeyboardConfiguration(panel: panelConfig,
capture: capture,
style: style,
appearance: appearance,
typing: typing,
specialKeys: nil,
license: license,
debug: debugConfig)
return config
}
Event | Description |
---|---|
licenseConfiguration | Configuration for the license key. |
styleConfiguration | Configuration for the style of the keyboard - themes. |
emojiConfiguration | Configuration for the emojis. |
panelConfiguration | Configuration for the panel. |
typingConfiguration | Configuration for the typing. |
captureConfiguration | Configuration for data capture. |
specialConfiguration | Configuration for special keys in the keyboard. |
appearanceConfiguration | Configuration for keys appearance. |
debugConfiguration | Configuration for enabling more elements for debug. |
Class to configure the licenseKey and the licenseSecret for the keyboard.
@property (copy, nonatomic, nullable) NSString *licenseSecret;
- (instancetype)initWithLicenseKey:(nonnull NSString *)licenseKey
licenseSecret:(nonnull NSString *)licenseSecret;
@end
Example:
let license = LicenseConfiguration(licenseKey: <licenseKey>, licenseSecret: <licenseSecret>)
Notes:
Class to configure the look and feel of the keyboard SDK at startup time.
By default we have one light and dark theme. If you want to change it, initiate this with the specific theme to load.
Constructor:
- (instancetype) initWithTheme:(NSDictionary*) dictTheme
withDarkTheme:(NSDictionary*) dictDarkTheme;
Parameters:
Class Properties:
@property (nonatomic) NSString* spacebarLogo;
@property (nonatomic) BOOL fitSpacebarLogo;
@property (nonatomic) enumSpacebarStyle spacebarStyle;
Property | Description |
---|---|
spacebarLogo | Name of the asset that should be used as an image. This image must be in the project as Asset. |
fitSpacebarLogo | true - The asset should be AspectFit inside the spacebar false - The asset will be centered without any scaling. |
spacebarStyle | SpacebarStyle.Automatic: Shows user languages when more than one configured. SpacebarStyle.LogoOnly: Shows logo always SpacebarStyle.LanguageOnly: Shows only the user languages when more than one configured, regardless of whether a logo has been set. |
By default, those are <nil>. If you initialise them, a logo in the space bar will appear.
Class to configure the look and feel of the emojis when the keyboard opens.
let emojiConfig = EmojiConfiguration(skinTone: enumEmojiSkinTone.emojiSkinTone_Neutral)
EmojiSkinTone | Description |
---|---|
emojiSkinTone_Neutral | Standard, by default. |
emojiSkinTone_Light | Light emoji color. |
emojiSkinTone_Medium_Light | Medium Light emoji color. |
emojiSkinTone_Medium | Medium emoji color. |
emojiSkinTone_Medium_Dark | Medium Dark emoji color. |
emojiSkinTone_Dark | Dark emoji color. |
Class to configure everything related to different views and sizes.
@interface PanelConfiguration: NSObject
// This flag enables customTopbar, which by default is not enabled
@property (nonatomic) BOOL enableCustomTopBar;
// If this has a value, we use it to set the height of the topbar
@property (nonatomic) CGFloat heightTopBar;
@end
Parameters:
Class to configure everything related to different views and sizes.
@interface PanelConfiguration: NSObject
// This flag enables customTopbar, which by default is not enabled
@property (nonatomic) BOOL enableCustomTopBar;
// If this has a value, we use it to set the height of the topbar
@property (nonatomic) CGFloat heightTopBar;
@end
Parameters:
The capture configuration applied to the keyboard engine.
Notes:
Constructor:
- (instancetype) initWith:(BOOL) enabled output:(enumCaptureOutput) output
dataConfig:(FLDataConfiguration*) dataConfig;
enabled | When true, store captured data in the provided location. |
output | enumCaptureOutput: captureOutput_file : store data content in a file captureOutput_string : send data at the end of the session via delegate function dataCollection |
dataConfig | The data capture configuration, see FLDataConfiguration |
Example:
let capture = CaptureConfiguration(true, output: enumCaptureOutput.captureOutput_string, dataConfig: dataConfig)
Fields:
Name | Type | Default value |
---|---|---|
enabled | Boolean | false |
output | enumCaptureOutput | captureOutput_file |
dataConfiguration | FLDataConfiguration | FLDataConfiguration() |
The data capture configuration.
Constructor:
public convenience init(
text: Bool = true,
swipe: Bool = true,
emoji: Bool = true,
layout: Bool = true,
textField: Bool = true,
language: Bool = true,
type: Bool = true,
area: Bool = true,
code: Bool = true,
position: Bool = true,
press: Bool = true,
keyPress: Bool = true,
keyCenter: Bool = true,
keyBounds: Bool = true,
configCoordinate: enumDataConfigCoordinate = .dataConfigCoordinate_screenPixel,
word: Bool = true,
delete: Bool = true,
keyPlane: Bool = true,
keyText: Bool = true,
positionEnd: Bool = true,
keyPressEnd: Bool = true,
predictionsTouch: Bool = true,
prediction: Bool = true,
configFormat: enumDataConfigFormat = .dataConfigFormat_standard,
accelerometer: Bool = false,
autocorrection: Bool = true,
distanceFromLastTouch: Bool = true,
keyPositionLimited: Bool = false,
autocorrectionLimited: Bool = false,
wordLimited: Bool = false,
predictionLimited: Bool = false,
swipeLimited: Bool = false,
deleteLimited: Bool = false,
interKeyTimeHistogram: Bool = true,
interKeyTimeHistogramInterval: Int = 50,
interKeyTimeHistogramCount: Int = 21)
text | Capture all the written text |
swipe | Capture all swipes of the user |
emoji | Capture all emojis with all hex values of them |
layout | Layout parameter: QWERTY, AZERTY, … |
textField | Field in which the user is typing. Specified in detail in the specs |
language | Capture the current language of the user |
type | Capture the type, which is a specific parameter |
area | Capture the area, which is another specific parameter |
code | Capture the code of the key pressed. |
position | Capture positions from the center of the key |
press | Capture the time of press and the time of release |
keyPress | Capture the press key in the coordinate system |
keyCenter | Capture the center key in the coordinate system |
keyBounds | Capture the bounds of the current key |
configCoordinate | The type of coordinate system to use. See DataConfigCoordinate for the available options. |
word | Capture state and data of words |
delete | Capture words deleted |
keyPlane | Capture key planes |
keyText | Capture the labels of each key pressed |
positionEnd | Capture release positions from the center of the key |
keyPressEnd | Capture release positions |
predictionsTouch | Capture touch position of predictions |
prediction | Capture predictions selected |
configFormat | Format of data files. Can be any of: dataConfigFormat_standard dataConfigFormat_groupByTap |
An object containing constants to different types of coordinate systems:
dataCaptureCoordinate_screenPixel | Reference to all pixels of the whole screen. This includes all pixels regardless of the density. |
dataCaptureCoordinate_keyboardPixel | Reference to all pixels of the keyboard, but, with all the pixels, regardless of the density. |
dataCaptureCoordinate_keyboard | Reference to pixels of the keyboard, seen internally, which means that it would be different depending on the device, density, etc. |
dataCaptureCoordinate_internalKeyboard | Reference to the internal points for the Engine. 320 x 288 points |
Note:
Data Component specifies all the different components.
Class to configure the elements that might appear on the key to the left of the space bar on a QWERTY layout.
@interface SpecialKeysConfiguration: NSObject
// Long press on the special key situated to the left of the space bar appears
// different options, that we call "magic button actions"
@property (nonatomic) NSArray* arrayMagicButton;
@end
Parameters:
Class to configure how the key shape and the popups appear.
- (instancetype) initWithObjPopup:(nullable AppearancePopup*) objPoup
objTouch:(nullable AppearanceObject*) objTouch
objLongpress:(nullable AppearanceLongPress*) objLongpress;
Parameters:
By default, AppearancePopup offers a standard implementation of the popups, you do not need to do anything.
Class to configure all related debugging aspects. This is not recommended to be used in a production environment.
@interface DebugConfiguration : NSObject
- (instancetype) initDebug;
@property (nonatomic) BOOL registerLayoutChange;
@end
Notes:
Last updated on July 7, 2022