19 natives. Read-only natives only look things up; the rest change something. Parameter types use the language's names (Types ).
$ keymap . commit_remap (user: User , keymap: Reference ) -> bool
Write remapped controls data to persistence for a given user and keymap.
Parameter Type Meaning userUserThe user handle. keymapReferenceThe keymap.
Returns bool: Whether successful.
$ keymap . get_aliases (keymap: Reference ) -> list
Get a list of all alias names (control names) of a given keymap.
Parameter Type Meaning keymapReferenceThe keymap.
Returns list: The list of alias names.
$ keymap . get_axis (user: User , keymap: Reference , alias: string , remap: bool , allow_fallback_input: bool , ignore_input_mode: bool ) -> float
Get the value of an aliased axis.
Parameter Type Meaning userUserThe user handle. keymapReferenceThe keymap used to determine aliased axis. aliasstringThe name of the aliased axis in the given keymap. remapboolWhether to consider keymap remapping data of the given user. allow_fallback_inputboolWhether to allow input when there is no user or no valid connection index. ignore_input_modeboolWhether to ignore the input mode when checking if the keymap is active.
Returns float: Value between -1.0 and 1.0.
$ keymap . get_bindings (user: User , keymap: Reference , alias: string , remap: bool ) -> list
Get a list of all keys bound to a given keymap alias (control).
Parameter Type Meaning userUserThe user handle. keymapReferenceThe keymap. aliasstringThe name of the aliased input to search for in the given keymap. remapboolWhether to consider keymap remapping data of the given user.
Returns list: The list of keys (vwm_key_t).
$ keymap . get_input_index_from_any_axis_input (axis_dead_zone: float ) -> int
Check if any key has been pressed and return the index of the input method if so.
Parameter Type Meaning axis_dead_zonefloatThe dead zone value to use for the axes.
Returns int: The gamepad index of the first axis input; -1 if no valid axis input was found.
$ keymap . get_input_index_from_any_keypress (include_special_characters: bool ) -> int
Check if any key has been pressed and return the index of the input method if so.
Parameter Type Meaning include_special_charactersboolTrue if we should include special characters as valid input.
Returns int: The gamepad index of the key pressed; 0 if keyboard key was pressed; -1 if no valid press was found.
$ keymap . get_input_index_from_any_valid_joycon_style () -> int
Check if any input has a valid joycon sytle and return the index of the input method if so.
Returns int: The gamepad index of the first valid joycon style; -1 if no valid joycon input was found.
$ keymap . has_alias (keymap: Reference , alias: string ) -> bool
Test if a given keymap has the specified alias defined.
Parameter Type Meaning keymapReferenceThe keymap to search within. aliasstringThe name of the aliased input to search for in the given keymap.
Returns bool: True if the aliased key was found in the given keymap; otherwise false.
$ keymap . is_active (user: User , keymap: Reference , allow_fallback_input: bool ) -> bool
Check if a keymap is active based on the current input mode
Parameter Type Meaning userUserThe user handle. keymapReferenceThe keymap to check. allow_fallback_inputboolIf the connection is invalid, assume the keymap is active.
Returns bool: True if the keymap is active based on the current input mode.
$ keymap . is_any_axis_non_zero (user: User , keymap: Reference , allow_fallback_input: bool , ignore_input_mode: bool ) -> list
Determine if any axis within the specified keymap is non-zero.
Parameter Type Meaning userUserThe user handle keymapReferenceThe keymap to perform the check on. allow_fallback_inputboolWhether to allow input when there is no user or no valid connection index. ignore_input_modeboolWhether to ignore the input mode when checking if the keymap is active.
Returns list: List where [0] indicates if an axis was non-zero, [1] the alias of the _first_ non-zero axis detected, and [2] the value of that axis; or if no axis was non-zero [false, NULL, 0.0f]
$ keymap . is_any_key_pressed (user: User , keymap: Reference , allow_fallback_input: bool , ignore_input_mode: bool ) -> list
Determine if any key within the specified keymap is pressed.
Parameter Type Meaning userUserThe user handle keymapReferenceThe keymap to perform the check on. allow_fallback_inputboolWhether to allow input when there is no user or no valid connection index. ignore_input_modeboolWhether to ignore the input mode when checking if the keymap is active.
Returns list: List where [0] indicates if a key was pressed and [1] the alias of the _first_ pressed key detected; otherwise [false, NULL]
$ keymap . is_any_key_released (user: User , keymap: Reference , allow_fallback_input: bool , ignore_input_mode: bool ) -> list
Determine if any key within the specified keymap is released.
Parameter Type Meaning userUserThe user handle keymapReferenceThe keymap to perform the check on. allow_fallback_inputboolWhether to allow input when there is no user or no valid connection index. ignore_input_modeboolWhether to ignore the input mode when checking if the keymap is active.
Returns list: List where [0] indicates if a key was released and [1] the alias of the _first_ released key detected; otherwise [false, NULL]
$ keymap . is_down (user: User , keymap: Reference , alias: string , remap: bool , allow_fallback_input: bool , ignore_input_mode: bool ) -> bool
Test if aliased input is held down.
Parameter Type Meaning userUserThe user handle. keymapReferenceThe keymap used to determine aliased keys. aliasstringThe name of the aliased input in the given keymap. remapboolWhether to consider keymap remapping data of the given user. allow_fallback_inputboolWhether to allow input when there is no user or no valid connection index. ignore_input_modeboolWhether to ignore the input mode when checking if the keymap is active.
Returns bool: True if the aliased key is down.
$ keymap . is_pressed (user: User , keymap: Reference , alias: string , remap: bool , allow_fallback_input: bool , ignore_input_mode: bool ) -> bool
Test if an aliased key changed from up to down this frame.
Parameter Type Meaning userUserThe user handle. keymapReferenceThe keymap used to determine aliased keys. aliasstringThe name of the aliased input in the given keymap. remapboolWhether to consider keymap remapping data of the given user. allow_fallback_inputboolWhether to allow input when there is no user or no valid connection index. ignore_input_modeboolWhether to ignore the input mode when checking if the keymap is active.
Returns bool: True if the aliased key is pressed.
$ keymap . is_released (user: User , keymap: Reference , alias: string , remap: bool , allow_fallback_input: bool , ignore_input_mode: bool ) -> bool
Test if aliased input changed from down to up this frame.
Parameter Type Meaning userUserThe user handle. keymapReferenceThe keymap used to determine aliased keys. aliasstringThe name of the aliased input in the given keymap. remapboolWhether to consider keymap remapping data of the given user. allow_fallback_inputboolWhether to allow input when there is no user or no valid connection index. ignore_input_modeboolWhether to ignore the input mode when checking if the keymap is active.
Returns bool: True if the aliased key was released.
$ keymap . remap (user: User , keymap: Reference , alias: string , keys: list ) -> bool
Remap controls for a given user and keymap. Remappings are cached locally until keymap.commit_remap is called.
Parameter Type Meaning userUserThe user handle. keymapReferenceThe keymap. aliasstringThe name of key alias to remap. keyslistThe keys to bind, or an empty list to reset to default bindings.
Returns bool: Whether successful.
$ keymap . set_input_mode (user: User , input_mode: int )
Sets input mode state for a given user.
Parameter Type Meaning userUserThe user handle. input_modeintThe input mode to apply.
$ keymap . set_local_network_keymap (keymap: Reference )
Set the gameplay keymap for translating local user key input to actions to send the server.
Parameter Type Meaning keymapReferenceThe keymap.
$ keymap . set_remote_network_keymap (keymap: Reference )
Set the gameplay keymap for translating remote user actions received from the server to key inputs.
Parameter Type Meaning keymapReferenceThe keymap.