mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-06 00:45:32 +00:00
37 lines
880 B
Markdown
37 lines
880 B
Markdown
---
|
|
title: KMManager.getLongpressDelay()
|
|
---
|
|
|
|
## Summary
|
|
|
|
The `getLongpressDelay()` method returns from stored preference the number of milliseconds to trigger a longpress gesture.
|
|
Defaults to 500 milliseconds.
|
|
|
|
## Syntax
|
|
|
|
```java
|
|
int KMManager.getLongpressDelay()
|
|
```
|
|
|
|
### Returns
|
|
Returns the number of milliseconds to trigger a longpress gesture. This preference is stored at the app level and is applied to all Keyman keyboards.
|
|
|
|
## Description
|
|
Use this method to get details about how long to press a key for longpress keys to appear.
|
|
|
|
## Examples
|
|
|
|
### Example: Using `getLongpressDelay()`
|
|
|
|
The following code illustrates the use of `getLongpressDelay()`:
|
|
```java
|
|
int currentDelayTimeMS = KMManager.getLongpressDelay();
|
|
|
|
currentDelayTimeMS += 250; // ms
|
|
```
|
|
|
|
## History
|
|
Keyman Engine for Android 18.0: New function.
|
|
|
|
## See also
|
|
* [setLongpressDelay](setLongpressDelay)
|