OkeySourceConvenient functions to handle key press events in Lablgtk widgets.
Set the default modifier list. The first default value is [].
Set the default modifier mask. The first default value is [`MOD2 ; `MOD3 ; `MOD4 ; `MOD5 ; `LOCK]. The mask defines the modifiers not taken into account when looking for the handler of a key press event.
val add :
< connect : < destroy : callback:(unit -> unit) -> GtkSignal.id.. >
; event : GObj.event_ops
; get_oid : int.. > ->
?cond:(unit -> bool) ->
?mods:modifier list ->
?mask:modifier list ->
Gdk.keysym ->
(unit -> unit) ->
unitadd widget key callback associates the callback function to the event "key_press" with the given key for the given widget.
val add_list :
< connect : < destroy : callback:(unit -> unit) -> GtkSignal.id.. >
; event : GObj.event_ops
; get_oid : int.. > ->
?cond:(unit -> bool) ->
?mods:modifier list ->
?mask:modifier list ->
Gdk.keysym list ->
(unit -> unit) ->
unitIt calls Okey.add for each given key.
val set :
< connect : < destroy : callback:(unit -> unit) -> GtkSignal.id.. >
; event : GObj.event_ops
; get_oid : int.. > ->
?cond:(unit -> bool) ->
?mods:modifier list ->
?mask:modifier list ->
Gdk.keysym ->
(unit -> unit) ->
unitLike Okey.add but the previous handlers for the given modifiers and key are not kept.
val set_list :
< connect : < destroy : callback:(unit -> unit) -> GtkSignal.id.. >
; event : GObj.event_ops
; get_oid : int.. > ->
?cond:(unit -> bool) ->
?mods:modifier list ->
?mask:modifier list ->
Gdk.keysym list ->
(unit -> unit) ->
unitIt calls Okey.set for each given key.
val remove_widget :
< connect : < destroy : callback:(unit -> unit) -> GtkSignal.id.. >
; event : GObj.event_ops
; get_oid : int.. > ->
unit ->
unitRemove the handlers associated to the given widget. This is automatically done when a widget is destroyed but you can do it yourself.
val set_handler_trees :
?stop:(modifier list * Gdk.keysym) ->
(unit -> handler_tree list) ->
?f_display_state:(after_handler:bool -> keyhit_state -> unit) ->
< misc : GObj.misc_ops ; event : GObj.event_ops.. > ->
unitval handler_tree :
?mods:modifier list ->
?mask:modifier list ->
Gdk.keysym ->
handler_tree_node ->
handler_tree