Module Ev.Keyboard
Keyboard events.
module Location : sig ... end
Key locations.
type t
The type for KeyboardEvent objects.
val key : t -> Jstr.t
key k
is the key attribute value ofk
.
val code : t -> Jstr.t
code k
is a string that identifies the physical key of the event. The value is not affected by the current keyboard layout or modifier state.
val location : t -> Location.t
location k
is the key location ofk
.
val repeat : t -> bool
repeat k
istrue
if the key has been pressed in a sustained manner.
val is_composing : t -> bool
is_composing k
istrue
if the event occurs betweencompositionstart
andcompositionend
events.
val alt_key : t -> bool
alt_key k
istrue
ifAlt
modifier is active.
val ctrl_key : t -> bool
ctrl_key k
istrue
ifControl
modifier is active.
val shift_key : t -> bool
shift_key k
istrue
ifShift
modifier is active.
val meta_key : t -> bool
meta_key k
istrue
ifMeta
modifier is active.