Module Incr_dom_keyboard.Variable_keyboard_event_handler
module Action = Keyboard_event_handler.Actionmodule Command = Keyboard_event_handler.Commandval sexp_of_t : ('env -> Ppx_sexp_conv_lib.Sexp.t) -> 'env t -> Ppx_sexp_conv_lib.Sexp.t
val empty : 'env tval of_const_handler : ?variable_actions:('env -> Action.t list) -> Keyboard_event_handler.t -> 'env tval add_variable_actions : 'env t -> ('env -> Action.t list) -> 'env tadd_variable_actions,add_variable_commands, andadd_variable_disabled_keysadd a new variable set of actions to a variable keyboard event handler. This does not replace any existing variable actions in the handler, but instead adds to them.
val add_variable_commands : 'env t -> ('env -> Command.t list) -> 'env tval add_variable_disabled_keys : 'env t -> ('env -> Keystroke.t list) -> 'env tval add_action_exn : 'env t -> Action.t -> 'env tThe
add_*_exnandset_*functions below behave in the same was as the corresponding functions inKeyboard_event_handler.
val add_command_exn : 'env t -> Command.t -> 'env tval add_disabled_key_exn : 'env t -> Keystroke.t -> 'env tval set_action : 'env t -> Action.t -> 'env tval set_command : 'env t -> Command.t -> 'env tval set_disabled_key : 'env t -> Keystroke.t -> 'env tval to_const_handler : 'env t -> 'env -> Keyboard_event_handler.tto_const_handlerevaluates the variable set of actions for the given'envvalue, and combines them with the constant set of actions to create a keyboard event handler.It is possible that for a given
'envvalue, multiple actions are defined for the same key. In that case, the latest variable action is used when creating the constant keyboard event handler.
module Variable_handler_command : sig ... endVariable_handler_commandandVariable_handler_actionprovide a way of representing commands whose keys, description and group are constant, but whose handler varies with the'envvariable.
module Variable_handler_action : sig ... endval add_variable_handler_action : 'env t -> 'env Variable_handler_action.t -> 'env tadd_variable_handler_actionandadd_variable_handler_commandare utility functions for adding variable handler actions to an existing variable keyboard event handler. Under the hood, the variable handler action is converted to a variable action of the form'env -> Action.t.
val add_variable_handler_command : 'env t -> 'env Variable_handler_command.t -> 'env t