1.29 <GdkKeyEvent>

Class: <GdkKeyEvent>

It derives from <GdkEvent>.

An event related to a key-based device.

Procedures

Method: key-event:get-consumed-modifiers self ⇒ %return
Method: get-consumed-modifiers self ⇒ %return

Extracts the consumed modifiers from a key event.

self

Passed: a <GdkKeyEvent>.

a key event

%return

Returned: a <GdkModifierType>.

the consumed modifiers or self

Method: key-event:get-keycode self ⇒ %return
Method: get-keycode self ⇒ %return

Extracts the keycode from a key event.

self

Passed: a <GdkKeyEvent>.

a key event

%return

Returned: an unsigned 32-bit integer.

the keycode of self

Method: key-event:get-keyval self ⇒ %return
Method: get-keyval self ⇒ %return

Extracts the keyval from a key event.

self

Passed: a <GdkKeyEvent>.

a key event

%return

Returned: an unsigned 32-bit integer.

the keyval of self

Method: key-event:get-layout self ⇒ %return
Method: get-layout self ⇒ %return

Extracts the layout from a key event.

self

Passed: a <GdkKeyEvent>.

a key event

%return

Returned: an unsigned 32-bit integer.

the layout of self

Method: key-event:get-level self ⇒ %return
Method: get-level self ⇒ %return

Extracts the shift level from a key event.

self

Passed: a <GdkKeyEvent>.

a key event

%return

Returned: an unsigned 32-bit integer.

the shift level of self

Method: key-event:get-match self ⇒ %return keyval modifiers
Method: get-match self ⇒ %return keyval modifiers

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

See key-event:matches.

self

Passed: a <GdkKeyEvent>.

a key <GdkEvent>

%return

Returned: a boolean.

#t on success

keyval

Returned: an unsigned 32-bit integer.

return location for a keyval

modifiers

Returned: a <GdkModifierType>.

return location for modifiers

Method: key-event:is-modifier? self ⇒ %return
Method: is-modifier? self ⇒ %return

Extracts whether the key event is for a modifier key.

self

Passed: a <GdkKeyEvent>.

a key event

%return

Returned: a boolean.

#t if the self is for a modifier key

Method: key-event:matches self keyval modifiers ⇒ %return
Method: matches self keyval modifiers ⇒ %return

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.

self

Passed: a <GdkKeyEvent>.

a key <GdkEvent>

keyval

Passed: an unsigned 32-bit integer.

the keyval to match

modifiers

Passed: a <GdkModifierType>, or a list of its symbols, or one of them.

the modifiers to match

%return

Returned: a <GdkKeyMatch>.

a <GdkKeyMatch> value describing whether self matches