mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-05 16:35:33 +00:00
Several functions got deprecated and replaced with a function with same name and parameters but different return type. The original function no longer exists. This change removes the documentation for those no longer existing deprecated functions. Also update the documentation for two deprecated functions to show what should be used instead. Build-bot: skip Test-bot: skip
68 lines
1.7 KiB
Markdown
68 lines
1.7 KiB
Markdown
---
|
|
title: KMManager.getCurrentKeyboardInfo()
|
|
---
|
|
|
|
## Summary
|
|
|
|
The **`getCurrentKeyboardInfo()`** method returns keyboard information
|
|
of the current keyboard.
|
|
|
|
## Syntax
|
|
|
|
``` javascript
|
|
KMManager.getCurrentKeyboardInfo(Context context)
|
|
```
|
|
|
|
### Parameters
|
|
|
|
`context`
|
|
: The context.
|
|
|
|
### Returns
|
|
|
|
Returns the current keyboard information of `Keyboard` type.
|
|
|
|
## Description
|
|
|
|
Use this method to get details of the currently selected keyboard.
|
|
Details include package ID, keyboard ID, language ID, keyboard name,
|
|
language name and fonts.
|
|
|
|
------------------------------------------------------------------------
|
|
|
|
## Examples
|
|
|
|
### Example: Using `getCurrentKeyboardInfo()`
|
|
|
|
The following script illustrate the use of `getCurrentKeyboardInfo()`:
|
|
|
|
``` javascript
|
|
Keyboard keyboardInfo = KMManager.getCurrentKeyboardInfo(this);
|
|
if (keyboardInfo != null) {
|
|
String packageID = keyboardInfo.getPackageID();
|
|
String keyboardId = keyboardInfo.getKeyboardID();
|
|
String keyboardName = keyboardInfo.getKeyboardName();
|
|
String languageId = keyboardInfo.getLanguageID();
|
|
String languageName = keyboardInfo.getLanguageName();
|
|
String version = keyboardInfo.getVersion();
|
|
String font = keyboardInfo.getFont();
|
|
String oskFont = keyboardInfo.getOSKFont();
|
|
//
|
|
}
|
|
```
|
|
|
|
## History
|
|
|
|
Added syntax for returning Keyboard type in Keyman Engine for Android
|
|
14.0.
|
|
|
|
Deprecated syntax for returning HashMap<String key, String value>
|
|
in Keyman Engine for Android 14.0
|
|
|
|
## See also
|
|
|
|
- [`getCurrentKeyboardIndex()`](getCurrentKeyboardIndex)
|
|
- [`getKeyboardIndex()`](getKeyboardIndex)
|
|
- [`getKeyboardInfo()`](getKeyboardInfo)
|
|
- [`getKeyboardsList()`](getKeyboardsList)
|
|
- [`keyboardExists()`](keyboardExists)
|