Module gamepad

gamepad

The norns script reference has examples for this module.

Functions

up () macro state shortcuts
is_analog_origin (gamepad_conf, axis_keycode, value) Returns true if value for axis is around origin i.e.
is_loggable_event (gamepad_conf, event_code_type, code, val) Predicate that returns true only on non-reset values (i.e.
code_2_button (gamepad_conf, code) Returns button name associated w/ (non-axis) key code
analog_axis_keycode_2_button (gamepad_conf, axis_keycode) Returns button name associated w/ analog axis key code
code_2_keycode (event_code_type, code) Returns event key name associated w/ key code this is not lightweight so should only be used in debug statements

Tables

state button states


Functions

up ()
macro state shortcuts
is_analog_origin (gamepad_conf, axis_keycode, value)
Returns true if value for axis is around origin i.e. when joystick / d-pad is not actioned

Parameters:

  • gamepad_conf
  • axis_keycode
  • value
is_loggable_event (gamepad_conf, event_code_type, code, val)
Predicate that returns true only on non-reset values (i.e. on key/joystick presses)

Parameters:

  • gamepad_conf
  • event_code_type
  • code
  • val
code_2_button (gamepad_conf, code)
Returns button name associated w/ (non-axis) key code

Parameters:

  • gamepad_conf
  • code
analog_axis_keycode_2_button (gamepad_conf, axis_keycode)
Returns button name associated w/ analog axis key code

Parameters:

  • gamepad_conf
  • axis_keycode
code_2_keycode (event_code_type, code)
Returns event key name associated w/ key code this is not lightweight so should only be used in debug statements

Parameters:

  • event_code_type
  • code

Tables

state
button states

Fields:

  • DPDOWN
  • DPUP
  • LDOWN
  • LUP
  • LLEFT
  • LRIGHT
  • RDOWN
  • RUP
  • RLEFT
  • RRIGHT
  • TLEFT
  • TRIGHT aggregated
  • DOWN
  • UP
  • LEFT
  • RIGHT
generated by LDoc 1.5.0 Last updated 2024-10-13 17:45:04