API Reference
VirtualKeyboard component
Instantiate once per application inside your root Window or ApplicationWindow.
import Ln.VirtualKeyboard 1.0
VirtualKeyboard { width: parent.width }
Properties
| Property | Type | Default | Description |
|---|---|---|---|
maxWidth | real | -1 | Maximum keyboard width |
maxHeight | real | -1 | Maximum keyboard height |
inputProfiles | list<object> | (bundled defaults) | Optional; omit to use all 56 embedded profiles |
activeProfileIds | list<string> | ["en-qwerty"] | Enabled profile IDs |
currentProfileId | string | "en-qwerty" | Active profile ID |
theme | enum | Dark | Lnvk.Dark / Lnvk.Light |
numberRowEnabled | bool | false | Persistent number row |
predictionEnabled | bool | true | Word prediction |
rememberLearning | bool | true | Persist learned words |
customPredictionMode | enum | Lnvk.Disabled | Custom 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
| Property | Type | Default | Writable | Description |
|---|---|---|---|---|
visible | bool | false | yes | Keyboard visibility |
inputProfiles | list<object> | (bundled) | yes | Full profile list; omit on VirtualKeyboard to keep defaults |
activeProfileIds | list<string> | ["en-qwerty"] | yes | Enabled profile IDs |
activeProfiles | list<object> | (from ids) | no | Enabled profile objects (id, languageTag, layoutId, displayName, imeEngineId) |
currentProfileId | string | "en-qwerty" | yes | Active profile ID |
currentLanguage | string | "en" | no | BCP 47 tag of the active profile |
currentDisplayName | string | "English" | no | Display name of the active profile |
shiftState | int | Off | no | Off, Shifted, or CapsLock |
layoutPage | int | 0 | no | Current layout page |
inputMethodHints | int | 0 | no | Hints from focused field |
composingText | string | "" | no | In-progress IME text |
keyboardHeight | real | 260 | no | Current computed height |
maxWidth | real | 600 | yes | Maximum width |
maxHeight | real | -1 | yes | Maximum height |
theme | enum | Dark | yes | Lnvk.Dark / Lnvk.Light |
effectiveFontFamily | string | - | no | Read-only per-script rendering family from registered fonts. Bind as font.family: Lnvk.effectiveFontFamily |
numberRowEnabled | bool | false | yes | Persistent number row |
predictionEnabled | bool | true | yes | Word prediction |
rememberLearning | bool | true | yes | Persist learned words |
customPredictionMode | enum | Lnvk.Disabled | yes | Custom prediction policy (Lnvk.Disabled, Lnvk.Replace, Lnvk.Supersede) |
Methods
| Method | Description |
|---|---|
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.