> For the complete documentation index, see [llms.txt](https://kinematicsoup.gitbook.io/reactor/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kinematicsoup.gitbook.io/reactor/api-reference/ks.reactor/ks.reactor.ksinput.md).

# Class ksInput

Namespace: [KS.Reactor](/reactor/api-reference/ks.reactor.md)\
Assembly: KSCommon.dll

Class for querying player inputs.

```csharp
public class ksInput
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ← [ksInput](/reactor/api-reference/ks.reactor/ks.reactor.ksinput.md)

#### Inherited Members

[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)), [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)), [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Properties

### IsUsed <a href="#ks_reactor_ksinput_isused" id="ks_reactor_ksinput_isused"></a>

Has this input been used?

```csharp
public bool IsUsed { get; }
```

#### Property Value

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

## Methods

### CleanUp() <a href="#ks_reactor_ksinput_cleanup" id="ks_reactor_ksinput_cleanup"></a>

Clears the state and returns the object to the pool. It is recommended you call this when you are done with an input.

```csharp
public void CleanUp()
```

### GetAxis(uint) <a href="#ks_reactor_ksinput_getaxis_system_uint32" id="ks_reactor_ksinput_getaxis_system_uint32"></a>

Gets the value of an axis.

```csharp
public float GetAxis(uint axis)
```

#### Parameters

`axis` [uint](https://learn.microsoft.com/dotnet/api/system.uint32)

Axis to get value for.

#### Returns

[float](https://learn.microsoft.com/dotnet/api/system.single)

Value of the axis.

### GetValue(uint) <a href="#ks_reactor_ksinput_getvalue_system_uint32" id="ks_reactor_ksinput_getvalue_system_uint32"></a>

Gets a value.

```csharp
public ksMultiType GetValue(uint id)
```

#### Parameters

`id` [uint](https://learn.microsoft.com/dotnet/api/system.uint32)

Id of value to get.

#### Returns

[ksMultiType](/reactor/api-reference/ks.reactor/ks.reactor.ksmultitype.md)

Value

### IsDown(uint) <a href="#ks_reactor_ksinput_isdown_system_uint32" id="ks_reactor_ksinput_isdown_system_uint32"></a>

Checks if a button is down.

```csharp
public bool IsDown(uint button)
```

#### Parameters

`button` [uint](https://learn.microsoft.com/dotnet/api/system.uint32)

Button to check.

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

True if the button is down.

### IsPressed(uint) <a href="#ks_reactor_ksinput_ispressed_system_uint32" id="ks_reactor_ksinput_ispressed_system_uint32"></a>

Checks if a button was pressed. This will be true for one frame when a button is pressed.

```csharp
public bool IsPressed(uint button)
```

#### Parameters

`button` [uint](https://learn.microsoft.com/dotnet/api/system.uint32)

Button to check.

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

True if the button was pressed.

### IsReleased(uint) <a href="#ks_reactor_ksinput_isreleased_system_uint32" id="ks_reactor_ksinput_isreleased_system_uint32"></a>

Checks if a button was released. This will be true for one frame when a button is released.

```csharp
public bool IsReleased(uint button)
```

#### Parameters

`button` [uint](https://learn.microsoft.com/dotnet/api/system.uint32)

Button to check.

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

True if the button was released.

### IsValueChanged(uint) <a href="#ks_reactor_ksinput_isvaluechanged_system_uint32" id="ks_reactor_ksinput_isvaluechanged_system_uint32"></a>

Checks if a value changed on this input frame.

```csharp
public bool IsValueChanged(uint id)
```

#### Parameters

`id` [uint](https://learn.microsoft.com/dotnet/api/system.uint32)

Id of value to check.

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

True if the value changed.

### Use() <a href="#ks_reactor_ksinput_use" id="ks_reactor_ksinput_use"></a>

Marks the input as used.

```csharp
public void Use()
```
