KkcKeyEvent

KkcKeyEvent — Object representing a key event.

Functions

Properties

guint keycode Read / Write / Construct
guint keyval Read / Write / Construct
KkcModifierType modifiers Read / Write / Construct
gchar * name Read / Write / Construct
guint unicode Read / Write / Construct

Types and Values

Object Hierarchy

    GFlags
    ╰── KkcModifierType
    GObject
    ╰── KkcKeyEvent

Description

Functions

kkc_key_event_to_string ()

gchar *
kkc_key_event_to_string (KkcKeyEvent *self);

Convert the KeyEvent to string.

Parameters

self

the KkcKeyEvent instance

 

Returns

a string representing the KeyEvent


kkc_key_event_new_from_string ()

KkcKeyEvent *
kkc_key_event_new_from_string (const gchar *key,
                               GError **error);

Create a key event from string.

Parameters

key

 .

a string representation of a key event

.

[in]

error

location to store the error occuring, or NULL to ignore.

[error-domains KkcKeyEventFormatError]

Returns

a new KeyEvent


kkc_key_event_new_from_x_event ()

KkcKeyEvent *
kkc_key_event_new_from_x_event (guint keyval,
                                guint keycode,
                                KkcModifierType modifiers);

Parameters

keyval

 

 

keycode

 

 

modifiers

 

 

kkc_key_event_new ()

KkcKeyEvent *
kkc_key_event_new (guint keyval,
                   guint keycode,
                   KkcModifierType modifiers);

Create a key event from an X event.

Parameters

keyval

 .

an X keysym

.

[in]

keycode

 .

an X keycode

.

[in]

modifiers

 .

modifier mask

.

[in]

Returns

a new KeyEvent


kkc_key_event_get_name ()

const gchar *
kkc_key_event_get_name (KkcKeyEvent *self);

Get and return the current value of the "name" property.

The base name of the KeyEvent.

Parameters

self

the KkcKeyEvent instance to query

 

Returns

the value of the "name" property


kkc_key_event_set_name ()

void
kkc_key_event_set_name (KkcKeyEvent *self,
                        const gchar *value);

Set the value of the "name" property to value .

The base name of the KeyEvent.

Parameters

self

the KkcKeyEvent instance to modify

 

value

the new value of the "name" property

 

kkc_key_event_get_unicode ()

gunichar
kkc_key_event_get_unicode (KkcKeyEvent *self);

Get and return the current value of the "unicode" property.

The base unicode output of the KeyEvent.

Parameters

self

the KkcKeyEvent instance to query

 

Returns

the value of the "unicode" property


kkc_key_event_set_unicode ()

void
kkc_key_event_set_unicode (KkcKeyEvent *self,
                           gunichar value);

Set the value of the "unicode" property to value .

The base unicode output of the KeyEvent.

Parameters

self

the KkcKeyEvent instance to modify

 

value

the new value of the "unicode" property

 

kkc_key_event_get_keyval ()

guint
kkc_key_event_get_keyval (KkcKeyEvent *self);

Get and return the current value of the "keyval" property.

X keyval.

Parameters

self

the KkcKeyEvent instance to query

 

Returns

the value of the "keyval" property


kkc_key_event_set_keyval ()

void
kkc_key_event_set_keyval (KkcKeyEvent *self,
                          guint value);

Set the value of the "keyval" property to value .

X keyval.

Parameters

self

the KkcKeyEvent instance to modify

 

value

the new value of the "keyval" property

 

kkc_key_event_get_keycode ()

guint
kkc_key_event_get_keycode (KkcKeyEvent *self);

Get and return the current value of the "keycode" property.

X keycode.

Parameters

self

the KkcKeyEvent instance to query

 

Returns

the value of the "keycode" property


kkc_key_event_set_keycode ()

void
kkc_key_event_set_keycode (KkcKeyEvent *self,
                           guint value);

Set the value of the "keycode" property to value .

X keycode.

Parameters

self

the KkcKeyEvent instance to modify

 

value

the new value of the "keycode" property

 

kkc_key_event_get_modifiers ()

KkcModifierType
kkc_key_event_get_modifiers (KkcKeyEvent *self);

Get and return the current value of the "modifiers" property.

Modifier mask.

Parameters

self

the KkcKeyEvent instance to query

 

Returns

the value of the "modifiers" property


kkc_key_event_set_modifiers ()

void
kkc_key_event_set_modifiers (KkcKeyEvent *self,
                             KkcModifierType value);

Set the value of the "modifiers" property to value .

Modifier mask.

Parameters

self

the KkcKeyEvent instance to modify

 

value

the new value of the "modifiers" property

 

Types and Values

KKC_TYPE_KEY_EVENT

#define KKC_TYPE_KEY_EVENT (kkc_key_event_get_type ())

The type for KkcKeyEvent.


struct KkcKeyEvent

struct KkcKeyEvent;

Object representing a key event.


struct KkcKeyEventClass

struct KkcKeyEventClass {
	GObjectClass parent_class;
};

The class structure for KKC_TYPE_KEY_EVENT. All the fields in this structure are private and should never be accessed directly.

Members


enum KkcModifierType

A set of bit-flags to indicate the state of modifier keys.

Members

KKC_MODIFIER_TYPE_NONE

   

KKC_MODIFIER_TYPE_SHIFT_MASK

   

KKC_MODIFIER_TYPE_LOCK_MASK

   

KKC_MODIFIER_TYPE_CONTROL_MASK

   

KKC_MODIFIER_TYPE_MOD1_MASK

   

KKC_MODIFIER_TYPE_MOD2_MASK

   

KKC_MODIFIER_TYPE_MOD3_MASK

   

KKC_MODIFIER_TYPE_MOD4_MASK

   

KKC_MODIFIER_TYPE_MOD5_MASK

   

KKC_MODIFIER_TYPE_LSHIFT_MASK

   

KKC_MODIFIER_TYPE_RSHIFT_MASK

   

KKC_MODIFIER_TYPE_SUPER_MASK

   

KKC_MODIFIER_TYPE_HYPER_MASK

   

KKC_MODIFIER_TYPE_META_MASK

   

KKC_MODIFIER_TYPE_RELEASE_MASK

   

enum KkcKeyEventFormatError

Members

KKC_KEY_EVENT_FORMAT_ERROR_PARSE_FAILED

   

KKC_KEY_EVENT_FORMAT_ERROR_KEYSYM_NOT_FOUND

   

Property Details

The “keycode” property

  “keycode”                  guint

X keycode.

Flags: Read / Write / Construct

Default value: 0


The “keyval” property

  “keyval”                   guint

X keyval.

Flags: Read / Write / Construct

Default value: 0


The “modifiers” property

  “modifiers”                KkcModifierType

Modifier mask.

Flags: Read / Write / Construct


The “name” property

  “name”                     gchar *

The base name of the KeyEvent.

Flags: Read / Write / Construct

Default value: NULL


The “unicode” property

  “unicode”                  guint

The base unicode output of the KeyEvent.

Flags: Read / Write / Construct

Default value: 0