MiniQuake

src/miniquake/keys.ml

Package
miniquake.keys
Reachable
Yes

Imports

Declarations

beginMessage

function beginMessage(team)

Initialize state for begin message.

ParameterTypeDefaultDescription
teamdynamic—The team input consumed by `beginMessage`.

View source

chatBuffer

chatBuffer

Tracks the module-level chat buffer state owned by `miniquake.keys`.

View source

consoleKeys

consoleKeys

Tracks the module-level console keys state owned by `miniquake.keys`.

View source

destination

inline function destination()

Implements the `destination` operation for `miniquake.keys` (destination).

View source

editLine

editLine

Tracks the module-level edit line state owned by `miniquake.keys`.

View source

hardwareKeyCodes

function hardwareKeyCodes()

Implements the `hardwareKeyCodes` operation for `miniquake.keys` (hardware key codes).

View source

historyLine

historyLine

Tracks the module-level history line state owned by `miniquake.keys`.

View source

identityValues

function identityValues(count)

Return identity values derived from the active module state.

ParameterTypeDefaultDescription
countdynamic—Number of entries or units to process.

View source

initializeShiftTable

function initializeShiftTable()

Initialize state for initialize shift table.

View source

K_ALT

const K_ALT = 132

Defines the k alt value used by `miniquake.keys`.

View source

K_AUX1

const K_AUX1 = 207

Defines the k aux1 value used by `miniquake.keys`.

View source

K_BACKSPACE

const K_BACKSPACE = 127

Defines the k backspace value used by `miniquake.keys`.

View source

K_CTRL

const K_CTRL = 133

Defines the k ctrl value used by `miniquake.keys`.

View source

K_DEL

const K_DEL = 148

Defines the k del value used by `miniquake.keys`.

View source

K_DOWNARROW

const K_DOWNARROW = 129

Defines the k downarrow value used by `miniquake.keys`.

View source

K_END

const K_END = 152

Defines the k end value used by `miniquake.keys`.

View source

K_ENTER

const K_ENTER = 13

Defines the k enter value used by `miniquake.keys`.

View source

K_ESCAPE

const K_ESCAPE = 27

Defines the k escape value used by `miniquake.keys`.

View source

K_F1

const K_F1 = 135

Defines the k f1 value used by `miniquake.keys`.

View source

K_F12

const K_F12 = 146

Defines the k f12 value used by `miniquake.keys`.

View source

K_HOME

const K_HOME = 151

Defines the k home value used by `miniquake.keys`.

View source

K_INS

const K_INS = 147

Defines the k ins value used by `miniquake.keys`.

View source

K_JOY1

const K_JOY1 = 203

Defines the k joy1 value used by `miniquake.keys`.

View source

K_LEFTARROW

const K_LEFTARROW = 130

Defines the k leftarrow value used by `miniquake.keys`.

View source

K_MOUSE1

const K_MOUSE1 = 200

Defines the k mouse1 value used by `miniquake.keys`.

View source

K_MOUSE2

const K_MOUSE2 = 201

Defines the k mouse2 value used by `miniquake.keys`.

View source

K_MOUSE3

const K_MOUSE3 = 202

Defines the k mouse3 value used by `miniquake.keys`.

View source

K_MWHEELDOWN

const K_MWHEELDOWN = 240

Defines the k mwheeldown value used by `miniquake.keys`.

View source

K_MWHEELUP

const K_MWHEELUP = 239

Defines the k mwheelup value used by `miniquake.keys`.

View source

K_PAUSE

const K_PAUSE = 255

Defines the k pause value used by `miniquake.keys`.

View source

K_PGDN

const K_PGDN = 149

Defines the k pgdn value used by `miniquake.keys`.

View source

K_PGUP

const K_PGUP = 150

Defines the k pgup value used by `miniquake.keys`.

View source

K_RIGHTARROW

const K_RIGHTARROW = 131

Defines the k rightarrow value used by `miniquake.keys`.

View source

K_SHIFT

const K_SHIFT = 134

Defines the k shift value used by `miniquake.keys`.

View source

K_SPACE

const K_SPACE = 32

Defines the k space value used by `miniquake.keys`.

View source

K_TAB

const K_TAB = 9

Defines the k tab value used by `miniquake.keys`.

View source

K_UPARROW

const K_UPARROW = 128

Defines the k uparrow value used by `miniquake.keys`.

View source

Key_Bind_f

function Key_Bind_f(arguments)

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

ParameterTypeDefaultDescription
argumentsdynamic—Command-line arguments to inspect or execute.

View source

Key_Bindlist_f

function Key_Bindlist_f()

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

View source

Key_ClearStates

function Key_ClearStates()

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

View source

KEY_CONSOLE

const KEY_CONSOLE = 1

Defines the key console value used by `miniquake.keys`.

View source

Key_Console

function Key_Console(key, state, commandSystem, registry, visibleRows)

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

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.
statedynamic—Mutable `miniquake.keys` state used by `Key_Console`.
commandSystemdynamic—The command system input consumed by `Key_Console`.
registrydynamic—The registry input consumed by `Key_Console`.
visibleRowsdynamic—The visible rows input consumed by `Key_Console`.

View source

Key_Event

function Key_Event(key, down, consoleState, commandSystem, registry, forcedConsole, demoPlayback)

Returns [commands-to-buffer, host-action, routed-key]. Host actions are intentionally small: menu policy stays in menu/host while key routing and binding semantics remain wholly owned here.

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.
downdynamic—The down input consumed by `Key_Event`.
consoleStatedynamic—Mutable state used by `Key_Event`.
commandSystemdynamic—The command system input consumed by `Key_Event`.
registrydynamic—The registry input consumed by `Key_Event`.
forcedConsoledynamic—The forced console input consumed by `Key_Event`.
demoPlaybackdynamic—The demo playback input consumed by `Key_Event`.

View source

KEY_GAME

const KEY_GAME = 0

Defines the key game value used by `miniquake.keys`.

View source

Key_Init

function Key_Init()

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

View source

Key_KeynumToString

function Key_KeynumToString(keynum)

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

ParameterTypeDefaultDescription
keynumdynamic—The keynum input consumed by `Key_KeynumToString`.

View source

KEY_MENU

const KEY_MENU = 3

Defines the key menu value used by `miniquake.keys`.

View source

KEY_MESSAGE

const KEY_MESSAGE = 2

Defines the key message value used by `miniquake.keys`.

View source

Key_Message

function Key_Message(key)

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

ParameterTypeDefaultDescription
keydynamic—Key used to identify the requested entry.

View source

Key_QueueReleaseAllCommands

function Key_QueueReleaseAllCommands()

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

View source

Key_ReleaseAllCommands

function Key_ReleaseAllCommands()

gl_vidnt.c::ClearAllStates sends an up event for every Quake key before clearing the physical key table. The releases are deliberately generated for every + binding, not only keys that still appear down: this is how the original clears server-side button state after Alt-Tab and mode changes.

View source

Key_SetBinding

function Key_SetBinding(keynum, binding)

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

ParameterTypeDefaultDescription
keynumdynamic—The keynum input consumed by `Key_SetBinding`.
bindingdynamic—The binding input consumed by `Key_SetBinding`.

View source

Key_StringToKeynum

function Key_StringToKeynum(text)

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

ParameterTypeDefaultDescription
textdynamic—Text to parse or process.

View source

Key_TakePendingCommands

function Key_TakePendingCommands()

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

View source

Key_Unbind_f

function Key_Unbind_f(arguments)

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

ParameterTypeDefaultDescription
argumentsdynamic—Command-line arguments to inspect or execute.

View source

Key_Unbindall_f

function Key_Unbindall_f()

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

View source

Key_WriteBindings

function Key_WriteBindings()

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

View source

keyCount

keyCount

Tracks the module-level key count state owned by `miniquake.keys`.

View source

keyDest

keyDest

Tracks the module-level key dest state owned by `miniquake.keys`.

View source

keyDownStates

keyDownStates

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

View source

keyLastPress

keyLastPress

Tracks the module-level key last press state owned by `miniquake.keys`.

View source

keyLinePos

keyLinePos

Tracks the module-level key line pos state owned by `miniquake.keys`.

View source

keyLines

keyLines

Tracks the module-level key lines state owned by `miniquake.keys`.

View source

keyRepeats

keyRepeats

Tracks the module-level key repeats state owned by `miniquake.keys`.

View source

keyShift

keyShift

Tracks the module-level key shift state owned by `miniquake.keys`.

View source

MAXCMDLINE

const MAXCMDLINE = 256

Defines the maxcmdline value used by `miniquake.keys`.

View source

menuBound

menuBound

Tracks the module-level menu bound state owned by `miniquake.keys`.

View source

pendingReleaseCommands

pendingReleaseCommands

Tracks the module-level pending release commands state owned by `miniquake.keys`.

View source

plusRelease

function plusRelease(binding, key)

Implements the `plusRelease` operation for `miniquake.keys` (plus release).

ParameterTypeDefaultDescription
bindingdynamic—The binding input consumed by `plusRelease`.
keydynamic—Key used to identify the requested entry.

View source

PollEvents

function PollEvents()

Consumes the ordered Win32 message queue. Packed native event types are: keyboard=1 (legacy raw VK), mouse button=2, wheel=3, focus=4, and keyboard=5 (MiniQuake hardware scan code).

View source

registeredCommandNames

registeredCommandNames

Tracks the module-level registered command names state owned by `miniquake.keys`.

View source

setDestination

function setDestination(destination)

Update module state for destination.

ParameterTypeDefaultDescription
destinationdynamic—Destination value or collection to update.

View source

shiftDown

shiftDown

Tracks the module-level shift down state owned by `miniquake.keys`.

View source

teamMessage

teamMessage

Tracks the module-level team message state owned by `miniquake.keys`.

View source

zeroValues

function zeroValues(count)

Create the zero-initialized state for values.

ParameterTypeDefaultDescription
countdynamic—Number of entries or units to process.

View source