package ocgtk

  1. Overview
  2. Docs
OCaml bindings for GTK 4

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1-preview2.tar.gz
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054

doc/ocgtk.gdk/Ocgtk_gdk/Gdk/Wrappers/Key_event/index.html

Module Wrappers.Key_event

type t = [ `key_event | `event ] Gobject.obj
val matches : t -> int -> Gdk_enums.modifiertype -> Gdk_enums.keymatch

Matches a key event against a keyval and modifiers.

This is typically used to trigger keyboard shortcuts such as Ctrl-C.

Partial matches are possible where the combination matches if the currently active group is ignored.

Note that we ignore Caps Lock for matching.

val is_modifier : t -> bool

Extracts whether the key event is for a modifier key.

val get_match : t -> bool * int * Gdk_enums.modifiertype

Gets a keyval and modifier combination that will match the event.

See method@Gdk.KeyEvent.matches.

val get_level : t -> int

Extracts the shift level from a key event.

val get_layout : t -> int

Extracts the layout from a key event.

val get_keyval : t -> int

Extracts the keyval from a key event.

val get_keycode : t -> int

Extracts the keycode from a key event.

val get_consumed_modifiers : t -> Gdk_enums.modifiertype

Extracts the consumed modifiers from a key event.