package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

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.