Raxol.LiveView.InputAdapter (Raxol LiveView v2.6.0)

Copy Markdown View Source

Translates browser keyboard events into Raxol.Core.Events.Event structs.

This is the LiveView counterpart of Raxol.Terminal.ANSI.InputParser, which does the same translation for terminal ANSI escape sequences.

Summary

Functions

Translates a browser keydown event map into a Raxol.Core.Events.Event.

Functions

translate_key_event(params)

@spec translate_key_event(map()) :: Raxol.Core.Events.Event.t()

Translates a browser keydown event map into a Raxol.Core.Events.Event.

The input params map is expected to have keys like "key", "ctrlKey", "altKey", "shiftKey", and "metaKey" as provided by Phoenix LiveView's phx-window-keydown binding.