Module Incr_dom_keyboard.Keyboard_event_handler
module Condition : sig ... endmodule Handler : sig ... endmodule Command : sig ... endmodule Action : sig ... endval sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val empty : tval of_action_list_exn : Action.t list -> tof_action_list_exnandof_command_list_exncreate a keyboard event handler from a list of actions. If the same key appears in multiple actions, an exception is raised.
val of_command_list_exn : Command.t list -> tval add_action_exn : t -> Action.t -> tadd_action_exnadds a new action to a keyboard event handler. If any key from the new action already exists in the handler, an exception is raised.
val add_command_exn : t -> Command.t -> tLike
add_action_exn, but restricted to command actions
val add_disabled_key_exn : t -> Keystroke.t -> tLike
add_action_exn, but restricted to disabled key actions
val set_action : t -> Action.t -> tLike
add_action_exn, but overrides old actions in the case of a conflict.
val set_command : t -> Command.t -> tLike
set_action, but restricted to command actions
val set_disabled_key : t -> Keystroke.t -> tLike
set_action, but restricted to disabled key actions
val merge : on_dup:[ `Override_with_right | `Both | `Throw ] -> t -> t -> tmerge t1 t2 ~on_dupcreates new keyboard event handlers containing the actions fromt1andt2.on_dupdictates how to deal with keys that have actions in botht1andt2:`Override_with_rightuses the action fromt2.`Bothuses both actions, and combines them into a single line if used withget_help_text. Note that if the actions belong to different groups in the help text, it will use the first group.`Throwraises.
val handle_event : t -> Keyboard_event.t -> Virtual_dom.Vdom.Event.t optionval get_help_text : ?include_disabled_keys:unit -> t -> Help_text.tval get_grouped_help_text : ?include_disabled_keys:unit -> ?custom_group_order:Grouped_help_text.Group_name.t list -> t -> default_group:Grouped_help_text.Group_name.t -> Grouped_help_text.tval get_grouped_help_text_exn : ?include_disabled_keys:unit -> ?custom_group_order:Grouped_help_text.Group_name.t list -> t -> Grouped_help_text.t