MiniQuake2

src/miniquake2/client/ui/keys.ml

Provides miniquake2 client ui keys facilities for this project.

Package
miniquake2.client.ui.keys
Reachable
Yes

Imports

Declarations

actionNames

function actionNames()

Return the action names value.

View source

beginBindingCapture

function beginBindingCapture(state, command)

Begin binding capture.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
commanddynamic—command value consumed by this operation.

View source

bind

function bind(state, key, command)

Bind state.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
keydynamic—key value consumed by this operation.
commanddynamic—command value consumed by this operation.

View source

bindDefaultGame

function bindDefaultGame(state)

Product defaults retain the classic Quake II weapon keys and add the mouse wheel convention expected by modern players. Keeping these in the input package makes the real product bindings independently regression-testable.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.

View source

bindingFor

function bindingFor(state, key)

Return the binding for the requested input.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
keydynamic—key value consumed by this operation.

View source

cancelBindingCapture

function cancelBindingCapture(state)

Cancel binding capture.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.

View source

captureBindingEvent

function captureBindingEvent(state, key)

Capture binding event.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
keydynamic—key value consumed by this operation.

View source

commandAction

function commandAction(command)

Return the command action value.

ParameterTypeDefaultDescription
commanddynamic—command value consumed by this operation.

View source

createInputState

function createInputState()

Create input state.

View source

defaultConfig

function defaultConfig()

Return the default config value.

View source

drainCommands

inline function drainCommands(state)

Performs the drainCommands operation for the miniquake2 client ui keys module.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.

View source

eventKey

function eventKey(event)

Return the event key value.

ParameterTypeDefaultDescription
eventdynamic—event value consumed by this operation.

View source

findAction

function findAction(state, name)

Find action.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
namedynamic—Name of the affected item.

View source

findBinding

function findBinding(state, key)

Find binding.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
keydynamic—key value consumed by this operation.

View source

handleEvent

function handleEvent(state, event, time)

Handle event.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
eventdynamic—event value consumed by this operation.
timedynamic—time value consumed by this operation.

View source

keyName

function keyName(key)

Return the compact key label used by the controls and inventory overlays.

ParameterTypeDefaultDescription
keydynamic—key value consumed by this operation.

View source

queueBinding

function queueBinding(state, key, down, time)

Queue binding.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
keydynamic—key value consumed by this operation.
downdynamic—down value consumed by this operation.
timedynamic—time value consumed by this operation.

View source

queueDiscreteCommand

inline function queueDiscreteCommand(state, command)

Queue discrete command.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
commanddynamic—command value consumed by this operation.

View source

scanKey

function scanKey(scan)

Scan key.

ParameterTypeDefaultDescription
scandynamic—scan value consumed by this operation.

View source

setAction

function setAction(state, name, down)

Set action.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
namedynamic—Name of the affected item.
downdynamic—down value consumed by this operation.

View source

setActionAtTime

function setActionAtTime(state, name, down, time)

Set action at an input timestamp for Quake II's time-weighted KeyState.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
namedynamic—Name of the affected item.
downdynamic—down value consumed by this operation.
timedynamic—time value consumed by this operation.

View source

setDestination

function setDestination(state, destination)

Set destination.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
destinationdynamic—destination value consumed by this operation.

View source

unbind

function unbind(state, key)

Unbind state.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
keydynamic—key value consumed by this operation.

View source

unbindCommand

function unbindCommand(state, command)

Unbind command.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
commanddynamic—command value consumed by this operation.

View source