---
title: "LongPressArrowPad (Basic)"
canonical: "https://docs.cuesystem.com/space/CVCGC/401768461/LongPressArrowPad%20(Basic)"
format: markdown
---
> Macro (toc)

---

# Description

This object consists of four arrow buttons and one center button. All buttons behave like simple push buttons and enable users to distinguish between short and long presses. Every button generates an OnPress event when it is pressed. Every button has a function to ask whether it is pressed.

![image](media://e2974dfe-5acd-45d0-9a80-34e3c69616ba)

# Properties

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Property Name | Data Type | Allowed Values | Default Value | Description |
| Behavior |
| ShortPressTime | Time | Any non-negative | 0:0.4 | Time boundary between short and long press. |
| Appearance |
| Opacity | Byte | 0 to 255 | 255 | Opacity of the entire object. |

# Functions

## IsCenterButtonPressed

By this function you can test whether a CenterButton is pushed (function returns True) or not (return value is False).

#### Syntax

```visualbasic
Function IsCenterButtonPressed() As Boolean
```

## IsDownButtonPressed

By this function you can test whether a DownButton is pushed (function returns True) or not (return value is False).

#### Syntax

```visualbasic
Function IsDownButtonPressed() As Boolean
```

## IsLeftButtonPressed 

By this function you can test whether a LeftButton is pushed (function returns True) or not (return value is False).

#### Syntax

```visualbasic
Function IsLeftButtonPressed() As Boolean
```

## IsRightButtonPressed

By this function you can test whether a RightButton is pushed (function returns True) or not (return value is False).

#### Syntax

```visualbasic
Function IsRightButtonPressed() As Boolean
```

## IsUpButtonPressed 

By this function you can test whether a UpButton is pushed (function returns True) or not (return value is False).

#### Syntax

```visualbasic
Function IsUpButtonPressed() As Boolean
```

## WaitWhilePressed 

This function waits for the end of any button push. If optional timeout parameter is used, the maximum waiting time is limited by timeout value. In case of timeout excess, function returns False, otherwise it returns True.

#### Syntax

```visualbasic
Function WaitWhilePressed(Optional timeout As Time := TIME_INFINITE) As Boolean
```

# Events

## OnPressCenter

This event is generated when the CenterButton is released (in case that press is shorter then ShortPressTime) or after ShortPressTime from the start of pushing the CenterButton (in case of long press). If press of the CenterButton is shorter then ShortPressTime, shortpress parameter is True, otherwise shortpress is False.

#### Syntax

```visualbasic
Function OnPressCenter As Process(shortpress As Boolean)
```

## OnPressDown

This event is generated when the DownButton is released (in case that press is shorter then ShortPressTime) or after ShortPressTime from the start of pushing the DownButton (in case of long press). If press of the DownButton is shorter then ShortPressTime, shortpress parameter is True, otherwise shortpress is False.

#### Syntax

```visualbasic
Function OnPressDown As Process(shortpress As Boolean)
```

## OnPressLeft

This event is generated when the LeftButton is released (in case that press is shorter then ShortPressTime) or after ShortPressTime from the start of pushing the LeftButton (in case of long press). If press of the LeftButton is shorter then ShortPressTime, shortpress parameter is True, otherwise shortpress is False.

#### Syntax

```visualbasic
Function OnPressLeft As Process(shortpress As Boolean)
```

## OnPressRight

This event is generated when the RightButton is released (in case that press is shorter then ShortPressTime) or after ShortPressTime from the start of pushing the RightButton (in case of long press). If press of the RightButton is shorter then ShortPressTime, shortpress parameter is True, otherwise shortpress is False.

#### Syntax

```visualbasic
Function OnPressRight As Process(shortpress As Boolean)
```

## OnPressUp 

This event is generated when the UpButton is released (in case that press is shorter then ShortPressTime) or after ShortPressTime from the start of pushing the UpButton (in case of long press). If press of the UpButton is shorter then ShortPressTime, shortpress parameter is True, otherwise shortpress is False.

#### Syntax

```visualbasic
Function OnPressUp As Process(shortpress As Boolean)
```