Raxol.Core.Runtime.Events.Keyboard (Raxol v0.2.0)
View SourceHandles keyboard event processing in the Raxol system.
This module is responsible for:
- Processing keyboard events
- Handling special key combinations
- Converting keyboard events to application messages
Summary
Functions
Checks if a key combination matches any of the application's registered shortcuts.
Converts a keyboard event to an application message.
Processes a keyboard event and determines if it should be handled by the application or if it's a system-level command.
Functions
Checks if a key combination matches any of the application's registered shortcuts.
Parameters
event: The keyboard event to checkshortcuts: Map of registered shortcuts
Returns
{:ok, action} if a match is found, :none otherwise.
Converts a keyboard event to an application message.
Parameters
event: The keyboard event to convert
Returns
A message that can be understood by the application's update function.
Processes a keyboard event and determines if it should be handled by the application or if it's a system-level command.
Parameters
event: The keyboard event to processstate: The current application state
Returns
{:system, command, state} if it's a system command,
{:application, event, state} if it should be handled by the application,
{:ignore, state} if the event should be ignored.