Raxol.Core.Runtime.Events.Converter (Raxol v0.5.0)
View SourceHandles conversion between different event formats in the Raxol system.
This module is responsible for:
- Converting Termbox events to the Raxol event format
- Converting VS Code events to the Raxol event format
- Normalizing events into a consistent format
Summary
Functions
Converts a Termbox event to the standardized Raxol event format.
Converts a VS Code extension event to the standardized Raxol event format.
Normalizes events from various sources into a consistent format.
Functions
Converts a Termbox event to the standardized Raxol event format.
Parameters
type
: The Termbox event type (e.g., :key, :resize)mod
: Key modifiers (if applicable)key
: The key code (for key events)ch
: The character (for character events)w
,h
: Width and height (for resize events)
Returns
A structured %Event{}
struct.
Converts a VS Code extension event to the standardized Raxol event format.
Parameters
event
: The VS Code event map
Returns
A structured %Event{}
struct.
Normalizes events from various sources into a consistent format.
This is useful when handling events from multiple backends to ensure they all follow the same structure before processing.
Parameters
event
: The event to normalize
Returns
A normalized %Event{}
struct.