Raw input observation, scroll distance and cursor settings. Set this record as
Emerge.Config.input. Ordinary element interactions do not require subscriptions.
%Emerge.Config{
input: %Emerge.Config.Input{events: [:key, :pointer_button, :resize]}
}Fields
events— raw categories forwarded toEmerge.handle_input/2; defaults to[](none). Choose:key,:text,:pointer_move,:pointer_button,:pointer_scroll,:pointer_enter,:resizeand/or:focus.all_events/0returns all eight. Duplicates and order do not matter. Integers,nil,:alland:noneare not accepted.scroll_line_pixels— positive pixel distance per wheel/line-scroll step; defaults to30.0. Precise pixel-scroll input is not converted into line steps.cursor—Emerge.Config.Cursor, defaulting to its built-in cursor settings.
Subscriptions filter only raw callbacks, not buttons, element key bindings,
text editing, scrolling or Emerge.handle_close/2. The :text category includes
committed text and IME updates. Enter/focus describe a window, not an element.
See the input guide and Emerge.Input for callback values
and which events each backend can provide.
Changing settings
events can change through config and replaces the entire subscription list.
Messages already in your mailbox are not retracted. Scroll distance and cursor
settings require a new viewport to change.
Summary
Types
Raw input category. :text includes committed text and IME events; enter/focus refer to the window, not an element.
Canonical form after nested keyword records have been expanded.
Typed keyword shorthand accepted in this record's parent field.
Functions
Returns every supported raw input category.
Types
@type event_kind() ::
:key
| :text
| :pointer_move
| :pointer_button
| :pointer_scroll
| :pointer_enter
| :resize
| :focus
| :touch
Raw input category. :text includes committed text and IME events; enter/focus refer to the window, not an element.
@type normalized_t() :: %Emerge.Config.Input{ cursor: Emerge.Config.Cursor.normalized_t(), events: [event_kind()], scroll_line_pixels: number() }
Canonical form after nested keyword records have been expanded.
@type options() :: [ events: [event_kind()], scroll_line_pixels: number(), cursor: Emerge.Config.Cursor.t() | Emerge.Config.Cursor.options() ]
Typed keyword shorthand accepted in this record's parent field.
@type t() :: %Emerge.Config.Input{ cursor: Emerge.Config.Cursor.t() | Emerge.Config.Cursor.options(), events: [event_kind()], scroll_line_pixels: number() }
Functions
@spec all_events() :: [event_kind()]
Returns every supported raw input category.