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.
Constructors
new OptionsHelper.ControlOptionsHelper
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
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.Methods
enableAutoJump
Sets whether auto-jump is enabled.
Parameters:
val:trueto enable auto-jump
Returns: this helper for chaining.
enableDiscreteScrolling
Sets whether discrete mouse scrolling is enabled.
Parameters:
val:trueto enable discrete scrolling
Returns: this helper for chaining.
enableRawMouseInput
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:trueto enable raw mouse input
Returns: this helper for chaining.
enableTouchscreen
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:trueto enable touchscreen mode; ignored on Minecraft 26.2 and later
Returns: self for chaining
getCategories
getKeyBinds
getKeyBindsByCategory
Parameters:
category: the category identifier
Returns: translated key-mapping names and bound-key labels for the category, or
null if absent.getKeys
getMouseSensitivity
Returns: the current mouse sensitivity.
getMouseWheelSensitivity
Returns: the current mouse wheel sensitivity.
getParent
Returns: the parent options helper.
getRawKeys
Returns: a shallow clone of Minecraft's key-mapping array; the mappings themselves are not cloned.
invertMouse
Parameters:
val: whether to invert the mouse direction or not
Returns: self for chaining.
isAutoJumpEnabled
Returns whether auto-jump is enabled.
Returns:
true if enabled; false otherwise.isDiscreteScrollingEnabled
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.isMouseInverted
Returns:
true if the mouse direction should be inverted.isRawMouseInputEnabled
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.isSneakTogglingEnabled
Returns whether sneak toggling is enabled.
Returns:
true if enabled; false otherwise.isSprintTogglingEnabled
Returns whether sprint toggling is enabled.
Returns:
true if enabled; false otherwise.isTouchscreenEnabled
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.setMouseSensitivity
Parameters:
val: the new mouse sensitivity
Returns: self for chaining.
setMouseWheelSensitivity
Parameters:
val: the new mouse wheel sensitivity
Returns: self for chaining.
toggleSneak
Sets whether sneak toggling is enabled.
Parameters:
val:trueto enable sneak toggling
Returns: this helper for chaining.
toggleSprint
Parameters:
val: whether sprint toggling is enabled
Returns: this helper, for chaining.