---
title: "DIButton, DIOButton, GIOButton, UniversalButton, VersatileButton"
canonical: "https://docs.cuesystem.com/space/CVCDD/439517231/DIButton%2C%20DIOButton%2C%20GIOButton%2C%20UniversalButton%2C%20VersatileButton"
format: markdown
---
> Macro (toc)

---

# Description

These drivers convert digital input, digital I/O input, general I/O, or versatile input to a button. Appropriate driver emulates a hardware keypad or touch panel button with the same functionality. The potential free button has to be connected between the appropriate channel pin and the ground.

# Functions

## IsPressed

This function returns True, if the input pin is closed to the ground (button is pressed). It returns False if the input pin is opened (button is released).

#### Syntax

```visualbasic
Function IsPressed () As Boolean
```

## WaitWhilePressed

This function waits while the input pin is closed (button is pressed). Parameter timeout specifies maximum time for the waiting. If the input is opened (button is released) before timeout, the function returns True. If the time interval exceeds the specified timeout, the function returns False even if the input pin is still in the closed state (button is pressed).

#### Syntax

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

# Events

## OnPush As Process

This event is raised when the input pin switches between the open state (button is released) and the close state (button is pressed).

#### Syntax

```visualbasic
OnPush As Process ()
```