spiegel-keyman/android/docs/engine/KMManager/canRemoveKeyboard.md
2024-10-31 10:08:17 +07:00

844 B

title
KMManager.canRemoveKeyboard()

Summary

The canRemoveKeyboard() method returns whether removing a keyboard is enabled, like in the keyboard picker menu.

Syntax

KMManager.canRemoveKeyboard()

Returns

Returns true if removing a keyboard is enabled, false otherwise.

Description

Use this method to check if a keyboard can be removed. If enabled, you can long-press on a row in the keyboard picker menu to remove a keyboard.

Examples

Example: Using canRemoveKeyboard()

The following script illustrates the use of canRemoveKeyboard():

    if (KeyboardController.getInstance().get().size() > 1 && KMManager.canRemoveKeyboard()) {
      // Remove the second keyboard
      KMManager.removeKeyboard(this, 1);
    }

See also