# OptionsHelper.ControlOptionsHelper

`com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper`

Input and mouse settings, including key bindings.  
 ```js
const options = Client.getGameOptions();  
options.control.getMouseSensitivity();  
 ```

Nested type declared in [OptionsHelper](OptionsHelper.md).

## Constructors

### new OptionsHelper.ControlOptionsHelper {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper_constructor-OptionsHelper-}

```js
new OptionsHelper.ControlOptionsHelper(OptionsHelper optionsHelper, OptionsHelper OptionsHelper)
```

Stores the supplied parent reference; settings methods use the enclosing `OptionsHelper` instance, which may differ.

**Parameters:**
- `OptionsHelper`: parent helper reference to retain

## Fields

### parent {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper_parent}

```js
parent: OptionsHelper
```

the whole options helper this group belongs to.  

Each group is a view onto one part of the settings, and this is the way back to the
rest of them, so a script that starts in a group and needs a setting from another
does not have to keep the outer handle around separately. It is the same object the
field was created with, and the same one the group's `getParent()` returns.  


The six group fields hold the same thing, so the example on
`SkinOptionsHelper.parent`, the first of them, covers this one too.

**Since:** 1.8.4

## Methods

### enableAutoJump {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper_enableAutoJump-boolean-}

```js
enableAutoJump(boolean val): OptionsHelper.ControlOptionsHelper
```

Sets whether auto-jump is enabled.

**Parameters:**
- `val`: `true` to enable auto-jump

**Returns:** this helper for chaining.

**Since:** 1.8.4

### enableDiscreteScrolling {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper_enableDiscreteScrolling-boolean-}

```js
enableDiscreteScrolling(boolean val): OptionsHelper.ControlOptionsHelper
```

Sets whether discrete mouse scrolling is enabled.

**Parameters:**
- `val`: `true` to enable discrete scrolling

**Returns:** this helper for chaining.

**Since:** 1.8.4

### enableRawMouseInput {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper_enableRawMouseInput-boolean-}

```js
enableRawMouseInput(boolean val): OptionsHelper.ControlOptionsHelper
```

Sets whether raw mouse input is enabled.  
Has no effect on Minecraft 26.3 and later, where the setting no longer exists and
SDL relative mouse mode uses raw input by default.

**Parameters:**
- `val`: `true` to enable raw mouse input

**Returns:** this helper for chaining.

**Since:** 1.8.4

### enableTouchscreen {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper_enableTouchscreen-boolean-}

```js
enableTouchscreen(boolean val): OptionsHelper.ControlOptionsHelper
```

Sets whether touchscreen mode is enabled.  

Minecraft 26.2 removed touchscreen mode with no replacement. On 26.2 and later,  
this method is deprecated and has no effect; it is retained for script compatibility.

**Parameters:**
- `val`: `true` to enable touchscreen mode; ignored on Minecraft 26.2 and later

**Returns:** self for chaining

**Since:** 1.8.4

### getCategories {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper_getCategories-}

```js
getCategories(): List<String>
```

**Returns:** distinct category identifiers used by the key mappings.

**Since:** 1.8.4

### getKeyBinds {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper_getKeyBinds-}

```js
getKeyBinds(): Map<String, String>
```

**Returns:** translated key-mapping names mapped to their translated bound-key labels.

**Since:** 1.8.4

### getKeyBindsByCategory {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper_getKeyBindsByCategory-String-}

```js
getKeyBindsByCategory(String category): Map<String, String>
```

**Parameters:**
- `category`: the category identifier

**Returns:** translated key-mapping names and bound-key labels for the category, or `null` if absent.

**Since:** 1.8.4

### getKeyBindsByCategory {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper_getKeyBindsByCategory-}

```js
getKeyBindsByCategory(): Map<String, Map<String, String>>
```

**Returns:** category identifiers mapped to translated key-mapping names and bound-key labels.

**Since:** 1.8.4

### getKeys {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper_getKeys-}

```js
getKeys(): List<String>
```

**Returns:** the key-mapping names, in mapping-array order.

**Since:** 1.8.4

### getMouseSensitivity {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper_getMouseSensitivity-}

```js
getMouseSensitivity(): double
```

**Returns:** the current mouse sensitivity.

**Since:** 1.8.4

### getMouseWheelSensitivity {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper_getMouseWheelSensitivity-}

```js
getMouseWheelSensitivity(): double
```

**Returns:** the current mouse wheel sensitivity.

**Since:** 1.8.4

### getParent {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper_getParent-}

```js
getParent(): OptionsHelper
```

**Returns:** the parent options helper.

**Since:** 1.8.4

### getRawKeys {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper_getRawKeys-}

```js
getRawKeys(): KeyMapping[]
```

**Returns:** a shallow clone of Minecraft's key-mapping array; the mappings themselves are not cloned.

**Since:** 1.8.4

### invertMouse {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper_invertMouse-boolean-}

```js
invertMouse(boolean val): OptionsHelper.ControlOptionsHelper
```

**Parameters:**
- `val`: whether to invert the mouse direction or not

**Returns:** self for chaining.

**Since:** 1.8.4

### isAutoJumpEnabled {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper_isAutoJumpEnabled-}

```js
isAutoJumpEnabled(): boolean
```

Returns whether auto-jump is enabled.

**Returns:** `true` if enabled; `false` otherwise.

**Since:** 1.8.4

### isDiscreteScrollingEnabled {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper_isDiscreteScrollingEnabled-}

```js
isDiscreteScrollingEnabled(): boolean
```

This option was introduced due to a bug on some systems where the mouse wheel would
scroll too fast.

**Returns:** `true` if discrete scrolling is enabled, `false` otherwise.

**Since:** 1.8.4

### isMouseInverted {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper_isMouseInverted-}

```js
isMouseInverted(): boolean
```

**Returns:** `true` if the mouse direction should be inverted.

**Since:** 1.8.4

### isRawMouseInputEnabled {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper_isRawMouseInputEnabled-}

```js
isRawMouseInputEnabled(): boolean
```

Returns whether raw mouse input is enabled.  
Minecraft 26.3 removed the setting; its SDL relative mouse mode uses raw input by
default, so this returns `true` on that target and cannot be changed there.

**Returns:** `true` if enabled; `false` otherwise.

**Since:** 1.8.4

### isSneakTogglingEnabled {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper_isSneakTogglingEnabled-}

```js
isSneakTogglingEnabled(): boolean
```

Returns whether sneak toggling is enabled.

**Returns:** `true` if enabled; `false` otherwise.

**Since:** 1.8.4

### isSprintTogglingEnabled {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper_isSprintTogglingEnabled-}

```js
isSprintTogglingEnabled(): boolean
```

Returns whether sprint toggling is enabled.

**Returns:** `true` if enabled; `false` otherwise.

**Since:** 1.8.4

### isTouchscreenEnabled {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper_isTouchscreenEnabled-}

```js
isTouchscreenEnabled(): boolean
```

Returns whether touchscreen mode is enabled.  

Minecraft 26.2 removed touchscreen mode with no replacement. On 26.2 and later,  
this method is deprecated and always returns `false` for compatibility.

**Returns:** `true` if enabled; `false` otherwise.

**Since:** 1.8.4

### setMouseSensitivity {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper_setMouseSensitivity-double-}

```js
setMouseSensitivity(double val): OptionsHelper.ControlOptionsHelper
```

**Parameters:**
- `val`: the new mouse sensitivity

**Returns:** self for chaining.

**Since:** 1.8.4

### setMouseWheelSensitivity {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper_setMouseWheelSensitivity-double-}

```js
setMouseWheelSensitivity(double val): OptionsHelper.ControlOptionsHelper
```

**Parameters:**
- `val`: the new mouse wheel sensitivity

**Returns:** self for chaining.

**Since:** 1.8.4

### toggleSneak {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper_toggleSneak-boolean-}

```js
toggleSneak(boolean val): OptionsHelper.ControlOptionsHelper
```

Sets whether sneak toggling is enabled.

**Parameters:**
- `val`: `true` to enable sneak toggling

**Returns:** this helper for chaining.

**Since:** 1.8.4

### toggleSprint {#com.jsmacrosce.jsmacros.client.api.helper.OptionsHelper.ControlOptionsHelper_toggleSprint-boolean-}

```js
toggleSprint(boolean val): OptionsHelper.ControlOptionsHelper
```

**Parameters:**
- `val`: whether sprint toggling is enabled

**Returns:** this helper, for chaining.

**Since:** 1.8.4
