---
title: "Knob (_RotaryKnob class)"
canonical: "https://docs.cuesystem.com/space/CVCHELP/1136427013/Knob%20(_RotaryKnob%20class)"
format: markdown
---
# IsPressed 

States if the knob is pressed.

#### Syntax 

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

#### Return value 

<u>[Boolean](https://cue.atlassian.net/wiki/spaces/CVCHELP/pages/495058958/Data+types#Boolean)</u> True if the knob is pressed, False otherwise. 

# OnPush 

This event is raised when the knob is pressed. 

#### Syntax* *

```
Event OnPush()
```

# OnChange

This event is raised when the knob is turned.

#### Syntax* *

```
Event OnChange(offset As Long)
```

#### Parameters* *

offset

<u>[Long](https://cue.atlassian.net/wiki/spaces/CVCHELP/pages/495058958/Data+types#Long)</u> - If clockwise rotation has occurred, the value of the parameter is greater than zero. If counterclockwise rotation has occurred, the value of the parameter is lower than zero.

# WaitWhilePressed 

This function waits while the knob is pressed or until the timeout has elapsed. 

#### Syntax 

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

#### Parameters* *

timeout 

<u>[Time](https://cue.atlassian.net/wiki/spaces/CVCHELP/pages/495058958/Data+types#Time)</u> Optional, defaults to _TIME_INFINITE. The maximum time to wait before returning. 

#### Return value 

<u>[Boolean](https://cue.atlassian.net/wiki/spaces/CVCHELP/pages/495058958/Data+types#Boolean)</u> True if the knob was released. False if the time has elapsed.