Keyboard Support

Contact and Search

Keyman.com Homepage

Header bottom

Keyman.com

Other versions
Version 18.0

Index

On this page

KMManager.setLongpressDelay()


Summary

The setLongpressDelay() method sets the number of milliseconds to trigger a longpress gesture as a stored preference.

Syntax

KMManager.setLongpressDelay(int longpressDelay)

Parameter

longpressDelay
The number of milliseconds, ranging from 300 ms to 1500 ms.

Description

Use this method to store how many milliseconds to trigger a longpress as a preference. This preference is stored at the Keyman app level, and is applied to all Keyman keyboards.

Examples

Example: Using setLongpressDelay()

The following code illustrates the use of setLongpressDelay():

    int currentDelayTimeMS = 300;

    // Store currentDelayTimeMS
    KMManager.setLongpressDelay(currentDelayTimeMS);

    // Apply the keyboard options
    KMManager.sendOptionsToKeyboard();

History

Keyman Engine for Android 18.0: New function.

See also