Offer Products Case Studies Expertises About us Contact Blog
FR EN

API Reference

VirtualKeyboard component

Instantiate once per application inside your root Window or ApplicationWindow.

import Ln.VirtualKeyboard 1.0
VirtualKeyboard { width: parent.width }

Properties

PropertyTypeDefaultDescription
maxWidthreal-1Maximum keyboard width
maxHeightreal-1Maximum keyboard height
inputProfileslist<object>(bundled defaults)Optional; omit to use all 56 embedded profiles
activeProfileIdslist<string>["en-qwerty"]Enabled profile IDs
currentProfileIdstring"en-qwerty"Active profile ID
themeenumDarkLnvk.Dark / Lnvk.Light
numberRowEnabledboolfalsePersistent number row
predictionEnabledbooltrueWord prediction
rememberLearningbooltruePersist learned words
customPredictionModeenumLnvk.DisabledCustom prediction source policy (Lnvk.Disabled, Lnvk.Replace, Lnvk.Supersede)
Theme overrides: see Theming

Lnvk singleton

Global singleton automatically available after importing Ln.VirtualKeyboard 1.0. Reflects live keyboard state and exposes methods.

Properties

PropertyTypeDefaultWritableDescription
visibleboolfalseyesKeyboard visibility
inputProfileslist<object>(bundled)yesFull profile list; omit on VirtualKeyboard to keep defaults
activeProfileIdslist<string>["en-qwerty"]yesEnabled profile IDs
activeProfileslist<object>(from ids)noEnabled profile objects (id, languageTag, layoutId, displayName, imeEngineId)
currentProfileIdstring"en-qwerty"yesActive profile ID
currentLanguagestring"en"noBCP 47 tag of the active profile
currentDisplayNamestring"English"noDisplay name of the active profile
shiftStateintOffnoOff, Shifted, or CapsLock
layoutPageint0noCurrent layout page
inputMethodHintsint0noHints from focused field
composingTextstring""noIn-progress IME text
keyboardHeightreal260noCurrent computed height
maxWidthreal600yesMaximum width
maxHeightreal-1yesMaximum height
themeenumDarkyesLnvk.Dark / Lnvk.Light
effectiveFontFamilystring-noRead-only per-script rendering family from registered fonts. Bind as font.family: Lnvk.effectiveFontFamily
numberRowEnabledboolfalseyesPersistent number row
predictionEnabledbooltrueyesWord prediction
rememberLearningbooltrueyesPersist learned words
customPredictionModeenumLnvk.DisabledyesCustom prediction policy (Lnvk.Disabled, Lnvk.Replace, Lnvk.Supersede)

Methods

MethodDescription
selectProfile(string id)Switch to a profile by ID
selectLanguage(string bcp47)Switch to the first active profile with this language tag
profilesForLanguageTag(string languageTag)All configured profiles with this exact languageTag
displayName(string bcp47)Generic display name for a language tag
profileDisplayName(string id)Display name for a profile ID
setCustomPredictionDictionary(string languageTag, string predFilePath)Set custom .pred file for one language/tag
clearCustomPredictionDictionary(string languageTag)Clear one language/tag custom dictionary
clearCustomPredictionDictionaries()Clear all custom dictionaries
hide()Hide the keyboard

C++ API

The public C++ API is exposed through a single umbrella header:

#include <lnvk>

This provides FontPaths and KeyboardManager. With find_package(LNVK), ln_virtual_keyboard_deploy(myapp) adds the include/lnvk/ directory to your target's include path.

See Languages for input profiles, Theming for fonts, and Configuration for custom prediction dictionaries.