MiniQuake

src/miniquake/input.ml

Package
miniquake.input
Reachable
Yes

Imports

Declarations

absoluteValue

function absoluteValue(value)

Return absolute value derived from the active module state.

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `absoluteValue`.

View source

actionDown

function actionDown(command)

Implements the `actionDown` operation for `miniquake.input` (action down).

ParameterTypeDefaultDescription
commanddynamic—Console or protocol command to execute.

View source

actionPressed

function actionPressed(command)

Implements the `actionPressed` operation for `miniquake.input` (action pressed).

ParameterTypeDefaultDescription
commanddynamic—Console or protocol command to execute.

View source

alwaysMouseLook

alwaysMouseLook

Tracks the module-level always mouse look state owned by `miniquake.input`.

View source

applyModernMovementBindings

function applyModernMovementBindings()

Install the modern movement layout once when upgrading an original Quake configuration. Key_StringToKeynum deliberately distinguishes one-character upper- and lower-case names, while live Win32 polling uses the lower-case slots installed by resetBindings. Clear stale upper-case aliases so one physical key cannot own two different kbutton commands.

View source

applyMouse

function applyMouse(command, mouseSensitivity, yawScale, pitchScale, filterEnabled)

Apply mouse to the active subsystem state.

ParameterTypeDefaultDescription
commanddynamic—Console or protocol command to execute.
mouseSensitivitydynamic—The mouse sensitivity input consumed by `applyMouse`.
yawScaledynamic—The yaw scale input consumed by `applyMouse`.
pitchScaledynamic—The pitch scale input consumed by `applyMouse`.
filterEnableddynamic—The filter enabled input consumed by `applyMouse`.

View source

applyMouseDelta

function applyMouseDelta(command, deltaX, deltaY, mouseSensitivity, yawScale, pitchScale)

IN_MouseMove first multiplies raw cursor motion by sensitivity and then by m_yaw/m_pitch. The former port treated sensitivity itself as degrees per pixel, making the stock value 3 about 45 times too strong.

ParameterTypeDefaultDescription
commanddynamic—Console or protocol command to execute.
deltaXdynamic—The delta x input consumed by `applyMouseDelta`.
deltaYdynamic—The delta y input consumed by `applyMouseDelta`.
mouseSensitivitydynamic—The mouse sensitivity input consumed by `applyMouseDelta`.
yawScaledynamic—The yaw scale input consumed by `applyMouseDelta`.
pitchScaledynamic—The pitch scale input consumed by `applyMouseDelta`.

View source

AXIS_FORWARD

const AXIS_FORWARD = 1

Defines the axis forward value used by `miniquake.input`.

View source

AXIS_LOOK

const AXIS_LOOK = 2

Defines the axis look value used by `miniquake.input`.

View source

AXIS_NADA

const AXIS_NADA = 0

Defines the axis nada value used by `miniquake.input`.

View source

AXIS_SIDE

const AXIS_SIDE = 3

Defines the axis side value used by `miniquake.input`.

View source

AXIS_TURN

const AXIS_TURN = 4

Defines the axis turn value used by `miniquake.input`.

View source

bindingForCode

function bindingForCode(code)

Implements the `bindingForCode` operation for `miniquake.input` (binding for code).

ParameterTypeDefaultDescription
codedynamic—The code input consumed by `bindingForCode`.

View source

bindingForCommand

function bindingForCommand(command)

Implements the `bindingForCommand` operation for `miniquake.input` (binding for command).

ParameterTypeDefaultDescription
commanddynamic—Console or protocol command to execute.

View source

bindingHoldsKey

function bindingHoldsKey(command, key)

Implements the `bindingHoldsKey` operation for `miniquake.input` (binding holds key).

ParameterTypeDefaultDescription
commanddynamic—Console or protocol command to execute.
keydynamic—Key used to identify the requested entry.

View source

bindings

bindings

Tracks the module-level bindings state owned by `miniquake.input`.

View source

bindingsForCommand

function bindingsForCommand(command)

Implements the `bindingsForCommand` operation for `miniquake.input` (bindings for command).

ParameterTypeDefaultDescription
commanddynamic—Console or protocol command to execute.

View source

bindingText

function bindingText()

Implements the `bindingText` operation for `miniquake.input` (binding text).

View source

bindKey

function bindKey(keyName, command)

Implements the `bindKey` operation for `miniquake.input` (bind key).

ParameterTypeDefaultDescription
keyNamedynamic—Name that identifies the requested value or resource.
commanddynamic—Console or protocol command to execute.

View source

buildOriginalMove

function buildOriginalMove(command, signon, frameMilliseconds, mouseSensitivity, yawScale, pitchScale, filterEnabled, forwardSpeed, backSpeed, sideSpeed, upSpeed, noclipAngleHack, pollButtonBindings, deviceActive, minimized)

Create and initialize original move.

ParameterTypeDefaultDescription
commanddynamic—Console or protocol command to execute.
signondynamic—The signon input consumed by `buildOriginalMove`.
frameMillisecondsdynamic—The frame milliseconds input consumed by `buildOriginalMove`.
mouseSensitivitydynamic—The mouse sensitivity input consumed by `buildOriginalMove`.
yawScaledynamic—The yaw scale input consumed by `buildOriginalMove`.
pitchScaledynamic—The pitch scale input consumed by `buildOriginalMove`.
filterEnableddynamic—The filter enabled input consumed by `buildOriginalMove`.
forwardSpeeddynamic—The forward speed input consumed by `buildOriginalMove`.
backSpeeddynamic—The back speed input consumed by `buildOriginalMove`.
sideSpeeddynamic—The side speed input consumed by `buildOriginalMove`.
upSpeeddynamic—The up speed input consumed by `buildOriginalMove`.
noclipAngleHackdynamic—The noclip angle hack input consumed by `buildOriginalMove`.
pollButtonBindingsdynamic—The poll button bindings input consumed by `buildOriginalMove`.
deviceActivedynamic—The device active input consumed by `buildOriginalMove`.
minimizeddynamic—The minimized input consumed by `buildOriginalMove`.

View source

buttonCommandButtons

buttonCommandButtons

Keep the matching kbutton references beside the canonical names. The live poll visits every command once per frame, so resolving the same 17 constant strings through buttonForCommand would only allocate lowercase copies and repeat its linear comparison chain.

View source

buttonCommandNames

buttonCommandNames

Keep the stock kbutton command set in persistent storage. Constructing this array in buttonCommands used to allocate it multiple times in every gameplay frame while the live binding poll was active.

View source

buttonCommands

function buttonCommands()

Implements the `buttonCommands` operation for `miniquake.input` (button commands).

View source

buttonForCommand

function buttonForCommand(command)

Resolve an arbitrary-case button command through its canonical name.

ParameterTypeDefaultDescription
commanddynamic—Console or protocol command to execute.

View source

buttonForNormalizedCommand

function buttonForNormalizedCommand(wanted)

Implements the `buttonForNormalizedCommand` operation for `miniquake.input` (button for normalized command).

ParameterTypeDefaultDescription
wanteddynamic—The wanted input consumed by `buttonForNormalizedCommand`.

View source

captureGameplayTransitionHeldCodes

function captureGameplayTransitionHeldCodes()

Capture only the physical +command controls that were already held when the UI/map transition began. Inputs first pressed after loading are intentional gameplay and must never extend the suppression latch.

View source

CL_AdjustAngles

function CL_AdjustAngles(command, frameTime, yawSpeed, pitchSpeed, angleSpeedKey)

Apply the Quake-compatible cl adjust angles behavior.

ParameterTypeDefaultDescription
commanddynamic—Console or protocol command to execute.
frameTimedynamic—Time value used by the operation.
yawSpeeddynamic—The yaw speed input consumed by `CL_AdjustAngles`.
pitchSpeeddynamic—The pitch speed input consumed by `CL_AdjustAngles`.
angleSpeedKeydynamic—The angle speed key input consumed by `CL_AdjustAngles`.

View source

CL_BaseMove

function CL_BaseMove(command, signon, frameTime, forwardSpeed, backSpeed, sideSpeed, upSpeed, moveSpeedKey, yawSpeed, pitchSpeed, angleSpeedKey)

Apply the Quake-compatible cl base move behavior.

ParameterTypeDefaultDescription
commanddynamic—Console or protocol command to execute.
signondynamic—The signon input consumed by `CL_BaseMove`.
frameTimedynamic—Time value used by the operation.
forwardSpeeddynamic—The forward speed input consumed by `CL_BaseMove`.
backSpeeddynamic—The back speed input consumed by `CL_BaseMove`.
sideSpeeddynamic—The side speed input consumed by `CL_BaseMove`.
upSpeeddynamic—The up speed input consumed by `CL_BaseMove`.
moveSpeedKeydynamic—The move speed key input consumed by `CL_BaseMove`.
yawSpeeddynamic—The yaw speed input consumed by `CL_BaseMove`.
pitchSpeeddynamic—The pitch speed input consumed by `CL_BaseMove`.
angleSpeedKeydynamic—The angle speed key input consumed by `CL_BaseMove`.

View source

CL_ButtonBits

function CL_ButtonBits()

Apply the Quake-compatible cl button bits behavior.

View source

CL_FinishMove

function CL_FinishMove(command)

Apply the Quake-compatible cl finish move behavior.

ParameterTypeDefaultDescription
commanddynamic—Console or protocol command to execute.

View source

CL_InitInput

function CL_InitInput()

CL_InitInput's command registrations are represented explicitly so both the host command layer and tests can dispatch exactly the stock command set.

View source

CL_KeyState

function CL_KeyState(button)

Apply the Quake-compatible cl key state behavior.

ParameterTypeDefaultDescription
buttondynamic—The button input consumed by `CL_KeyState`.

View source

CL_TakeImpulse

function CL_TakeImpulse()

Apply the Quake-compatible cl take impulse behavior.

View source

clear

function clear(command)

Implements the `clear` operation for `miniquake.input` (clear).

ParameterTypeDefaultDescription
commanddynamic—Console or protocol command to execute.

View source

clearEventKeyStates

function clearEventKeyStates()

Clear all ordered keyboard levels after focus loss or input shutdown.

View source

clearJoystickSnapshot

function clearJoystickSnapshot()

Clears joystick snapshot for `miniquake.input`.

View source

collect

function collect(command, frameMilliseconds, mouseSensitivity)

Implements the `collect` operation for `miniquake.input` (collect).

ParameterTypeDefaultDescription
commanddynamic—Console or protocol command to execute.
frameMillisecondsdynamic—The frame milliseconds input consumed by `collect`.
mouseSensitivitydynamic—The mouse sensitivity input consumed by `collect`.

View source

collectGame

function collectGame(command, frameMilliseconds, mouseSensitivity, yawScale, pitchScale, filterEnabled, forwardSpeed, backSpeed, sideSpeed, upSpeed)

Implements the `collectGame` operation for `miniquake.input` (collect game).

ParameterTypeDefaultDescription
commanddynamic—Console or protocol command to execute.
frameMillisecondsdynamic—The frame milliseconds input consumed by `collectGame`.
mouseSensitivitydynamic—The mouse sensitivity input consumed by `collectGame`.
yawScaledynamic—The yaw scale input consumed by `collectGame`.
pitchScaledynamic—The pitch scale input consumed by `collectGame`.
filterEnableddynamic—The filter enabled input consumed by `collectGame`.
forwardSpeeddynamic—The forward speed input consumed by `collectGame`.
backSpeeddynamic—The back speed input consumed by `collectGame`.
sideSpeeddynamic—The side speed input consumed by `collectGame`.
upSpeeddynamic—The up speed input consumed by `collectGame`.

View source

commandButton

function commandButton(command)

Resolve an arbitrary-case signed input command to its shared kbutton.

ParameterTypeDefaultDescription
commanddynamic—Console or protocol command to execute.

View source

commandButtonNormalized

function commandButtonNormalized(command)

Implements the `commandButtonNormalized` operation for `miniquake.input` (command button normalized).

ParameterTypeDefaultDescription
commanddynamic—Console or protocol command to execute.

View source

commandForKey

function commandForKey(keyName)

Implements the `commandForKey` operation for `miniquake.input` (command for key).

ParameterTypeDefaultDescription
keyNamedynamic—Name that identifies the requested value or resource.

View source

configurePlatform

function configurePlatform(registry, noMouse, noJoystick, useDirectInput)

Update subsystem configuration for configure platform.

ParameterTypeDefaultDescription
registrydynamic—The registry input consumed by `configurePlatform`.
noMousedynamic—The no mouse input consumed by `configurePlatform`.
noJoystickdynamic—The no joystick input consumed by `configurePlatform`.
useDirectInputdynamic—The use direct input input consumed by `configurePlatform`.

View source

consumePitchDriftRequests

function consumePitchDriftRequests()

Consume pending state for consume pitch drift requests.

View source

createButton

function createButton()

Create and initialize button.

View source

createCommand

function createCommand()

Create and initialize command.

View source

cvarValue

function cvarValue(name, fallback)

Return cvar value derived from the active module state.

ParameterTypeDefaultDescription
namedynamic—Stable name that identifies the requested object or option.
fallbackdynamic—Value to use when the requested input is unavailable or invalid.

View source

DEFAULT_ANGLE_SPEED_KEY

const DEFAULT_ANGLE_SPEED_KEY = 1.5

Defines the default angle speed key value used by `miniquake.input`.

View source

DEFAULT_M_FORWARD

const DEFAULT_M_FORWARD = 1.

Defines the default m forward value used by `miniquake.input`.

View source

DEFAULT_M_PITCH

const DEFAULT_M_PITCH = 2.2e-002

Defines the default m pitch value used by `miniquake.input`.

View source

DEFAULT_M_SIDE

const DEFAULT_M_SIDE = 0.8

Defines the default m side value used by `miniquake.input`.

View source

DEFAULT_M_YAW

const DEFAULT_M_YAW = 2.2e-002

Defines the default m yaw value used by `miniquake.input`.

View source

DEFAULT_MOVE_SPEED_KEY

const DEFAULT_MOVE_SPEED_KEY = 2.

Defines the default move speed key value used by `miniquake.input`.

View source

DEFAULT_PITCH_SPEED

const DEFAULT_PITCH_SPEED = 150.

Defines the default pitch speed value used by `miniquake.input`.

View source

DEFAULT_YAW_SPEED

const DEFAULT_YAW_SPEED = 140.

Defines the default yaw speed value used by `miniquake.input`.

View source

directInput

directInput

Tracks the module-level direct input state owned by `miniquake.input`.

View source

directInputRequested

directInputRequested

Tracks the module-level direct input requested state owned by `miniquake.input`.

View source

dispatchInputCommand

function dispatchInputCommand(command, key, value)

Execute input command.

ParameterTypeDefaultDescription
commanddynamic—Console or protocol command to execute.
keydynamic—Key used to identify the requested entry.
valuedynamic—Value consumed by `dispatchInputCommand`.

View source

eventKeyDownStates

eventKeyDownStates

Tracks the module-level event key down states state owned by `miniquake.input`.

View source

filteredMouseDelta

function filteredMouseDelta(filterEnabled)

Implements the `filteredMouseDelta` operation for `miniquake.input` (filtered mouse delta).

ParameterTypeDefaultDescription
filterEnableddynamic—The filter enabled input consumed by `filteredMouseDelta`.

View source

firstPressedKey

function firstPressedKey()

Return first pressed key for the active module state.

View source

Force_CenterView_f

function Force_CenterView_f(command)

Mirror Quake's Force_CenterView_f routine and its observable state changes.

ParameterTypeDefaultDescription
commanddynamic—Console or protocol command to execute.

View source

gameplayTransitionBlocked

gameplayTransitionBlocked

Tracks the module-level gameplay transition blocked state owned by `miniquake.input`.

View source

gameplayTransitionCodeDown

function gameplayTransitionCodeDown(code)

Query only the current physical device level for a control captured at a menu/map boundary. eventKeyDownStates intentionally is not consulted here: it describes the pre-transition message stream and can remain set when the renderer or a synchronous map load clears/recreates the native input queue.

ParameterTypeDefaultDescription
codedynamic—The code input consumed by `gameplayTransitionCodeDown`.

View source

gameplayTransitionHeldCodes

gameplayTransitionHeldCodes

Tracks the module-level gameplay transition held codes state owned by `miniquake.input`.

View source

hasBindingCode

function hasBindingCode(code)

Report whether binding code.

ParameterTypeDefaultDescription
codedynamic—The code input consumed by `hasBindingCode`.

View source

impulseForCommand

function impulseForCommand(command)

Parse the exact canonical impulse binding accepted by the original polling path. Non-impulse and non-canonical command strings return zero.

ParameterTypeDefaultDescription
commanddynamic—Console or protocol command to execute.

View source

IN_Accumulate

function IN_Accumulate()

Mirror Quake's IN_Accumulate routine and its observable state changes.

View source

IN_ActivateMouse

function IN_ActivateMouse()

Mirror Quake's IN_ActivateMouse routine and its observable state changes.

View source

IN_AttackDown

function IN_AttackDown(key)

Mirror Quake's IN_AttackDown routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_AttackUp

function IN_AttackUp(key)

Mirror Quake's IN_AttackUp routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_BackDown

function IN_BackDown(key)

Mirror Quake's IN_BackDown routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_BackUp

function IN_BackUp(key)

Mirror Quake's IN_BackUp routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_BlockGameplayTransition

function IN_BlockGameplayTransition()

Block live gameplay controls while a menu selection or a map transition is still physically held. Clearing kbutton_t alone is insufficient because IN_PollButtonCommands would reconstruct +attack/+jump from the held Win32 key or mouse button on the first playable frame.

View source

IN_ClearDeviceStates

function IN_ClearDeviceStates()

in_win.c::IN_ClearStates only clears the active mouse device state. Keep this distinct from MiniQuake's full input reset, which is used at startup and by deterministic evidence runs to clear command buttons as well.

View source

IN_ClearStates

function IN_ClearStates()

Mirror Quake's IN_ClearStates routine and its observable state changes.

View source

IN_Commands

function IN_Commands()

Mirror Quake's IN_Commands routine and its observable state changes.

View source

IN_DeactivateMouse

function IN_DeactivateMouse()

Mirror Quake's IN_DeactivateMouse routine and its observable state changes.

View source

IN_DifferentialClearJoystickStartup

function IN_DifferentialClearJoystickStartup()

Mirror Quake's IN_DifferentialClearJoystickStartup routine and its observable state changes.

View source

IN_DifferentialSetJoystickStartup

function IN_DifferentialSetJoystickStartup(buttonCount, hasPov)

Mirror Quake's IN_DifferentialSetJoystickStartup routine and its observable state changes.

ParameterTypeDefaultDescription
buttonCountdynamic—Number of entries or units to process.
hasPovdynamic—The has pov input consumed by `IN_DifferentialSetJoystickStartup`.

View source

IN_DifferentialSetMouse

function IN_DifferentialSetMouse(initialized, active, activateToggle, showToggle, useDirectInput, oldButtonState, accumulatedX, accumulatedY, previousX, previousY, filterReady)

Mirror Quake's IN_DifferentialSetMouse routine and its observable state changes.

ParameterTypeDefaultDescription
initializeddynamic—The initialized input consumed by `IN_DifferentialSetMouse`.
activedynamic—The active input consumed by `IN_DifferentialSetMouse`.
activateToggledynamic—The activate toggle input consumed by `IN_DifferentialSetMouse`.
showToggledynamic—The show toggle input consumed by `IN_DifferentialSetMouse`.
useDirectInputdynamic—The use direct input input consumed by `IN_DifferentialSetMouse`.
oldButtonStatedynamic—Mutable state used by `IN_DifferentialSetMouse`.
accumulatedXdynamic—The accumulated x input consumed by `IN_DifferentialSetMouse`.
accumulatedYdynamic—The accumulated y input consumed by `IN_DifferentialSetMouse`.
previousXdynamic—The previous x input consumed by `IN_DifferentialSetMouse`.
previousYdynamic—The previous y input consumed by `IN_DifferentialSetMouse`.
filterReadydynamic—The filter ready input consumed by `IN_DifferentialSetMouse`.

View source

IN_DifferentialState

function IN_DifferentialState()

Mirror Quake's IN_DifferentialState routine and its observable state changes.

View source

IN_DiscardPolledKeyEdges

function IN_DiscardPolledKeyEdges()

Consume native keyboard press edges while UI-to-game handoff is blocked.

View source

IN_DownDown

function IN_DownDown(key)

Mirror Quake's IN_DownDown routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_DownUp

function IN_DownUp(key)

Mirror Quake's IN_DownUp routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_ForwardDown

function IN_ForwardDown(key)

Mirror Quake's IN_ForwardDown routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_ForwardUp

function IN_ForwardUp(key)

Mirror Quake's IN_ForwardUp routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_GameplayTransitionBlocked

function IN_GameplayTransitionBlocked()

Report whether a menu/map handoff is still suppressing live controls.

View source

IN_GameplayTransitionControlHeld

function IN_GameplayTransitionControlHeld()

Report whether a control captured at the transition boundary remains held.

View source

IN_HideMouse

function IN_HideMouse()

Mirror Quake's IN_HideMouse routine and its observable state changes.

View source

IN_Impulse

function IN_Impulse(value)

Mirror Quake's IN_Impulse routine and its observable state changes.

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `IN_Impulse`.

View source

IN_Init

function IN_Init()

Mirror Quake's IN_Init routine and its observable state changes.

View source

IN_InitDInput

function IN_InitDInput()

Mirror Quake's IN_InitDInput routine and its observable state changes.

View source

IN_JoyMove

function IN_JoyMove(command, frameSeconds)

Mirror Quake's IN_JoyMove routine and its observable state changes.

ParameterTypeDefaultDescription
commanddynamic—Console or protocol command to execute.
frameSecondsdynamic—The frame seconds input consumed by `IN_JoyMove`.

View source

IN_JumpDown

function IN_JumpDown(key)

Mirror Quake's IN_JumpDown routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_JumpUp

function IN_JumpUp(key)

Mirror Quake's IN_JumpUp routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_KLookDown

function IN_KLookDown(key)

Mirror Quake's IN_KLookDown routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_KLookUp

function IN_KLookUp(key)

Mirror Quake's IN_KLookUp routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_LeftDown

function IN_LeftDown(key)

Mirror Quake's IN_LeftDown routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_LeftUp

function IN_LeftUp(key)

Mirror Quake's IN_LeftUp routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_LookdownDown

function IN_LookdownDown(key)

Mirror Quake's IN_LookdownDown routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_LookdownUp

function IN_LookdownUp(key)

Mirror Quake's IN_LookdownUp routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_LookupDown

function IN_LookupDown(key)

Mirror Quake's IN_LookupDown routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_LookupUp

function IN_LookupUp(key)

Mirror Quake's IN_LookupUp routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_MLookDown

function IN_MLookDown(key)

Mirror Quake's IN_MLookDown routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_MLookUp

function IN_MLookUp(key)

Mirror Quake's IN_MLookUp routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_MouseEvent

function IN_MouseEvent(mouseState)

Mirror Quake's IN_MouseEvent routine and its observable state changes.

ParameterTypeDefaultDescription
mouseStatedynamic—Mutable state used by `IN_MouseEvent`.

View source

IN_MouseMove

function IN_MouseMove(command, mouseSensitivity, yawScale, pitchScale, filterEnabled, sideScale, forwardScale, lookStrafe, noclipAngleHack)

Mirror Quake's IN_MouseMove routine and its observable state changes.

ParameterTypeDefaultDescription
commanddynamic—Console or protocol command to execute.
mouseSensitivitydynamic—The mouse sensitivity input consumed by `IN_MouseMove`.
yawScaledynamic—The yaw scale input consumed by `IN_MouseMove`.
pitchScaledynamic—The pitch scale input consumed by `IN_MouseMove`.
filterEnableddynamic—The filter enabled input consumed by `IN_MouseMove`.
sideScaledynamic—The side scale input consumed by `IN_MouseMove`.
forwardScaledynamic—The forward scale input consumed by `IN_MouseMove`.
lookStrafedynamic—The look strafe input consumed by `IN_MouseMove`.
noclipAngleHackdynamic—The noclip angle hack input consumed by `IN_MouseMove`.

View source

IN_Move

function IN_Move(command, mouseSensitivity, yawScale, pitchScale, filterEnabled, sideScale, forwardScale, lookStrafe, noclipAngleHack, frameSeconds, active, minimized)

Mirror Quake's IN_Move routine and its observable state changes.

ParameterTypeDefaultDescription
commanddynamic—Console or protocol command to execute.
mouseSensitivitydynamic—The mouse sensitivity input consumed by `IN_Move`.
yawScaledynamic—The yaw scale input consumed by `IN_Move`.
pitchScaledynamic—The pitch scale input consumed by `IN_Move`.
filterEnableddynamic—The filter enabled input consumed by `IN_Move`.
sideScaledynamic—The side scale input consumed by `IN_Move`.
forwardScaledynamic—The forward scale input consumed by `IN_Move`.
lookStrafedynamic—The look strafe input consumed by `IN_Move`.
noclipAngleHackdynamic—The noclip angle hack input consumed by `IN_Move`.
frameSecondsdynamic—The frame seconds input consumed by `IN_Move`.
activedynamic—The active input consumed by `IN_Move`.
minimizeddynamic—The minimized input consumed by `IN_Move`.

View source

IN_MoveDelta

function IN_MoveDelta(command, deltaX, deltaY, mouseSensitivity, yawScale, pitchScale, sideScale, forwardScale, lookStrafe, noclipAngleHack)

Mirror Quake's IN_MoveDelta routine and its observable state changes.

ParameterTypeDefaultDescription
commanddynamic—Console or protocol command to execute.
deltaXdynamic—The delta x input consumed by `IN_MoveDelta`.
deltaYdynamic—The delta y input consumed by `IN_MoveDelta`.
mouseSensitivitydynamic—The mouse sensitivity input consumed by `IN_MoveDelta`.
yawScaledynamic—The yaw scale input consumed by `IN_MoveDelta`.
pitchScaledynamic—The pitch scale input consumed by `IN_MoveDelta`.
sideScaledynamic—The side scale input consumed by `IN_MoveDelta`.
forwardScaledynamic—The forward scale input consumed by `IN_MoveDelta`.
lookStrafedynamic—The look strafe input consumed by `IN_MoveDelta`.
noclipAngleHackdynamic—The noclip angle hack input consumed by `IN_MoveDelta`.

View source

IN_MoveleftDown

function IN_MoveleftDown(key)

Mirror Quake's IN_MoveleftDown routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_MoveleftUp

function IN_MoveleftUp(key)

Mirror Quake's IN_MoveleftUp routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_MoverightDown

function IN_MoverightDown(key)

Mirror Quake's IN_MoverightDown routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_MoverightUp

function IN_MoverightUp(key)

Mirror Quake's IN_MoverightUp routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_PollButtonCommands

function IN_PollButtonCommands()

Mirror Quake's IN_PollButtonCommands routine and its observable state changes.

View source

IN_ReadJoystick

function IN_ReadJoystick()

Mirror Quake's IN_ReadJoystick routine and its observable state changes.

View source

IN_ReleaseGameplayTransitionIfNeutral

function IN_ReleaseGameplayTransitionIfNeutral()

Release the transition latch only after every gameplay control has returned to neutral. The caller deliberately suppresses the release-detecting frame as well, so queued native press edges cannot leak into the new level.

View source

IN_RestoreOriginalMouseState

function IN_RestoreOriginalMouseState()

Mirror Quake's IN_RestoreOriginalMouseState routine and its observable state changes.

View source

IN_RightDown

function IN_RightDown(key)

Mirror Quake's IN_RightDown routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_RightUp

function IN_RightUp(key)

Mirror Quake's IN_RightUp routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_SetFreeLook

function IN_SetFreeLook(enabled)

Select modern persistent free-look without changing the original +mlook button state. Differential tests and compatibility callers retain stock Quake behavior until the production host explicitly enables this mode.

ParameterTypeDefaultDescription
enableddynamic—Whether the optional behavior is enabled.

View source

IN_SetQuakeMouseState

function IN_SetQuakeMouseState()

Mirror Quake's IN_SetQuakeMouseState routine and its observable state changes.

View source

IN_ShowMouse

function IN_ShowMouse()

Mirror Quake's IN_ShowMouse routine and its observable state changes.

View source

IN_Shutdown

function IN_Shutdown()

Mirror Quake's IN_Shutdown routine and its observable state changes.

View source

IN_SpeedDown

function IN_SpeedDown(key)

Mirror Quake's IN_SpeedDown routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_SpeedUp

function IN_SpeedUp(key)

Mirror Quake's IN_SpeedUp routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_StartupJoystick

function IN_StartupJoystick()

Mirror Quake's IN_StartupJoystick routine and its observable state changes.

View source

IN_StartupMouse

function IN_StartupMouse()

Mirror Quake's IN_StartupMouse routine and its observable state changes.

View source

IN_StrafeDown

function IN_StrafeDown(key)

Mirror Quake's IN_StrafeDown routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_StrafeUp

function IN_StrafeUp(key)

Mirror Quake's IN_StrafeUp routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_UpdateClipCursor

function IN_UpdateClipCursor()

Mirror Quake's IN_UpdateClipCursor routine and its observable state changes.

View source

IN_UpDown

function IN_UpDown(key)

Mirror Quake's IN_UpDown routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_UpUp

function IN_UpUp(key)

Mirror Quake's IN_UpUp routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_UseDown

function IN_UseDown(key)

Mirror Quake's IN_UseDown routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

IN_UseUp

function IN_UseUp(key)

Mirror Quake's IN_UseUp routine and its observable state changes.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

inAttack

inAttack

Tracks the module-level in attack state owned by `miniquake.input`.

View source

inBack

inBack

Tracks the module-level in back state owned by `miniquake.input`.

View source

inDown

inDown

Tracks the module-level in down state owned by `miniquake.input`.

View source

inForward

inForward

Tracks the module-level in forward state owned by `miniquake.input`.

View source

inImpulse

inImpulse

Tracks the module-level in impulse state owned by `miniquake.input`.

View source

inJump

inJump

Tracks the module-level in jump state owned by `miniquake.input`.

View source

inKLook

inKLook

Tracks the module-level in k look state owned by `miniquake.input`.

View source

inLeft

inLeft

Tracks the module-level in left state owned by `miniquake.input`.

View source

inLookdown

inLookdown

Tracks the module-level in lookdown state owned by `miniquake.input`.

View source

inLookup

inLookup

Tracks the module-level in lookup state owned by `miniquake.input`.

View source

inMLook

inMLook

cl_input.c's kbutton_t is deliberately represented as a three-element mutable value: two independently held key numbers followed by the original state bitfield (down=1, impulse-down=2, impulse-up=4).

View source

inMoveleft

inMoveleft

Tracks the module-level in moveleft state owned by `miniquake.input`.

View source

inMoveright

inMoveright

Tracks the module-level in moveright state owned by `miniquake.input`.

View source

inputRegistry

inputRegistry

Tracks the module-level input registry state owned by `miniquake.input`.

View source

inRight

inRight

Tracks the module-level in right state owned by `miniquake.input`.

View source

inSpeed

inSpeed

Tracks the module-level in speed state owned by `miniquake.input`.

View source

inStrafe

inStrafe

Tracks the module-level in strafe state owned by `miniquake.input`.

View source

inUp

inUp

Tracks the module-level in up state owned by `miniquake.input`.

View source

inUse

inUse

Tracks the module-level in use state owned by `miniquake.input`.

View source

JOY_ABSOLUTE_AXIS

const JOY_ABSOLUTE_AXIS = 0

Defines the joy absolute axis value used by `miniquake.input`.

View source

Joy_AdvancedUpdate_f

function Joy_AdvancedUpdate_f()

Mirror Quake's Joy_AdvancedUpdate_f routine and its observable state changes.

View source

JOY_MAX_AXES

const JOY_MAX_AXES = 6

Defines the joy max axes value used by `miniquake.input`.

View source

JOY_RELATIVE_AXIS

const JOY_RELATIVE_AXIS = 16

Defines the joy relative axis value used by `miniquake.input`.

View source

joyAdvancedInitialized

joyAdvancedInitialized

Tracks the module-level joy advanced initialized state owned by `miniquake.input`.

View source

joyAvailable

joyAvailable

Tracks the module-level joy available state owned by `miniquake.input`.

View source

joyAxes

joyAxes

Tracks the module-level joy axes state owned by `miniquake.input`.

View source

joyAxisMap

joyAxisMap

Tracks the module-level joy axis map state owned by `miniquake.input`.

View source

joyButtonCount

joyButtonCount

Tracks the module-level joy button count state owned by `miniquake.input`.

View source

joyControlMap

joyControlMap

Tracks the module-level joy control map state owned by `miniquake.input`.

View source

joyHasPov

joyHasPov

Tracks the module-level joy has pov state owned by `miniquake.input`.

View source

joyOldButtonState

joyOldButtonState

Tracks the previous module-level joystick-button state owned by `miniquake.input`.

View source

joyOldPovState

joyOldPovState

Tracks the previous module-level joystick POV state owned by `miniquake.input`.

View source

joyPov

joyPov

Tracks the module-level joy pov state owned by `miniquake.input`.

View source

joySnapshotButtons

joySnapshotButtons

Tracks the module-level joy snapshot buttons state owned by `miniquake.input`.

View source

joystickStartupOverride

joystickStartupOverride

Tracks the module-level joystick startup override state owned by `miniquake.input`.

View source

joystickTestSnapshot

joystickTestSnapshot

Tracks the module-level joystick test snapshot state owned by `miniquake.input`.

View source

keyCodeForName

function keyCodeForName(name)

Return key code for name derived from the active module state.

ParameterTypeDefaultDescription
namedynamic—Stable name that identifies the requested object or option.

View source

KeyDown

function KeyDown(button, key)

KeyDown/KeyUp retain the original two-key ownership rule. A key number of -1 is the console's manual, continuously-held form; void on KeyUp is the original "unstick this action" command with no key-number argument.

ParameterTypeDefaultDescription
buttondynamic—The button input consumed by `KeyDown`.
keydynamic—Key used to identify the requested entry.

View source

keyIsDown

function keyIsDown(code)

Implements the `keyIsDown` operation for `miniquake.input` (key is down).

ParameterTypeDefaultDescription
codedynamic—The code input consumed by `keyIsDown`.

View source

keyIsDownWithMouseSnapshot

function keyIsDownWithMouseSnapshot(code, mouseButtons)

Test a physical key while reusing the mouse snapshot captured for this poll. Keyboard and joystick semantics deliberately remain identical to keyIsDown.

ParameterTypeDefaultDescription
codedynamic—The code input consumed by `keyIsDownWithMouseSnapshot`.
mouseButtonsdynamic—The mouse buttons input consumed by `keyIsDownWithMouseSnapshot`.

View source

keyNameForCode

function keyNameForCode(code)

Implements the `keyNameForCode` operation for `miniquake.input` (key name for code).

ParameterTypeDefaultDescription
codedynamic—The code input consumed by `keyNameForCode`.

View source

keyPressedForCode

function keyPressedForCode(code)

Implements the `keyPressedForCode` operation for `miniquake.input` (key pressed for code).

ParameterTypeDefaultDescription
codedynamic—The code input consumed by `keyPressedForCode`.

View source

KeyUp

function KeyUp(button, key)

Implements the `KeyUp` operation for `miniquake.input` (key up).

ParameterTypeDefaultDescription
buttondynamic—The button input consumed by `KeyUp`.
keydynamic—Key used to identify the requested entry.

View source

lookSpringEnabled

lookSpringEnabled

Tracks the module-level look spring enabled state owned by `miniquake.input`.

View source

lower

function lower(text)

Convert data for lower.

ParameterTypeDefaultDescription
textdynamic—Text to parse or process.

View source

mouseAccumX

mouseAccumX

Tracks the module-level mouse accum x state owned by `miniquake.input`.

View source

mouseAccumY

mouseAccumY

Tracks the module-level mouse accum y state owned by `miniquake.input`.

View source

mouseActivateToggle

mouseActivateToggle

Tracks the module-level mouse activate toggle state owned by `miniquake.input`.

View source

mouseActive

mouseActive

Tracks the module-level mouse active state owned by `miniquake.input`.

View source

mouseCaptured

mouseCaptured

Tracks the module-level mouse captured state owned by `miniquake.input`.

View source

mouseDeltaScratch

mouseDeltaScratch

Tracks the module-level mouse delta scratch state owned by `miniquake.input`.

View source

mouseFilterReady

mouseFilterReady

Tracks the module-level mouse filter ready state owned by `miniquake.input`.

View source

mouseInitialized

mouseInitialized

Tracks the module-level mouse initialized state owned by `miniquake.input`.

View source

mouseOldButtonState

mouseOldButtonState

Tracks the previous module-level mouse-button state owned by `miniquake.input`.

View source

mouseShowToggle

mouseShowToggle

Tracks the module-level mouse show toggle state owned by `miniquake.input`.

View source

noJoystickRequested

noJoystickRequested

Tracks the module-level no joystick requested state owned by `miniquake.input`.

View source

noMouseRequested

noMouseRequested

Tracks the module-level no mouse requested state owned by `miniquake.input`.

View source

oldMouseX

oldMouseX

Tracks the module-level old mouse x state owned by `miniquake.input`.

View source

oldMouseY

oldMouseY

Tracks the module-level old mouse y state owned by `miniquake.input`.

View source

pitchDriftStartRequested

pitchDriftStartRequested

Tracks the module-level pitch drift start requested state owned by `miniquake.input`.

View source

pitchDriftStopRequested

pitchDriftStopRequested

Tracks the module-level pitch drift stop requested state owned by `miniquake.input`.

View source

polledBindingHoldsKey

function polledBindingHoldsKey(command, key, mouseButtons)

Check a held owner against the pre-normalized polling cache and current physical snapshot without allocating or rescanning unrelated bind commands.

ParameterTypeDefaultDescription
commanddynamic—Console or protocol command to execute.
keydynamic—Key used to identify the requested entry.
mouseButtonsdynamic—The mouse buttons input consumed by `polledBindingHoldsKey`.

View source

polledBindings

polledBindings

Tracks the module-level polled bindings state owned by `miniquake.input`.

View source

polledKeyDownAt

function polledKeyDownAt(code, mouseButtons)

Resolve a binding level from the frame-local bulk keyboard/mouse snapshot.

ParameterTypeDefaultDescription
codedynamic—The code input consumed by `polledKeyDownAt`.
mouseButtonsdynamic—The mouse buttons input consumed by `polledKeyDownAt`.

View source

polledKeyDownSnapshot

polledKeyDownSnapshot

Tracks the module-level polled key down snapshot state owned by `miniquake.input`.

View source

polledKeyPressedAt

function polledKeyPressedAt(code)

Resolve a binding press edge from the frame-local bulk keyboard snapshot.

ParameterTypeDefaultDescription
codedynamic—The code input consumed by `polledKeyPressedAt`.

View source

polledKeyPressedSnapshot

polledKeyPressedSnapshot

Tracks the module-level polled key pressed snapshot state owned by `miniquake.input`.

View source

polledKeyQueryMask

polledKeyQueryMask

Tracks the module-level polled key query mask state owned by `miniquake.input`.

View source

quakeKeyForScanCode

function quakeKeyForScanCode(scanCode)

gl_vidnt.c does not translate keyboard messages through virtual-key values. It uses bits 16..23 of lParam, i.e. the hardware scan code. Keeping that mapping here preserves keypad/navigation distinctions and makes keyboard input independent of the active Windows keyboard layout.

ParameterTypeDefaultDescription
scanCodedynamic—The scan code input consumed by `quakeKeyForScanCode`.

View source

quakeKeyForVirtualKey

function quakeKeyForVirtualKey(virtualKey)

Implements the `quakeKeyForVirtualKey` operation for `miniquake.input` (quake key for virtual key).

ParameterTypeDefaultDescription
virtualKeydynamic—The virtual key input consumed by `quakeKeyForVirtualKey`.

View source

quoteBinding

function quoteBinding(text)

Convert data for quote binding.

ParameterTypeDefaultDescription
textdynamic—Text to parse or process.

View source

RawValuePointer

function RawValuePointer(axis)

Implements the `RawValuePointer` operation for `miniquake.input` (raw value pointer).

ParameterTypeDefaultDescription
axisdynamic—The axis input consumed by `RawValuePointer`.

View source

rebuildPolledBindings

function rebuildPolledBindings()

Rebuild the small, immutable-at-runtime subset needed by the live input poll. Bind commands that are handled solely by Key_Event are intentionally absent.

View source

requestStartPitchDrift

function requestStartPitchDrift()

Implements the `requestStartPitchDrift` operation for `miniquake.input` (request start pitch drift).

View source

requestStopPitchDrift

function requestStopPitchDrift()

Implements the `requestStopPitchDrift` operation for `miniquake.input` (request stop pitch drift).

View source

resetBindings

function resetBindings()

Update module state for bindings.

View source

resetButton

function resetButton(button)

Update module state for button.

ParameterTypeDefaultDescription
buttondynamic—The button input consumed by `resetButton`.

View source

resetMouse

function resetMouse()

Clear both the MiniLang filter history and any native cursor displacement accumulated while the menu, console, or another application owned the mouse. WinQuake performs the equivalent reset whenever capture is reacquired.

View source

sampleFilteredMouseDelta

function sampleFilteredMouseDelta(filterEnabled, output)

Sample filtered mouse motion into caller-owned two-element storage.

ParameterTypeDefaultDescription
filterEnableddynamic—The filter enabled input consumed by `sampleFilteredMouseDelta`.
outputdynamic—Destination that receives the filtered mouse delta.

View source

setBindingCode

function setBindingCode(code, command)

Update module state for binding code.

ParameterTypeDefaultDescription
codedynamic—The code input consumed by `setBindingCode`.
commanddynamic—Console or protocol command to execute.

View source

setEventKeyState

function setEventKeyState(code, down)

Record the ordered Quake key level delivered by the Win32 event queue. Keeping this separate from kbutton ownership lets live polling repair a consumed command without trusting a transient asynchronous key sample.

ParameterTypeDefaultDescription
codedynamic—The code input consumed by `setEventKeyState`.
downdynamic—The down input consumed by `setEventKeyState`.

View source

setJoystickSnapshot

function setJoystickSnapshot(axes, buttons, pov, buttonCount, hasPov)

Sets joystick snapshot for `miniquake.input`.

ParameterTypeDefaultDescription
axesdynamic—The axes input consumed by `setJoystickSnapshot`.
buttonsdynamic—The buttons input consumed by `setJoystickSnapshot`.
povdynamic—The pov input consumed by `setJoystickSnapshot`.
buttonCountdynamic—Number of entries or units to process.
hasPovdynamic—The has pov input consumed by `setJoystickSnapshot`.

View source

setLookSpring

function setLookSpring(enabled)

Update module state for look spring.

ParameterTypeDefaultDescription
enableddynamic—Whether the optional behavior is enabled.

View source

setMouseCapture

function setMouseCapture(enabled)

Keep the capture transition in one place. Calling this every host frame is intentional: it only touches Win32 when the desired state changes, while a focus loss/reacquire reliably resets both native and filtered deltas.

ParameterTypeDefaultDescription
enableddynamic—Whether the optional behavior is enabled.

View source

synchronizeButton

function synchronizeButton(command)

Translate the native polling API into the same edge events Key_Event feeds into cl_input.c. This preserves ownership when two bound keys hold one action, and also preserves a press/release completed between two frames.

ParameterTypeDefaultDescription
commanddynamic—Console or protocol command to execute.

View source

unbindAll

function unbindAll()

Implements the `unbindAll` operation for `miniquake.input` (unbind all).

View source

unbindCommand

function unbindCommand(command)

Implements the `unbindCommand` operation for `miniquake.input` (unbind command).

ParameterTypeDefaultDescription
commanddynamic—Console or protocol command to execute.

View source

unbindKey

function unbindKey(keyName)

Implements the `unbindKey` operation for `miniquake.input` (unbind key).

ParameterTypeDefaultDescription
keyNamedynamic—Name that identifies the requested value or resource.

View source

updateJoystickSnapshot

function updateJoystickSnapshot(axes, buttons, pov)

Updates joystick snapshot for `miniquake.input`.

ParameterTypeDefaultDescription
axesdynamic—The axes input consumed by `updateJoystickSnapshot`.
buttonsdynamic—The buttons input consumed by `updateJoystickSnapshot`.
povdynamic—The pov input consumed by `updateJoystickSnapshot`.

View source

virtualKeyForCode

function virtualKeyForCode(code)

Implements the `virtualKeyForCode` operation for `miniquake.input` (virtual key for code).

ParameterTypeDefaultDescription
codedynamic—The code input consumed by `virtualKeyForCode`.

View source