Module src.input.init

Input event handling module.

Initializes input, handles keyboard and MIDI events, and delegates them to the appropriate action mappers.

Functions

Input:init () Initialize the input subsystem.
Input:onKey (key) Process a key press event.
Input:onMidi (msgType, channel, number, value) Process a MIDI message.


Functions

Input:init ()
Initialize the input subsystem. Sets up MIDI devices and any other input resources. Currently a no‐op; MIDI setup to be added later.

Returns:

    nil
Input:onKey (key)
Process a key press event. Delegates to KeyBindings to map a key to an action.

Parameters:

  • key string The key that was pressed.

Returns:

    any The action corresponding to the key, or nil if unmapped.
Input:onMidi (msgType, channel, number, value)
Process a MIDI message. Currently unimplemented; always returns nil.

Parameters:

  • msgType string The MIDI message type (e.g. “note_on”, “control_change”).
  • channel number The MIDI channel (1–16).
  • number number The MIDI note or controller number.
  • value number The velocity or controller value.

Returns:

    nil
generated by LDoc 1.5.0 Last updated 2025-09-04 12:20:37