package brr

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

Module Ev.KeyboardSource

Keyboard events.

Sourcemodule Location : sig ... end

Key locations.

Sourcetype t

The type for KeyboardEvent objects.

Sourceval key : t -> Jstr.t

key k is the key attribute value of k. This value is affected by the current keyboard layout and modifier keys.

Sourceval code : t -> Jstr.t

code k is a string that identifies the physical key of the event. This value is affected by the current keyboard layout or modifier state.

Sourceval location : t -> Location.t

location k is the key location of k.

Sourceval repeat : t -> bool

repeat k is true if the key has been pressed in a sustained manner.

Sourceval is_composing : t -> bool

is_composing k is true if the event occurs between compositionstart and compositionend events.

Sourceval alt_key : t -> bool

alt_key k is true if Alt modifier is active.

Sourceval ctrl_key : t -> bool

ctrl_key k is true if Control modifier is active.

Sourceval shift_key : t -> bool

shift_key k is true if Shift modifier is active.

Sourceval meta_key : t -> bool

meta_key k is true if Meta modifier is active.

Sourceval get_modifier_state : t -> Jstr.t -> bool

get_modifier_state m key is true if key is active. See here for key values.