Skip to content

sdk.keys ​

Win32 virtual-key names and Ctrl/Alt/Shift combos for game.input_snapshot and game.on("key_down"). Not TGameAction (that is sdk.input) and not overlay UI keys.

lua
local M = require("sdk.keys")

Constants ​

Lua 5.4 has no enums — these are integer (or string) fields on the module.

NameValueSummary
CTRL1Ctrl bit in the modifier mask (0x1).
ALT2Alt bit in the modifier mask (0x2).
SHIFT4Shift bit in the modifier mask (0x4).
codesbuild_codes()Name to Win32 virtual-key table (f1, space, numpad0, plus).

code ​

function · code(name)

Resolve a key name to a Win32 virtual-key code.

Parameters

NameTypeSummary
namestring—

Returns

TypeSummary
integer|nilvk
string|nilerr

parse ​

function · parse(combination)

Parse a human-readable combo into a Win32 key plus Ctrl/Alt/Shift mask.

Parameters

NameTypeSummary
combinationstring—

Returns

TypeSummary
table|nilcombo
string|nilerr

matches ​

function · matches(vk, mods, combo)

True when vk equals the combo key and mods contain the combo modifiers.

Parameters

NameTypeSummary
vkinteger—
modsinteger—
combotable|string—

Returns

TypeSummary
boolean—

isPressed ​

function · isPressed(combo_or_key, modifiers)

Poll whether a combo or virtual key is held, with optional required modifiers.

Parameters

NameTypeSummary
combo_or_keytable|string|integer—
modifiers?integer—

Returns

TypeSummary
boolean|nilheld
string|nilerr

Arcane SDK catalog generated from scripts/sdk